When creating OMR rules, you can set these up through three different ways:
- Through the User Interface as described in Order Management Rules (OMR) [Step-by-Step Guide] and How to set up Portal Global OMR rules [Step-by-step guide]
- By exporting and importing previously existing rules as described in How to Export and Import OMR rules [Step-by-step guide]
- By exporting or creating from scratch and importing rules, as detailed in this article
This article focuses on specifying the syntax to edit or create OMR scripts.
Feel free to follow the step-by-step guide written below or the video guide, as you prefer:
For tangibility purposes, we'll review the following case.
We're setting a rule that solves the following scenario:
We have orders that go through FedEx by default, but should be switched to UPS indicating that they should not be left at the door. The conditions to switch these orders are those that are shipped to the State of California or Texas in the US, the Total Value is over 100 Dollars, they weight more than 15 KG and have been previously assigned to FedEx.
This requirement would translate into a rule defined like this:
And when exported, the syntax used in the file will be as follows:
[Rule1]
Trigger=Import
Level=Order
Condition1=State in CA,TX
Condition2=Total value > 100
Condition3=@([Order.OriginalWmsServiceCode]) = FEDEX
Condition4=Country = US
Condition5=Total weight (KG) > 15
Action1=Instruction = Do not leave at door
Action2=SCAC = UPS
Having analyzed the three stages, we see that the rules will use the following syntax:
[Name of the rule, can be used as reference in the script]
Trigger=[Import or Process, depending on the case]
Level=[Order or Line, depending on the case]
Condition1=[Parameter][Space][Operator][Space][Value(s)]
Condition#(...)
Action1=[Action Name, as from the dropdown in the UI][Space][Operator][Space][Value(s)]
Action#(...)
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article