The Procedure Step
This step is used to calculate the price based on the conditions specified in the Calculation Type record.
Step Keys
| Key | Type | Required | Comment |
|---|---|---|---|
type |
String |
Yes |
It is filled out with the procedure constant. |
condition |
Step Conditions |
No |
See the Step Conditions. |
basePrice |
String |
Yes |
The field from the Delivery Line Item object for obtaining the price for calculating the discount. See the Available Field Formats. |
resultPrice |
String |
Yes |
The field from the Delivery Line Item object for storing the price with the applied discount. See the Available Field Formats. |
procedure |
Object |
Yes |
Pricing Procedure. |
Pricing Procedure Keys
| Key | Type | Required | Comment | ||
|---|---|---|---|---|---|
type |
Enum |
Yes |
Available values:
|
||
round |
Enum |
No |
If set, values will be rounded according to the selected value. Available values:
Otherwise, the value will be rounded after all discounts are calculated according to the number of digits in the Unit Price field on the Order Line Item record. |
||
roundTo |
Integer |
No |
The rounding precision, the number of decimals (digits after the comma). The default value is 0.
|
||
isIgnoreNulls |
Boolean |
No |
The default value is true. If true that between Calculated Type records will be selected minimum discount except for 0 discounts. The result will be 0 if all Calculated Types are 0.
|
||
items |
Array |
Yes |
At least one item must be provided. |
||
items[i].calculationType |
String |
No |
The value from the External ID field of the Calculation Type record. |
||
items[i].type |
Enum |
Yes, if there is no items[i].calculationTypes |
Embed next-level procedures. Using the same format as presented in this table. |
||
items[i].item |
Array |
Examples
-
Standard Procedure: MULT
Click to view
{ "type": "procedure", "basePrice": "$.listPrice", "resultPrice": "$.unitPrice", "procedure": { "type": "MULT", "items": [ { "calculationType": "structural" }, { "calculationType": "contract" } ] } } -
Standard Procedure: MULT (with rounding)
Click to view
{ "type": "procedure", "basePrice": "$.listPrice", "resultPrice": "$.unitPrice", "procedure": { "type": "MULT", "round": "item", "roundTo": 4, "items": [ { "calculationType": "structural" }, { "calculationType": "contract" } ] } } -
Standard Multi-level Procedure
Click to view
{ "type": "procedure", "basePrice": "$.listPrice", "resultPrice": "orders__UnitPriceWithoutVAT__c", "procedure": { "type": "MULT", "round": "item", "roundTo": 4, "items": [ { "calculationType": "structural" }, { "calculationType": "contract" }, { "type": "MAX", "items": [ { "calculationType": "season" }, { "calculationType": "promo_percent" }, { "calculationType": "promo_amount" } ] } ] } }