Conditions Utility
Currency
), an operator (for example: equals
), and a value (for example: EUR
).
Outputs
Operator | Description | Example |
---|---|---|
Equal | The value passed in must be equal to the value set up in the condition. | ”Currency equals ‘EUR’” or “Order status equals ‘CONFIRMED‘“ |
Not equal | The value passed in must be different to the value set up in the condition. | ”City does not equal ‘test’” or “Product category does not equal ‘gift card‘“ |
Greater than or equal | The value passed in must be greater than or equal to the value set up in the condition. | ”Amount is greater than or equal to 100” or “discount amount is greater than or equal to 15** |
Less than or equal | The value passed in must be less than or equal to the value set up in the condition. | ”Risk score is less than or equal to 50” or “quantity is *less than or equal** to 10” |
One of | If multiple options are set up, either one will be accepted to follow the route for this condition. | ”Currency is one of EUR, GBP, USD” will evaluate to true for GBP, but not for NOK. |
Not one of | If multiple options are set up, any one will stop the route from being followed for this condition. | ”Currency is not one of EUR, GBP, USD” will follow NOK payments, but not EUR, GBP, or USD. |
Between | Evaluates if a numeric value is between two other values. The range is inclusive of the values entered. | ”Amount is between 30 and 90” or “risk score is between 51 and 100” |
Contains | The value set up in the condition must be part of the variable it’s compared with. | ”Email contains ‘@primer.io’” or “Product title contains ‘test product‘“ |
Does not contain | The value set up in the condition must not be part of the variable it’s compared with. | ”Statement descriptor does not contain ‘Authorization’” or “Discount code does not contain ‘XMAS‘“ |
Is empty | Checks if the field set up in the condition has no value assigned to it or is missing. Good to know: For string values this could be an empty text or a null value, while for numbers “0” counts as not empty. | ”Cancellation reason is empty” or “Zip code is empty” |
Is not empty | Checks if the field set up in the condition is not missing and has a value assigned to it. Good to know: For string values this could be any value, while for numbers this includes “0”. | ”Mobile phone number is not empty” or “Customer note is not empty” |
Operators
Dropdown
metadata
field attached to the Client Session when creating a payment. This field is used to send additional information with the payment outside of the available fields from the Payments API. This can also be used to attach information to create routes on, like custom risk scores or customer account status.
When using metadata for routing, make sure to specify the full path like in the example here.
Metadata
AND
) by default, meaning that if there are three conditions set up, like Amount
>100, Currency
=EUR, Payment Type
=UNSCHEDULED, then all three need to be fulfilled for the path to be followed during workflow execution.
Grouped Conditions
OR
evaluation. In this example, a blocking route is created evaluating if a payment uses certain e-mail addresses or if a custom flag with the value “BLOCK” is sent in.
Using OR
(A AND B) OR (C) OR (D AND E) OR (F AND G AND H)
.
It is not possible to nest these groups further, but the ability to use trigger conditions, multiple condition builders, and multiple routes already gives you a lot of opportunity for complex branching.
Test Route
else
path, creating a route that is set up more generic than the specialized routes above, or could also be left empty. If left empty and the Workflow Run reaches this condition, the workflow will still end with Completed
as the workflow ended without a failure.
Duplicate conditions
Trigger Conditions