Docs/Merchants/Workflows & Timers
Workflow conditions
A condition step checks something about the run, such as how many points were earned or which timer went off, and sends the workflow down one of two paths: True or False. It's how one workflow can treat customers differently: a bigger thank-you for a bigger order, a reward only for one specific activity, or a scheduled job for one specific timer. Everything a condition can check comes from the trigger and the steps before it.
How a condition step works
- A condition step holds one or more conditions. Each condition compares a variable, a value from the trigger or an earlier step, with a value you set, using an operator such as Equals or Greater than.
- Logical Operator decides how the conditions combine. AND: all of them must be true. OR: at least one must be true.
- When a run reaches the step, Toki checks the conditions and continues along the True path if the result is true, or the False path if it isn't.
- Each path can lead to an action or to another condition step. A path with nothing connected simply ends the run.
For what variables are and how the variable picker works, see Workflow triggers.
Add a condition step
- In the Toki app, click Workflows in the left navigation and open a workflow, or click New Workflow and pick a trigger.
- Hover over the step the condition should follow and click the + button under it. Choose Add Condition.
- Toki places a step called Condition on the canvas, connected to the step above. It reads "No conditions configured" until you set it up.
- Hover over the new step and click the edit icon to open it.
Set up the conditions
Inside the step:
- Set Logical Operator to AND (all conditions must be true) or OR (at least one condition must be true). With a single condition, either one works.
- Click Add Condition. A card labeled Condition 1 appears. Click again for Condition 2, and so on.
- Under Variable, click Select variable and pick the value to check. Toki fills the field with the variable's name. In a condition, the name stands on its own, without the curly braces you see in email and other text fields.
- Pick an Operator. The list adapts to the variable you picked: numbers offer Greater than, text offers Contains, and so on. If you see the full list, use the table below to choose one that fits the kind of value.
- Enter the Value to compare against. For a true/false variable, Value is a dropdown with true and false. For a timer, activity, or segment, it's a list of your own items (see below).
- To remove a condition, click the trash icon in its card (Remove condition).
- Click Save to keep the step, or Cancel to leave it as it was. Then save the workflow.
A new condition starts as Greater than with a value of 0. Change both to fit your variable.
Once saved, the step on the canvas lists each condition in plain words, for example "Points Amount Greater than 100", with "and" or "or" between them.
| Field | What it does |
|---|---|
| Label | The name shown on the step in the canvas. Starts out as Condition. |
| Logical Operator | How the conditions combine: AND (all must be true) or OR (at least one must be true). |
| Variable | The value to check. Use Select variable, or type the variable's name. |
| Operator | How to compare. The options depend on the kind of value. |
| Value | What to compare against: a number, text, true/false, or an item picked from a list. |
| Description | A short note shown under the label on the step. |
Operators
| Kind of value | Operators |
|---|---|
| Any value | Equals, Not equals |
| Numbers (such as Points Amount) | Greater than, Greater or equals, Less than, Less or equals |
| Text (such as Customer Email) | Contains, Does not contain, Starts with, Ends with, Like (pattern match), Not like (pattern match) |
A few details worth knowing:
- Equals, Contains, Starts with, and Ends with match capital and lowercase letters exactly. "Gold" is not the same as "gold".
- Like (pattern match) compares the whole value against a pattern and ignores the difference between capital and lowercase letters. In the pattern,
%stands for any number of characters, including none, and_stands for exactly one character. For example,summer%matches "Summer Sale" and "summer2025", and%@gmail.commatches any Gmail address. Not like (pattern match) is true when the pattern does not match.
Pick a timer, activity, or segment
Some variables identify one of your own items. For these, the Value field becomes a searchable list, so you never have to look up an ID:
| Variable | Where it comes from | What you pick |
|---|---|---|
| Timer Id | The Timer Triggered trigger | A timer, in the Timers field ("Select a timer"). |
| Activity Id | Triggers such as Activity Completed and Reward Created | An activity, in the Activities field ("Select an activity"). Inactive activities are listed too. |
| Segment Id | Triggers such as Segment Unlocked, Segment Lost, and Segment Reminder | A segment, in the Segment field ("Select a segment"). |
Use Equals with these, so the step is true only for the item you picked. If a timer or segment you picked has since been deleted, the field shows "Timer was removed" or "Segment was removed" so you know to pick another.
Connect the True and False paths
A condition step has two connection points at the bottom: True on the left (green) and False on the right (red).
- Hover over the step. Each path that isn't connected yet shows its label and a + button.
- Click the + under True or False and choose Add Condition or Add Action. The new step appears below, and the connection line carries a True or False label so you can read the canvas at a glance.
- To connect a path to a step that already exists, drag from the True or False point to the top of that step.
- To remove a connection, hover over it and click the trash icon (Delete connection).
You don't have to use both paths. Leave False empty if nothing should happen for customers who don't match, or give it its own action, such as a different message. You can also chain condition steps: put a second condition step on the True path of the first to narrow the rule further.
Examples
| You want to | Trigger | Condition | On the True path |
|---|---|---|---|
| Thank customers who earn a lot of points at once | Points Earned | Points Amount Greater or equals 500 | Send Email |
| React to one specific activity | Activity Completed | Activity Id Equals the activity you pick | Grant Reward |
| Welcome customers who join one segment | Segment Unlocked | Segment Id Equals the segment you pick | Send Push Notification |
| Run a scheduled job for one timer only | Timer Triggered | Timer Id Equals the timer you pick | Any action. See Timers. |
Check which path a run took
Save the workflow and click Test to run it for a customer you choose. In the run's details, only the steps that actually ran are listed, so the cards after the condition step tell you which path the run followed. See Workflow test runs and execution history.
Related
- Workflows: the Workflows page, the canvas, Draft and Active, saving and deleting.
- Workflow actions: the steps you connect to the True and False paths.
- Workflow triggers: what variables are, and which values each trigger makes available to your conditions.
- Timers: create timers and use a Timer Id condition to react to one of them.
- Workflow test runs and execution history: run a workflow for a customer you pick and see which path it took.
- Segments: the segments you can pick in a Segment Id condition.