Review Rule Editor
The Editor
The editor is used to edit existing review rules and to add new review rules.

- Select box used to change the current rule
- Display name of the rule ( this will be what will be reported when validation fails) Disabled after save
- Description of rule (this is also displayed in the error)( setting this to empty will delete the line or not save)
- Button to toggle whether or not the rule is enabled
- Expression used to validate the order ( see Expression below for information)
- Errors when parsing the expression field are listed here (save button is disabled when errors exist)
- Expansion data used for developers to view compiled query code
- Button to add new Review Rule
Expressions
Expressions are comprised of 3 parts, A left (property) a middle(operator) and a right(value).
Expressions must use double quotes " instead of single quotes '
Spaces are currently not supported in the property field (right)
Tabs are used when grouping and/or expressions
Every new line is implied as an and by default to change this use the or word with a space after it
Examples
Billing Postal Mismatch New Order
- BillTo.PostalCode is not ShipTo.PostalCode
- Order.CreatedOn is FirstOrderDate
this expression is translated to the following sentence "billing postal code is not shipping postal code and order creation date first order date (ex this is the customers first order)
Charged To A Different Country
- BillTo.CountryCode is not IpCountry
this expression fails the order if it is created from a different country than the one on the billing method
Fraud Postal Codes
- BillTo.PostalCode is not ShipTo.PostalCode
- ShipTo.PostalCode equals "60623"
- or ShipTo.PostalCode equals "60651"
do note the Tab here on the second and third line
the following expression is translated to "billing postal code is not shipping postal code and ( shipping postal code equals 60623 or shipto postal code equals 60651 ) "
Allowed Properties
Listed below are the allowed properties for the expression
Property
| Description
| Example
|
IpCountry
| the country where the order was placed
| Usa
|
FirstOrderDate
| the date of the customers first order
| 15/09/07 08:45:00 +1:00
|
IpAddress
| The Ip Address of device that placed the order
| 125.107.75.42
|
Order.CreatedOn
| Date the order was created
| 15/09/07 08:45:00 +1:00
|
Order.Value
| Value of the order in store in external currency
| 500
|
Order.ShippingMethodCode
| External shipping method
| FedEx (Ground Home Delivery)
|
Order.ShippingCarrierCode
| Sdi Carrier code
| UPS
|
Order.PaymentMethod
| external payment method
| Credit Card
|
Order.Notes
|
|
|
Order.CustomerId | Customer identitifaction | 12345 |
Order.Source
| source property on external integration
| BigCommerce
|
Customer.Name
|
|
|
Customer.Email
|
|
|
Customer.Phone
|
|
|
Customer.Notes
|
|
|
ShipTo.CompanyName
|
|
|
ShipTo.ContactName
|
|
|
ShipTo.Address1
|
|
|
ShipTo.Address2
|
|
|
ShipTo.City
|
|
|
ShipTo.Region
|
|
|
ShipTo.PostalCode
|
|
|
ShipTo.CountryCode
|
|
|
ShipTo.StateCode
|
|
|
BillTo.CompanyName
|
|
|
BillTo.ContactName
|
|
|
BillTo.Address1
|
|
|
BillTo.Address2
|
|
|
BillTo.City
|
|
|
BillTo.Region
|
|
|
BillTo.PostalCode
|
|
|
BillTo.CountryCode
|
|
|
BillTo.StateCode
|
|
|
Allowed Operations
Operations that can be used in the expression
Operation
| Description
| Example
|
starts with
| Checks the beginning of the property
| Customer.Email starts with "ben"
|
ends with
| Checks the end of the property
| Customer.Email ends with ".com"
|
is less than
| left is less than right
| Order.Value is less than 50
|
is greater than
| left is greater than right
| Order.Value is greater than 50
|
is greater than or equal to
| left is greater than or equal to right
| Order.Value is greater than or equal to 50
|
is less than or equal to
| left is less than or equal to right
| Order.Value is less than or equal to 50
|
contains
| left contains right
| Customer.Email contains "mal"
|
match
| left regex matches right
|
|
contains any
| left contains right
| BillTo.PostalCode contains any ["83701","83706"]
|
is
| left is right
| 1 is 1
|
is not
| left is not right
| 1 is not 2
|