Order Management Rules (OMR) Available Functions (Expressions) [Information]

Modified on Mon, 17 Mar at 9:35 AM

When working with Order Management Rules (OMR)especially with low-level variables that access specific data points within the system, you may need auxiliary functions (or expressions) to process data before assigning them to variables. This article serves as a reference for those functions.


NOTE: This list includes only common functions. For more details, refer to: 


All functions use the syntax @(function-name)For example: @(truncate(ShipToName, 3))


Functions can be nested. For example: @(trim(replace([Order.ShipToPhone], '+1','')))


WARNING: Function names are case-sensitive. Ensure you use the correct capitalization when invoking functions.


The following table lists available functions in alphabetical order:


SIGNATURE
EXAMPLES
SYNTAXPARAMETERSINVOCATIONEXECUTION
RESULT
replace(
string,
old,
new)
string – The original string
old – The substring to be replaced
new 
– The replacement string
@(replace([Order.City],
'NYC', 'LAX'))
@(replace(
'Lorem ipsum',
'ipsum', 'dolor'))
Lorem dolor
@(replace(
'Lorem ipsum',
' ipsum', ''))
Lorem 
trim(
string)
string – A string with leading or trailing white spaces@(trim([Order.ShipToPhone]))@(trim('  text '))text
truncate(
string,
position)
string – The text to truncate
position 
– Character position to truncate from
@(truncate(ShipToName, 3))@(truncate('Lorem ipsum',
3))
Lor


A special case is concatenation, which uses the + operator to combine strings. For example:



EXAMPLES
SYNTAXINVOCATIONEXECUTION
RESULT
stringA+stringB
@(@([CustomFields.CivName])+@([CustomFields.OrigFromComp]))@('Lorem '+'ipsum')
Lorem ipsum


NOTE: If you need to escape a character in any function, just use it as a string. For example: if ShipToName is John@('@'+ShipToName) will return @John.

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 at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article