Retailys language
Supported Literals¶
strings - single and double quotes (e.g.
'hello')numbers - e.g.
103arrays - using JSON-like notation (e.g.
[1, 2])hashes - using JSON-like notation (e.g.
{ foo: 'bar' })booleans -
trueandfalsenull -
nullexponential - also known as scientific (e.g.
1.99E+3or1e-2)
Supported Operators¶
Arithmetic Operators¶
+(addition)-(subtraction)*(multiplication)/(division)%(modulus)**(pow)
Bitwise Operators¶
&(and)|(or)^(xor)
Comparison Operators¶
==(equal)===(identical)!=(not equal)!==(not identical)<(less than)>(greater than)<=(less than or equal to)>=(greater than or equal to)matches(regex match)
Logical Operators¶
notor!andor&&oror||
String Operators¶
~(concatenation)
Array Operators¶
in(contain)not in(does not contain)
Example: condition for display for sales channels only 1, 4, 8
%channelId% in [1,4,8]Numeric Operators¶
..(range)
Ternary Operators¶
foo ? 'yes' : 'no'foo ?: 'no'(equal tofoo ? foo : 'no')foo ? 'yes'(equal tofoo ? 'yes' : '')
Built-in Objects and Variables
Objekt %user%
%user.id% - the identifier of the logged in user
%user.language% - the language code of the logged in user
Last updated
Was this helpful?