Skip to main content

Operators

Operators are used to write conditions.

Operator

Meaning

Comment

>

Greater than

>=

Greater than or equal to

<

Less than

<=

Less than or equal to

=

Equal to

!=

Not equal to

!

Not

&

And

|

Or

?

List <parameter> ? "<list name>"

+

Add

Extended conditions only

-

Subtract

Extended conditions only

*

Multiply

Extended conditions only

/

Divide

Extended conditions only

Tip

  • When using only &-operators in an expression, all expressions must be true for the entire expression to be true.

    Example:

    tocountry = "SE" & fromcountry = "SE"

  • When using only |-operators in an expression at least one of the expressions must be true for the entire expression to be true.

    Example:

    tocountry = "SE" | tocountry = "DK" | tocountry = "FI"

  • Always use excluding conditions in for example, a price list. Otherwise it's the order that decides.

    Example:

    cartprice >= 500.0

    cartprice < 500.0

  • Use parentheses to decide in which order expressions should be evaluated to render the expected result.

    Example:

    weight <=20.0 & tocountry = "SE" | tocountry = "DK"

    results in

    weight = 40.0 and tocountry=DK is true

    weight = 10.0 and tocountry=DK is true

    while

    weight <=20.0 & (tocountry = "SE" | tocountry = "DK")

    results in

    weight = 40.0 and tocountry=DK is false

    weight = 10.0 and tocountry=DK is true

  • Instead of creating new parameters or having to write long and complicated expressions you can use ! and != to invert boolean expressions.

    Example:

    !B2B is true if B2B is false

    tocountry != "SE" is true if tocountry is not SE

  • Use condition lists to evaluate against a large amount of values, for example, zip codes.

    Example:

    tozipcode ? "zipcodes_in_gbg_sthlm"