Table of Contents
Number Compare Condition
Table of Contents
The condition Number Compare checks if a specific metadata field contains a number that is less than, less than or equal, equal, greater, or greater or equal to a specific value, e.g., Check weather the resolution is greater than or equal to 300 dpi to meet the website requirements before pushing content to the website (handled via separate integration).
A field value of 20 in this condition means value: 20 and mode: equals. The Business Rule triggers at this moment: e.g., check if the amount sold is 100, then apply the discount flag. Number compare works for Geo Points but requires two conditions (one for lat, one for lon).
Triggers when a number field value has the defined value. It can be useful to check prices, quantities sold, or users logged in (if tracked in numeric fields).
Specific definitions,
Select the condition and provide the values.
| Property | Value |
|---|---|
| kind | NumberCompareCondition |
| fieldpath |
layerId.fieldId Details on accessing field values, specifically, fieldpath starts lowercase Supports JSONPath syntax; you can test it here: https://jsonpath.com. |
| value | Provide a number value, a whole number, or a decimal to check against. |
| mode |
Select the mode that mirrors mathematical expressions.
Enum: "LessThan," "LessThanEqual," "Equal," "GreaterThanEqual," "GreaterThan" |
Were 100 products sold?
{
"kind": "NumberCompareCondition",
"value": 20,
"fieldPath": "products.amountSelled",
"mode": "GreaterThanEqual"
}