Limit Rule: ExceptionCondition__с Field Specification
The orders__ExceptionsCondition__c field contains the condition that this limit rule does not apply to the specified order, delivery, or delivery group. If the condition is not met, the system checks the orders__ApplyCondition__c field.
The JSON syntax:
-
productCount stores the condition to not apply the limit rule.
-
filter defines the Delivery Line Item records for calculating a unique number of products. If the value is 0, the condition will not be applied.
-
minCount is a minimum quantity of unique products that are found according to the filter. Starting this quantity, the limit rule will not be applied.
Use the AND operator to check minCount for all listed products, or use the OR operator if at least one product must meet minCount.
-
-
requiredProducts specifies the mandatory products from the founded according to the filter.
-
productIdField is the product unique ID to search the required product. If set, the ExternalId__c value is used for products with minCount. Otherwise, the product identifier from the orders__ProductId__c field is used.
-
productQuantityField stores the field API name from the Order Line Item object that stores the product quantity.
-
items specifies list of products required to be added to order cart.
-
product is the product identifier from the orders_ProductId__c or ExternalId__c (if specified) field.
-
minQuantity specifies the product minimum quantity.
-
$.deliveryOrder specifies 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:
{
"exceptionsCondition": {
"operator": "AND",
"productCount": {
"filter": {
"operator": "AND",
"items": [
{
"field": "orders__OrderLineItemId__r.RecordType",
"operator": "equal",
"value": "Freebie"
},
{
"field": "ProductId__r.Brand__c",
"operator": "equal",
"value": "Brand1"
},
{
"field": "$.deliveryOrder",
"operator": "equal",
"value": 0
}
]
},
"minCount": 1
},
"requiredProducts": {
"productQuantityField": "order__Quantity__c",
"productIdField": "ProductId__c",
"operator": "AND",
"items": [
{
"product": "400111871051795M79",
"minQuantity": 5
}
]
}
}
}