Retailys language
Last updated
Was this helpful?
Last updated
Was this helpful?
strings - single and double quotes (e.g. 'hello'
)
numbers - e.g. 103
arrays - using JSON-like notation (e.g. [1, 2]
)
hashes - using JSON-like notation (e.g. { foo: 'bar' }
)
booleans - true
and false
null - null
exponential - also known as scientific (e.g. 1.99E+3
or 1e-2
)
+
(addition)
-
(subtraction)
*
(multiplication)
/
(division)
%
(modulus)
**
(pow)
&
(and)
|
(or)
^
(xor)
==
(equal)
===
(identical)
!=
(not equal)
!==
(not identical)
<
(less than)
>
(greater than)
<=
(less than or equal to)
>=
(greater than or equal to)
matches
(regex match)
not
or !
and
or &&
or
or ||
~
(concatenation)
in
(contain)
not in
(does not contain)
Example: condition for display for sales channels only 1, 4, 8
..
(range)
foo ? 'yes' : 'no'
foo ?: 'no'
(equal to foo ? foo : 'no'
)
foo ? 'yes'
(equal to foo ? 'yes' : ''
)
%user.id% - the identifier of the logged in user
%user.language% - the language code of the logged in user