Pricing Engine
Hands-On Lab
Build Comuniqa's complete pricing engine from scratch — price books, pricing recipe, context definitions, pricing procedures, discount logic, bundle zeroing, proration, and price waterfall. Each task shows the expected outcome; click Hint for step-by-step guidance.
Business Requirements & Pricing Model
Before touching the platform, understand what Comuniqa needs to achieve commercially and why these pricing rules exist. Every task in this lab maps directly to one or more of the requirements below.
The Comuniqa Pricing Challenge
Comuniqa is an Argentine B2C telco launching its new digital sales platform on Salesforce Revenue Cloud Advanced. Their pricing model has four layers of complexity that must all work together on a single quote:
Base Tariff Structure
- Comuniqa Go! plan: ARS 69,000/month
- Comuniqa Go! Two (second SIM): ARS 1,650/month
- MoviMundo Plus+: ARS 13,900/month
- MoviMundo Basic+: ARS 7,900/month
- YouTube Mundo add-on: ARS 4,000/month
- Vida Digital Pass C&C: ARS 9,900/month
- SIM Card & Phone Number: ARS 0 (included)
Discount Schemes
- Contract Discount: −25% for 12 or 24-month term commitment
- Tarifa Social: −50% for ANSES-verified welfare recipients
- Tarifa Social takes precedence — cannot stack with contract discount
- Bundle zeroing: child products = ARS 0 when inside bundle
- Retention reps can apply manual discounts (capped)
Bundle Pricing Rules
- Vida Digital bundle root priced at ARS 69,000
- Comuniqa Go! child = ARS 0 (zeroed via bundle adjustment)
- MoviMundo add-ons = ARS 0 inside bundle
- YouTube Mundo = ARS 0 inside bundle, ARS 4,000 standalone
- Vida Digital Pass keeps its own price (ARS 9,900)
Mid-Cycle & Compliance
- Amendments mid-billing-cycle must prorate new lines
- Annual CPI uplift at renewal (INDEC index + 3%, capped 12%)
- ENACOM requires full audit trail of every pricing step
- Price Waterfall must be persisted for regulatory review
- All prices displayed in ARS rounded to whole pesos
Formal Business Requirements
What You Will Build in This Lab
| Task | What You Build | Business Requirement |
|---|---|---|
| Task 1 | Price Book "B2C Standard ARS" + Pricing Recipe | BR-P01 |
| Task 2 | Context Definition extensions (WelfareEligible, ContractTerm) | BR-P02, BR-P03 |
| Task 3 | Base Pricing Procedure with List Price element | BR-P01 |
| Task 4 | Contract Discount + Tarifa Social with Stop Pricing precedence | BR-P02, BR-P03 |
| Task 5 | Bundle-Based Price elements for Vida Digital child zeroing | BR-P04 |
| Task 6 | Proration + Subscription elements for mid-cycle amendments | BR-P05 |
| Task 7 | Price Waterfall, Persistence, Rounding, and Procedure Assignment | BR-P06, BR-P08 |
Pre-Lab Setup
Confirm your org and prior work are ready before starting. Check off each item.
Price Book Entry Reference
| Product | List Price (ARS/mo) | Selling Model | Currency |
|---|---|---|---|
| Comuniqa Go! | 69,000 | Term-Defined (12M & 24M) + Evergreen | ARS |
| Comuniqa Go! Two | 1,650 | Evergreen | ARS |
| SIM Card | 0 | One Time | ARS |
| Phone Number | 0 | Evergreen | ARS |
| MoviMundo Plus+ | 13,900 | Evergreen | ARS |
| MoviMundo Basic+ | 7,900 | Evergreen | ARS |
| YouTube Mundo | 4,000 | Evergreen | ARS |
| Vida Digital Pass C&C | 9,900 | Evergreen | ARS |
| Comuniqa Go! (bundle root) | 69,000 | Term-Defined (12M & 24M) | ARS |
- Price Book "B2C Standard ARS" exists, Status = Active, Currency = ARS
- 9 Price Book Entries created with correct list prices and selling models
- Pricing Recipe "CQ_Pricing_Recipe" cloned from NGPDefaultRecipe, Status = Active
- Recipe is set as the active recipe in Salesforce Pricing Setup
B2C Standard ARS, Currency = ARS, Status = Active. Save.Comuniqa Go!. Set List Price = 69000, Selling Model = Term-Defined 12 Months. Save. Repeat for the 24M and Evergreen selling models for the same product.0, Selling Model = One Time. Price = 0 is intentional — do not leave it blank.CQ_Pricing_Recipe. Save.CQ_Pricing_Recipe. Go to the Price Adjustment Matrix tab → click Modify. Select all predefined standard decision tables (Price Book Entries, Attribute Discount Entries, Bundle Based Adjustment Entries, Volume Discount Entries). Save. These are the standard DT slots the pricing engine will use.CQ_Pricing_Recipe as the active recipe. Save.A Price Book in Draft status is not visible to the Pricing engine or to Browse Catalogs. Always confirm Status = Active before proceeding.
- Price Book "B2C Standard ARS" is Active in ARS currency
- All 9 products have Price Book Entries with correct prices and selling models
- CQ_Pricing_Recipe is cloned, active, and selected in Salesforce Pricing Setup
Required Context Mappings
| Context Tag Name | Source Object | Source Field | Used By |
|---|---|---|---|
WelfareEligible | Account | WelfareEligible__c | Tarifa Social (Task 4) |
ContractTerm | Quote Line Item | SBQQ__ProductOption__r.ContractTerm__c | Contract Discount (Task 4) |
BundleRootId | Quote Line Item | Bundle Root Product Id | Bundle zeroing (Task 5) |
EffectiveTo | Quote Line Item | EffectiveTo__c | Proration (Task 6) |
TarifaSocialDT and a Decision Table also has that label or API name, the Pricing engine will throw an activation error. Use distinct names — prefix context tags with the data they carry, not the DT they feed.
- SalesTransactionContext extended with 4 new input node mappings
- All mappings point to correct source objects and fields
- Context Definition is in Active status
- No naming conflicts with Decision Table labels
SalesTransactionContext. Click Edit.WelfareEligible, Field = WelfareEligible__c, Data Type = Boolean. Save the mapping.ContractTerm, Field = the attribute value field for Contract Term on the quote line. Data Type = Text. Save.BundleRootId, Field = the bundle root product reference on the line item. Data Type = Text. Save.EffectiveTo, Field = EffectiveTo__c on the line item. Data Type = Date. Save.- SalesTransactionContext has 4 new mappings: WelfareEligible, ContractTerm, BundleRootId, EffectiveTo
- Context Definition Status = Active
- No activation errors (no naming conflicts)
Procedure Element Order — Mandatory First Steps
| Position | Element Type | Configuration | Purpose |
|---|---|---|---|
| 1 | Required First Pricing Setting | Map: LineItem, NetUnitPrice, Subtotal, PriceWaterfall context tags | Initialises all shared variables for the procedure run |
| 2 | Core List Price | Price Book = B2C Standard ARS · Decision Table = Price Book Entries | Fetches ARS list price for the product being priced |
- Pricing Procedure "CQ_Mobile_Pricing" cloned from template, Status = Active
- Element 1: Pricing Setting — all four standard variables mapped
- Element 2: List Price — reading from Price Book Entries DT, B2C Standard ARS
- Procedure assigned in Revenue Settings (quotes/orders)
- Simulation test: Comuniqa Go! returns ARS 69,000 list price
Revenue Management Default Pricing Procedure.CQ_Mobile_Pricing, Usage Type = Pricing, Context Definition = SalesTransactionContext. Save. The newly cloned procedure now appears in the Pricing Procedures list.CQ_Mobile_Pricing. On the Details tab, click the procedure version to open the Pricing Procedure Builder.LineItem → Line Item input, price_water_fall → Price Waterfall output. Save element.Price Book Entries. Map input rule variables: Product → Product, Price Book → PriceBooks, Product Selling Model → ProductSellingModel. Map input: Quantity → LineItemQuantity. Map output: List Price → ListPrice. Save element.CQ_Mobile_Pricing. Save. Repeat for Setup → Product Discovery Settings → Select a Pricing Procedure section. Repeat for Setup → Salesforce Pricing Setup → Select a Pricing Procedure section (headless).Comuniqa Go!, Price Book = B2C Standard ARS. Run simulation. Confirm output shows ListPrice = 69000 ARS.Browse Catalogs uses Product Discovery Settings. Quotes and Orders use Revenue Settings. If you only assign to one, prices will appear correct in one place but wrong or missing in the other. All three assignment points must be configured.
- CQ_Mobile_Pricing procedure is Active with 2 elements: Pricing Setting + List Price
- Simulation returns ARS 69,000 for Comuniqa Go!
- Procedure assigned in both Revenue Settings and Product Discovery Settings
Discount Data Records to Create First
| Record Type | Name | Input | Adjustment Type | Value |
|---|---|---|---|---|
| Attribute Based Adjustment | CQ_Contract_12M | Contract Term = "12 Months" | Percentage | 25% |
| Attribute Based Adjustment | CQ_Contract_24M | Contract Term = "24 Months" | Percentage | 25% |
| Custom Decision Table | CQ_TarifaSocial_DT | WelfareEligible = TRUE | Percentage | 50% |
Procedure Element Order — Discount Block
| Position | Element | Configuration |
|---|---|---|
| 3 | Advanced List Group (Tarifa Social) | Filter: WelfareEligible = TRUE |
| 3a | Advanced Price Adjustment Matrix | DT = CQ_TarifaSocial_DT → 50% off |
| 3b | Core Stop Pricing | Stops execution for this line — prevents contract discount running |
| 4 | Core Attribute-Based Price | DT = Attribute Discount Entries → Contract Term → 25% off |
| 5 | Core Manual Discount | Allows rep override (retention use case) |
- Attribute Based Adjustment records created for 12M and 24M contract terms
- Attribute Discount Entries DT refreshed after record creation
- CQ_TarifaSocial_DT created, added to CQ_Pricing_Recipe, refreshed
- Procedure now has 5 elements in correct order with List Group + Stop Pricing
- Simulation: Contract Term = 12M → ARS 51,750 (69,000 − 25%)
- Simulation: WelfareEligible = TRUE → ARS 34,500 (69,000 − 50%), contract discount NOT applied
Standard Attribute Based Adjustment. If it is Active, deactivate it first before adding records — the platform requires this.Comuniqa Go!, Product Selling Model = Term-Defined 12 Months, Adjustment Type = Percentage, Adjustment Value = 25, Effective From = today. Click Next. Set condition: Attribute = Contract Term, Operator = Equals, Value = 12 Months. Save.Term-Defined 24 Months, Adjustment Value = 25, Attribute Value = 24 Months. Save.CQ_TarifaSocial_DT, Application Usage = Pricing, Type = Standard. Add input: WelfareEligible (Boolean). Add outputs: AdjustmentType (Text), AdjustmentValue (Number). Add one data row: TRUE → Percentage → 50. Activate the DT.CQ_Pricing_Recipe. Go to Price Adjustment Matrix tab → Modify. Select CQ_TarifaSocial_DT. Map output variables: AdjustmentValue → TierValue, AdjustmentType → AdjustmentType. Save the recipe.CQ_Mobile_Pricing procedure. Deactivate to edit. After the List Price element, add a List Group element. Set filter condition: WelfareEligible = TRUE.CQ_TarifaSocial_DT. Map input WelfareEligible from context. Map outputs to AdjustmentType and AdjustmentValue.Attribute Discount Entries. Map the ContractTerm context tag as input. Activate the procedure.12 Months, WelfareEligible = false → expect ARS 51,750. (b) WelfareEligible = true → expect ARS 34,500 with no contract step in the waterfall.If Stop Pricing is missing from inside the List Group, or the List Group filter condition is wrong, welfare-eligible customers will receive both the 50% Tarifa Social AND the 25% contract discount (75% total). Always run the simulation with WelfareEligible = TRUE and confirm only one discount step appears in the waterfall.
- Attribute Based Adjustment records exist for 12M and 24M
- Attribute Discount Entries DT refreshed
- CQ_TarifaSocial_DT registered in CQ_Pricing_Recipe and refreshed
- Procedure has List Group (WelfareEligible filter) → PAM → Stop Pricing, then Attribute-Based Price outside the group
- Simulation: 12M contract → ARS 51,750 ✓ · Welfare → ARS 34,500, no stacking ✓
Bundle-Based Adjustment Records to Create
| Root Bundle | Root Bundle Selling Model | Parent Product | Parent PSM | Product | Product PSM | Adj. Type | Value | Schedule |
|---|---|---|---|---|---|---|---|---|
| Comuniqa Go! (Vida Digital) | Term-Defined 12M | Comuniqa Go! (Vida Digital) | Term-Defined 12M | Comuniqa Go! | Term-Defined 12M | Override | 0 | Standard Bundle Based Adjustment |
| Comuniqa Go! (Vida Digital) | Term-Defined 12M | Comuniqa Go! (Vida Digital) | Term-Defined 12M | Comuniqa Go! Two | Evergreen | Override | 0 | Standard Bundle Based Adjustment |
| Comuniqa Go! (Vida Digital) | Term-Defined 12M | Comuniqa Go! (Vida Digital) | Term-Defined 12M | MoviMundo Plus+ | Evergreen | Override | 0 | Standard Bundle Based Adjustment |
| Comuniqa Go! (Vida Digital) | Term-Defined 12M | Comuniqa Go! (Vida Digital) | Term-Defined 12M | MoviMundo Basic+ | Evergreen | Override | 0 | Standard Bundle Based Adjustment |
| Comuniqa Go! (Vida Digital) | Term-Defined 12M | Comuniqa Go! (Vida Digital) | Term-Defined 12M | YouTube Mundo | Evergreen | Override | 0 | Standard Bundle Based Adjustment |
PSM = Product Selling Model. Repeat each record for the 24M selling model variant of the bundle root if applicable to your org's price book setup.
- 5 Bundle-Based Adjustment records created with Override = 0
- Bundle Based Adjustment Entries DT refreshed after all records created
- Bundle-Based Price element added to CQ_Mobile_Pricing procedure
- Simulation: Comuniqa Go! inside Vida Digital bundle → ARS 0
- Simulation: Comuniqa Go! standalone → ARS 69,000 (unchanged)
Standard Bundle Based Adjustment. If it is Active, deactivate it first before adding records.Comuniqa Go! (Comuniqa Vida Digital), Root Bundle Selling Model = Term-Defined 12 Months, Parent Product = Comuniqa Go! (Comuniqa Vida Digital), Parent Product Selling Model = Term-Defined 12 Months, Product = Comuniqa Go!, Product Selling Model = Term-Defined 12 Months, Adjustment Type = Override, Adjustment Value = 0, Price Adjustment Schedule = Standard Bundle Based Adjustment. Set effective date. Save.CQ_Mobile_Pricing. Deactivate to edit. After the List Price element, add a Bundle-Based Price element. Set Decision Table = Bundle Based Adjustment Entries. Map the required input rule variables from the DT: Price Adjustment Schedule, Product Selling Model, Effective From/To, Product, Parent Product, Parent Product Selling Model, Root Bundle, Root Bundle Selling Model. Map BundleRootId context tag to Root Bundle. Save and reactivate.Bundle Based Adjustment records exist in the database, but the Pricing Procedure reads from the cached DT snapshot. If you don't refresh the DT, child products will continue showing their full list price inside the bundle. Always refresh immediately after creating or editing Bundle-Based Adjustment records.
- 5 Bundle-Based Adjustment records created (Override = 0)
- Bundle Based Adjustment Entries DT refreshed
- Bundle-Based Price element in CQ_Mobile_Pricing procedure
- Bundle root = ARS 69,000 · child products = ARS 0 · Vida Digital Pass = ARS 9,900
Proration Calculation — Comuniqa Go! Two Example
Proration multiplier = 11 / 30 = 0.3667
Prorated charge = ARS 1,650 × 0.3667 = ARS 605.05
Rounded to whole pesos = ARS 605
- Proration Settings configured in Salesforce Pricing Setup (Evergreen = Monthly, anchor = billing start date)
- Proration element added to procedure (position: after Bundle-Based Price, before discounts)
- Subscription element added immediately after Proration element
- Amendment test: Comuniqa Go! Two added April 20 → ARS 605 charge for April
- Price Waterfall shows both the Proration step (multiplier = 0.3667) and Subscription step
Monthly, One Time Term Value = One Time. Billing Period Anchor = the billing start date field on your order. Save.CQ_Mobile_Pricing. Deactivate to edit. After the Bundle-Based Price element, add a Proration element. Configure: Term = Evergreen, use EffectiveTo context tag for the end-of-period date. Save.AR_CPI_Policy, Type = Price Index, Formula = MIN(12, PriceIndex + 3). Create an Index Rate record for the current INDEC CPI value. To fully test, an asset record reaching renewal date is required.- Proration Settings configured in Salesforce Pricing Setup
- Proration + Subscription elements in procedure in correct order
- Amendment test: mid-cycle addition shows prorated charge, not full monthly price
- Price Waterfall shows Proration Multiplier step
Final Procedure Element Summary
| # | Element | Purpose |
|---|---|---|
| 1 | Pricing Setting | Initialise procedure variables |
| 2 | List Price | Fetch ARS list price from B2C Standard ARS |
| 3 | Bundle-Based Price | Zero child products inside Vida Digital bundle |
| 4 | Proration | Calculate partial-period multiplier for amendments |
| 5 | Subscription | Apply proration multiplier to net price |
| 6 | List Group (WelfareEligible = TRUE) | Conditional block for Tarifa Social |
| 6a | → Price Adjustment Matrix | Apply 50% Tarifa Social discount |
| 6b | → Stop Pricing | Prevent contract discount from also running |
| 7 | Attribute-Based Price | Apply 25% contract discount (12M / 24M) |
| 8 | Manual Discount | Allow retention rep override discount |
| 9 | Rounding Values | Round to 0 decimal places (whole ARS) |
- Price Waterfall enabled and Price Waterfall Persistence enabled in Salesforce Pricing Setup
- Rounding Values element added as last element (Round Half Up, 0 decimal places)
- Procedure assigned in all 3 contexts: Revenue Settings, Product Discovery Settings, Salesforce Pricing Setup (headless)
- Full quote test passes: waterfall visible on each quote line showing all applied steps
- All ARS prices display as whole pesos with no decimal places
Enabled. Find Price Waterfall Persistence toggle → set to Enabled. Save. Do this before creating any test quotes.CQ_Mobile_Pricing. Deactivate to edit. Add a Rounding Values element as the last element. Configure: Decimal Places = 0, Rounding Rule = Half Up, Field to Round = NetUnitPrice. Save.CQ_Mobile_Pricing here (headless API context). This is the third assignment point.If the Price Waterfall toggle was not enabled in Setup before the quote was created, waterfall data is not generated for that quote. Enable the toggle, then create a fresh test quote. Existing quotes will not have waterfall data retroactively populated.
- Price Waterfall + Persistence enabled in Salesforce Pricing Setup
- Rounding Values element: 0 decimal places, Half Up, last in procedure
- CQ_Mobile_Pricing assigned in all 3 contexts (Revenue Settings, Discovery Settings, Pricing Setup)
- Contract discount quote: waterfall shows List Price → −25% → ARS 51,750
- Welfare quote: waterfall shows List Price → −50% → Stop Pricing → ARS 34,500 (no stacking)
- Bundle quote: child products = ARS 0, Vida Digital Pass = ARS 9,900
- All prices display as whole pesos
Final Lab Validation Checklist
Work through every item below before calling this lab complete. This mirrors the pre-go-live pricing validation a solution architect would perform on a real Comuniqa implementation.