Step Conditions

Each step’s item will be calculated only if the conditions of the step are met or if there are no conditions for the step.

Condition Level Keys

Key Type Required Comment

operator

Enum

Yes

Available values:

  • AND

  • OR

items

Array

Yes

At least one item of the Condition Level or Condition Level Item object must be provided.

Condition Level Item keys

Key Type Required Comment

field

String

Yes

The value in the object key to check. See Available Field Formats.

operator

Enum

Yes

Available operators depending on the field data type.

value

Boolean

No

Target values for fields with the Boolean data type.

Number

Target values for fields with the Currency and Number data type.

String

Target values for fields with the Text data type.

The key is required if "operator" != "in" or "operator "!= "notIn".

values

Array

No

Target values for fields with the Text data type.

  • The key is required if "operator" == "in" or "operator "== "notIn".

  • At least one item is required.

Condition Operators

Check which operators can be used with the available field data types.

The in and notIn keys must contain multiple values separated by commas.

Field Data Type

Operator

contain

notContain

in

notIn

equal

notEqual

greater

greaterOrEqual

less

lessOrEqual

Currency

No

No

No

No

Yes

Yes

Yes

Yes

Yes

Yes

Number

No

No

No

No

Yes

Yes

Yes

Yes

Yes

Yes

Text

Yes

Yes

Yes

Yes

Yes

Yes

No

No

No

No

Value in the Object Key

Value CT Orders Object

procedure

Delivery Line Item

setValue

a value in the object key

rollUp

a value in the object key

drillDown

a value in the object key

Examples

  • Standard AND condition:

    Click to view
    {
        "operator": "AND",
        "items": [
            {
                "field": "orders__ManualDiscount__c",
                "operator": "greater",
                "value": 0
            },
            {
                "field": "CTCPG__ParentProductExternalId__c",
                "operator": "in",
                "values": [
                    "40011",
                    "40312"
                ]
            }
        ]
    }
  • Standard OR condition:

    Click to view
    {
        "operator": "OR",
        "items": [
            {
                "field": "orders__ManualDiscount__c",
                "operator": "greater",
                "value": 0
            },
            {
                "field": "CTCPG__PromotionId__c",
                "operator": "notEqual",
                "value": ""
            }
        ]
    }
  • Standard complex condition:

    Click to view
    {
        "operator": "AND",
        "items": [
            {
                "field": "orders__ManualDiscount__c",
                "operator": "greater",
                "value": 0
            },
            {
                "operator": "OR",
                "items": [
                    {
                        "field": "CTCPG__PromotionId__c",
                        "operator": "notEqual",
                        "value": ""
                    },
                    {
                        "field": "CTCPG__PromotionId__c",
                        "operator": "notEqual",
                        "value": ""
                    }
                ]
            }
        ]
    }
``