How to write or edit OMR Scripts (Syntax) [Information]

Modified on Mon, 24 Apr 2023 at 09:50 AM

When creating OMR rules, you can set these up through three different ways:



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#(...)

NOTE: The Name of the rules will be lost once Imported, when exported they will display as [Rule #], but you can still keep track of which rule is which in your original file.


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article