Views:

Scenario Overview


In this scenario we will demonstrate how to set up a Decision Table that you can use to customize your Quote Product items unit price based on selected attributes. For this we are using Override Price in the Quote Product. This sample shows how you can use North52 BPA in a Configure, Price Quote (CPQ) scenario.

For this article it is assumed that you have at least basic familiarity with Decision Tables and/or have read the following articles:

Note: We will not detail step-by-step instructions here on how to set up Conditions or Actions, please read the above articles if you need detailed configuration steps.

For this sample we will use bicycles as our Product and configure it to have the following attributes:

  • Color (Blue, Green, Red)
  • Size (Small, Medium, Large)
  • Type (Mountain Bike, Racing Bike)
  • Does it have a bell?
  • Does it have a basket?
  • How many reflectors have been ordered for it?


The following rules apply to the Bicycle Products

Base Price

$100 is the starting price for a Bicycle as per the Price List
Size
  • Small bicycles are $10 cheaper
  • Large bicycles are $10 more expensive
Color
  • A red bike is $7 more expensive because of additional styling required
  • A blue bike is $5 cheaper
Type
  • A mountain bike will add $20 to the base price
  • A racing bike will add $35 to the base price
Bell & Basket

If a customer orders a Bicycle with both a basket and a bell there is an charge of $5
Reflectors
  • 2 for $5
  • 3 of 4 costs $10 dollars
  • 5 or more costs an additional $15


Bicycle Properties in a Quote Product


 

North52 Decision Suite Solution

The North52 Decision Suite solution works like this:

  • Decision Table of type 'Save - Perform Action' is created on the Quote Product entity
  • The Source Property is set to 'Quantity'
  • The Event is set to 'Create & Update'
  • Exit on First Match is turned Off (unchecked)

The Decision Table

Calculations Table


The Decision Table uses 7 calculations

    Six of the calculations use the FindProductPropertiesByRegardingIDAndPropertyName() function which allows us to bring back each of the properties on the Bicycle.
    The seventh calculation looks up the base price for the Bicycle on the on the PriceList.

      Calculations : 

      Get Type
      
      FindProductPropertiesByRegardingIDAndPropertyName([quotedetail.quotedetailid], 'Type')
      
      Get Bell
      
      FindProductPropertiesByRegardingIDAndPropertyName([quotedetail.quotedetailid], 'Bell')
      
      Get Basket
      
      FindProductPropertiesByRegardingIDAndPropertyName([quotedetail.quotedetailid], 'Basket')
      
      Get Reflector
      
      FindProductPropertiesByRegardingIDAndPropertyName([quotedetail.quotedetailid], 'Reflector Count')
      
      Get Size
      
      FindProductPropertiesByRegardingIDAndPropertyName([quotedetail.quotedetailid], 'Size')
      
      Get Color
      
      FindProductPropertiesByRegardingIDAndPropertyName([quotedetail.quotedetailid], 'Color')
      
      GetBikeBasePrice
      
      FindValue('productpricelevel', 'productid',
        FindValue('product', 'name', 'bicycle', 'productid', '100', true), 
        'amount', '100', true)
      

      The Decision Table


      As the Decision Table executes and evaluates each of the conditions it sums up the values accordingly.

      This is because Column is an Action-Calculation and is used by the Decision Table to keep a running sum of the Bicycle Price based on the results of the rows within the Decision Table. You can think of this as a variable result which is then used to update the Price Per Unit field.




      Below you can see the the Decision Table has calculated the unit price and updated the Quote Product accordingly based on the Properties shown at the start of this article.

      Did you know?

      North52 provides Automated Testing for Dynamics 365

      TestShield® is a unique solution that helps you automatically test your End to End Dynamics 365/CRM and Power Automate processes.  It is built on the proven and robust North52 Business Process Activities rules engine and offers the ability to repetitively test and report on your key business processes.

      TestShield's key features:

      • Fully integrated with Dynamics 365
      • Easy to use by BA's, Testers, and Developers
      • Advanced test data generation and management
      • Codeless advanced testing reduces test creation time
      • Test and validate across all layers with a single test

      Learn more about TestShield