Review Rules Editor

Review Rules Editor

Review Rule Editor

The Editor

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


  1. Select box used to change the current rule
  2. Display name of the rule ( this will be what will be reported when validation fails) Disabled after save
  3. Description of rule (this is also displayed in the error)( setting this to empty will delete the line or not save)
  4. Button to toggle whether or not the rule is enabled 
  5. Expression used to validate the order ( see Expression below for information)
  6. Errors when parsing the expression field are listed here (save button is disabled when errors exist)
  7. Expansion data used for developers to view compiled query code
  8. 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
  1. BillTo.PostalCode is not ShipTo.PostalCode
  2. 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
  1. 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
  1. BillTo.PostalCode is not ShipTo.PostalCode
    1. ShipTo.PostalCode equals "60623"
    2. 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













    • Related Articles

    • Review Rules

      SDI has default rules to flag orders for review. Additional rules may be added per client. Once reviewed, the order may be resubmitted with the tag #ReviewPass in the internal notes field. Any order with this tag will bypass additional review ...
    • TOSV Format

      What is the format the TOSV format is a human readable way of communicating data between systems its based of of tab separated data  and can be used in csv based editors and can be copied and pasted between systems without needing to export Why was ...