Limit Rule: ApplyCondition__c Field Specification

If the condition from the orders__ExceptionCondition__c field is not met, the system checks the orders__ApplyCondition__c field.

  • If this field contains the condition, the limit rule will be applied to certain products in the delivery, delivery group, or order according to the parameters in the appropriate Limit Rule records.

  • Otherwise, the limit rule will be applied to all products in the delivery, delivery group, or order according to the parameters in the appropriate Limit Rule records.

Example:

   {"applyCondition":{
      "operator":"AND",
      "items":[
         {
            "field":"ProductId__r.Brand__c",
            "operator":"equal",
            "value":"Brand1"
         },
         {
            "field":"orders__DeliveryId__r.Warehouse__c",
            "operator":"equal",
            "value":"Warehouse1"
         }
      ]
   }
}

Use the $.deliveryOrder operator to refer to certain index of the delivery in the order (0, 1, 2 etc.) or max as the last delivery. You can use the following operators:

  • less

  • greater

  • lessOrEqual

  • greaterOrEqual

  • equal

  • notEqual

Example:

{
  "applyCondition": {
    "operator":"AND",
    "items": [
      {
        "field":"orders__ProductId__r.CTCPG__Brand__c",
        "operator":"equal",
        "value":"Second Brand"
      },
      {
        "field":"$.deliveryOrder",
        "operator":"greater",
        "value":0
      }
    ]
  }
}
``