Docs/Merchants/Workflows & Timers
Workflows
A workflow is an automation you draw on a canvas: something happens in your loyalty program, and Toki handles the follow-up for you. A customer unlocks a tier and gets a congratulations email. A customer earns points and, if it's a big order, gets a bonus reward. A timer goes off and an activity switches on for launch day. You build it once, set it to Active, and it runs for every customer it applies to.
The three kinds of steps
Every workflow is made of steps connected on a canvas. There are three kinds. The app sometimes calls a step a "node", so you'll see that word in a few messages.
Trigger. The moment that starts the workflow, such as Points Earned, Membership Unlocked, or Timer Triggered. Every workflow has exactly one trigger, and it's always the first step. See Workflow triggers.
Condition. A check that splits the workflow into a True path and a False path, so one workflow can treat customers differently based on the points amount, the tier, or another detail of the run. See Workflow conditions.
Action. A step that does something: send an email or a wallet push, add or subtract points, grant a reward, create a gift card, pause for a while, and more. See Workflow actions and Create Gift Card workflow action.
The Workflows page
In the Toki app, click Workflows in the left navigation. The Workflows page lists every workflow in your store.
| Column | What it shows |
|---|---|
| Name | The workflow's name. Click the row to open it. |
| Status | Active or Draft. Only Active workflows run. |
| Created | When the workflow was first saved. |
| Updated | When it was last saved. |
| Last Run | Date and time of its most recent run, or "-" until it runs for the first time. |
Type in Search workflows to find a workflow. The list shows 10 workflows per page; use the arrows under the list to move between pages.
Before you create your first workflow, the page shows "Create your first workflow" with a New Workflow button.
Plan availability
Workflows are part of Toki's paid plans. On a plan without Workflows, the Workflows page shows "This option is available with one of our paid plans" with a link to Billing, and the New Workflow button stays inactive until you switch plans. Open Billing anytime to compare plans.
Create a workflow
- In the Toki app, click Workflows in the left navigation, then click New Workflow.
- The empty canvas shows "Start Your Workflow". Click Select Trigger, type in Search triggers... to narrow the list, and click the trigger you want. It appears on the canvas as the first step.
- Hover over the trigger and click the + button under it. Choose Add Condition or Add Action. Repeat under each new step until the workflow does what you want.
- Hover over a step and click the edit icon to open it. Fill in its fields and click Save to close it.
- On the right, under Workflow Details, enter a Workflow name. The Description is optional.
- Under Status, leave Workflow status on Draft while you're still working, or set it to Active if the workflow is ready to run.
- Click Save in the bar at the top.
Toki shows "Workflow created" and opens the workflow's own page. Its title is the workflow name with an Active or Draft badge, and the Test, Export, and Delete buttons appear at the top. Workflows at the top takes you back to the list.
The New Workflow page also has an Import button, which rebuilds a workflow from an export. See Export and import a workflow.
Work on the canvas
The canvas takes up the left side of the page. Steps flow from top to bottom, starting with the trigger. Each step shows its label and a short summary of its setup, such as the conditions it checks or "Email configured".
Add and connect steps
- Hover over a step to see the + button under it. It offers Add Condition and Add Action, and the new step is placed below and connected for you. The + button shows only while that step has nothing connected below it.
- A condition step has two + buttons: True on the left and False on the right. Connections from them are labeled True and False on the canvas.
- To connect two existing steps, drag from the dot at the bottom of one step to the dot at the top of the other.
- Connections always flow forward. The canvas only accepts a connection that leads to a step further down the chain, so a workflow never loops back on itself.
- Drag a step to move it. Use the buttons in the corner of the canvas to zoom in, zoom out, or fit the whole workflow on screen.
Edit a step
Hover over a step and click the edit icon. The step editor opens over the canvas. Every step has a Label, the name shown on the canvas, and a Description. The rest of the fields depend on the step: the trigger type, the conditions to check, or the action and its settings. The Handle field is an advanced option; leave it as it is unless we've set something up with you.
Click Save to keep your changes to the step, or Cancel to leave it as it was. Then save the workflow.
Delete steps and connections
- Hover over a condition or action step and click the trash icon. Its connections go with it. You can also click a step to select it and press the Delete key.
- Hover over a connection and click the trash icon (Delete connection), or select the connection and press Delete.
- The trigger stays. If you try to delete it, Toki shows "Cannot delete trigger node". To start the workflow from a different moment, open the trigger and change its Trigger Type instead.
Fix connections that point at a deleted step
If a connection points at a step that no longer exists, a warning button with a number appears in the top-right corner of the canvas. Click it to see those connections. Click one to remove just that connection, or click Remove all broken connections to clear them all at once. Then save the workflow.
Active and Draft
The Status card on the right holds the Workflow status field.
| Status | What it means |
|---|---|
| Active | "This workflow is currently active and will process events." Each time the trigger happens, the workflow runs. |
| Draft | "This workflow is in draft mode and will not process events." The workflow is saved and you can keep editing it, but it sits still. |
New workflows start as Draft. Switch to Active when you're ready and save. You can switch back to Draft the same way, for example to pause a seasonal workflow without deleting it. The status shows as a badge next to the workflow name and in the Status column of the list.
Save your changes
As soon as you change anything, a save bar appears at the top of the page with Save and Discard. Discard returns the workflow to its last saved version. You can also press Cmd+S (Mac) or Ctrl+S (Windows) to save. If you try to leave the page with unsaved changes, Toki asks you to confirm first.
Before saving, Toki checks the workflow. If something needs attention, it tells you what:
| Message | What to do |
|---|---|
| "Workflow name is required" | Enter a Workflow name under Workflow Details. |
| "Please add at least one node to the workflow" | Pick a trigger with Select Trigger so the canvas has a first step. |
| "Please select action type for all action nodes" | Every action step needs an Action Type. The steps that need one are outlined in red. Open each one, pick an action, and save the step. |
When the save goes through, Toki shows "Workflow created" for a new workflow or "Workflow updated" for an existing one.
See what a workflow has done
A saved workflow's page has a Recent Executions card on the right with its latest runs and a View all link to the full history. The Test button at the top runs the workflow for a customer you pick, and it works while the workflow is still in Draft, so you can try a workflow before switching it on. See Workflow test runs and execution history.
Delete a workflow
- Open the workflow from the Workflows page.
- Click Delete at the top of the page.
- In the "Delete workflow?" dialog, click Delete to confirm, or Cancel to keep it.
Toki shows "Workflow deleted" and takes you back to the list. Deleting a workflow is permanent: "This action cannot be undone." If you might want it back later, export it first, or switch it to Draft instead.