Procedure Builder Tab
Procedure Builder tab is a convenient tool to set up a Pricing Procedure step by step, so you do not need to manually build the JSON query.
To use it, click the Procedure Builder button on the Pricing Procedure object:
By default, Builder for Pricing Procedure 1.0 is opened. To open Builder for Pricing Procedure 2.0, click Move to Advance Version:
-
Procedure Builder for v 1.0
-
Procedure Builder for v 2.0
-
Set up Pricing procedure settings:
-
Procedure Type:
-
-
Item
-
Group
-
-
Procedure Calculation Type Settings
The Item type setting is missing in the resulting JSON itself, but it defines the JSON structure.
-
-
Click Save.
-
Set up Pricing Procedure steps:
-
The Item type setting is missing in the resulting JSON itself, but it defines the JSON structure. -
-
Drag and drop steps with
to arrange them in your desired order. -
Use Add Step and Delete Step buttons to make a desired number of steps.
-
For the Type field in the Value Settings, select:
-
String to select the price type
-
Number to enter the decimal value
-
Formula to set up formula settings:

The MULTIPLY formula operator is displayed as multi in the JSON query. For each step, you can also set up Step Conditions. Useful notes:
-
-
-
Use OR, AND, + and Add Group buttons to set up condition groups:
-
You can add up to 3 subgroups for each group.
-
For the AND group type, its subgroup type is automatically set to OR and vice versa.
-
-
Click Delete group to delete condition group and
to delete condition string.
-
-
Click Save.
Examples
Pricing Procedure 1.0
To generate JSON from the Workshop 2.2, do the following in the Procedure Builder for v 1.0:
These settings will generate the following JSON:
{ "procedure": { "type":"SUM", "items": [ {"calculationType":"Promo" } ] }}
Pricing Procedure 2.0
To generate JSON from the Workshop 2.3, make the following settings in the Procedure Builder for v 2.0:
-
Drill Down
-
Procedure
-
Procedure
-
Set Value
-
Roll Up
-
Set Value
-
Roll Up
-
Set Value
-
Roll Up
These settings will generate the following JSON:
Click to view
{
"version": 2,
"steps": [
{
"type": "drillDown",
"baseObject": "orders__OrderLineItem__c",
"basePrice": "ManualDiscountPercent__c",
"result": [
{
"resultObject": "orders__DeliveryLineItem__c",
"resultPrice": "ManualDiscountPercent__c"
}
]
},
{
"type": "procedure",
"basePrice": "$.listPrice",
"resultPrice": "$.unitPrice",
"condition": {
"operator": "OR",
"items": [
{
"field": "ManualDiscountPercent__c",
"operator": "lessOrEqual",
"value": 0
},
{
"field": "ManualDiscountPercent__c",
"operator": "equal",
"value": null
}
]
},
"procedure": {
"type": "MULT",
"round": "item",
"roundTo": 4,
"items": [
{
"calculationType": "ClientBased"
},
{
"calculationType": "Promo"
}
]
}
},
{
"type": "procedure",
"basePrice": "$.listPrice",
"resultPrice": "$.unitPrice",
"condition": {
"operator": "AND",
"items": [
{
"field": "ManualDiscountPercent__c",
"operator": "greater",
"value": 0
}
]
},
"procedure": {
"type": "MULT",
"round": "item",
"roundTo": 4,
"items": [
{
"calculationType": "manualdiscountpercent"
}
]
}
},
{
"type": "setValue",
"object": "orders__DeliveryLineItem__c",
"resultPrice": "$.unitPrice",
"condition": {
"operator": "AND",
"items": [
{
"field": "$.unitPrice",
"operator": "less",
"value": 0
}
]
},
"value": 0
},
{
"type": "rollUp",
"baseObject": "orders__DeliveryLineItem__c",
"basePrice": "$.unitPrice",
"method": "copyEqual",
"result": [
{
"resultObject": "orders__OrderLineItem__c",
"resultPrice": "$.unitPrice"
}
]
},
{
"type": "setValue",
"object": "orders__DeliveryLineItem__c",
"resultPrice": "$.totalPrice",
"value": {
"operator": "multi",
"items": [
"$.unitPrice",
"$.quantity"
]
}
},
{
"type": "rollUp",
"baseObject": "orders__DeliveryLineItem__c",
"basePrice": "$.totalPrice",
"method": "sum",
"result": [
{
"resultObject": "orders__Order__c",
"resultPrice": "$.totalPrice"
},
{
"resultObject": "orders__Delivery__c",
"resultPrice": "$.totalPrice"
},
{
"resultObject": "orders__OrderLineItem__c",
"resultPrice": "$.totalPrice"
}
]
},
{
"type": "setValue",
"object": "orders__DeliveryLineItem__c",
"resultPrice": "$.totalDiscount",
"value": {
"operator": "multi",
"items": [
{
"operator": "sum",
"items": [
"$.listPrice",
"- $.unitPrice"
]
},
"$.quantity"
]
}
},
{
"type": "rollUp",
"baseObject": "orders__DeliveryLineItem__c",
"basePrice": "$.totalDiscount",
"method": "sum",
"result": [
{
"resultObject": "orders__Order__c",
"resultPrice": "$.totalDiscount"
},
{
"resultObject": "orders__Delivery__c",
"resultPrice": "$.totalDiscount"
},
{
"resultObject": "orders__OrderLineItem__c",
"resultPrice": "$.totalDiscount"
}
]
}
]
}
See also: