Rule Object


A rule defines the fee that is applied when specific conditions (also defined by the rule) are met. You can use a rule to apply a service fee to a restaurant order.

Properties
appIdstringformat GUID

Defines the app that the rule is connected to.


One Of

conditionConditiondeprecated - use conditionOptions instead

Single condition that must be met for the rule to be applied to an order.


conditionTreeConditionTreedeprecated - use conditionTreeOptions instead

Binary tree of conditions. Use the operator to indicate whether only one or both conditions must be met in order for a service fee rule to be applied to an order.


conditionsTypestringdeprecated - use conditionType instead

Specifies the type of condition.


conditionTypestring

Specifies the type of condition.


One Of

conditionOptionsCondition

Single condition that must be met for the rule to be applied to an order.


conditionTreeOptionsConditionTree

Binary tree of conditions. Use the operator to indicate whether only one or both conditions must be met in order for a service fee rule to be applied to an order.


createdDatestringRead-onlyformat date-time

Date and time the rule was created.


enabledboolean

Whether the rule is enabled. If true, the rule is evaluated when service fees are calculated. If false, the rule will not be evaluated when service fees are calculated.


extendedFieldsExtendedFields

Data Extensions


idstringRead-only

Rule ID.


labelstringdeprecated - use appId insteadmaxLength 100minLength 1

DEPRECATED. Defines the app that the rule is connected to.


locationIdstringformat GUID

Business location ID (SDK | REST) of the rule.


namestringmaxLength 50minLength 1

Rule name.


One Of

fixedFeeMoney

Fixed fee. Must hold a positive value.


percentageFeestringdecimalValue {"maxScale":2,"gte":"0","lte":"100"}

Percentage fee. For example, 5 represents a 5% fee applied to the order's total.


revisionstringRead-onlyformat uint64

Revision number. Increments by 1 each time the rule is updated. To prevent conflicting changes, the existing revision must be used when updating a rule.


roundingStrategystring

Rounding strategy to apply to fee and tax calculation.


tagsTags

Tags (SDK | REST) used to classify and sort different types of rules.


One Of

customTaxRatestring

Percentage value to apply as a custom tax rate. Range: [0-100].


taxGroupIdstringformat GUID

Tax group ID. Internal only.


taxRatestringdeprecated - use taxes insteaddecimalValue {"maxScale":2,"gte":"0","lte":"100"}

Percentage value to apply as a custom tax rate. For example, 5 represents a 5% fee applied to the order's total.
Min: '0'.
Max: 100.


updatedDatestringRead-onlyformat date-time

Date and time the rule was updated.


One Of

amountMoneydeprecated - use fixedFee instead

Fixed fee. Must hold a positive value.


percentagestringdeprecated - use percentageFee insteaddecimalValue {"maxScale":2,"gte":"0","lte":"100"}

Percentage fee. For example, 5 represents a 5% fee applied to the order's total.

Did this help?