Docs/Merchants/Workflows & Timers
Workflow actions
An action is a step that does something: it sends an email, adds points, grants a reward, pauses the run for a day, or cancels a paid membership. The trigger decides when a workflow runs and conditions decide which path it takes. Actions are where your customer sees the result. This article lists every action and the fields behind it.
How action steps work
- An action runs for the customer the workflow is running for. Many actions also have a User Id field. Leave it empty to keep that customer, or fill it in to act on someone else.
- Text fields accept fixed text or values from the trigger and earlier steps, written in double curly braces such as
{{customer.email}}. Click Add variable next to a field (a few fields call it Insert variable or Select variable) to pick one. See Workflow triggers for how the variable picker works. - Steps run in the order they're connected. A Wait step holds the run for the time you set, then the steps below it continue.
- If a step can't complete, the run stops there and shows as Failed in the execution history, with a message that explains why. You can fix the step and use Restart. See Workflow test runs and execution history.
- Some actions add their own values for the steps below them, such as the gift card code from Create Gift Card. The last section of this article lists them.
Add an action step
- In the Toki app, click Workflows in the left navigation. Open a workflow, or click New Workflow and pick a trigger.
- Hover over the step the action should follow and click the + button under it. Choose Add Action.
- Hover over the new step and click the edit icon to open it.
- In Action Type, type in Search actions... or scroll the grouped list, then click the action you want. Its fields appear below.
- Fill in the fields. The reference below explains each one.
- Click Save to close the step, then save the workflow.
Every action step needs an Action Type before the workflow can be saved. If one is empty, Toki outlines that step in red and shows "Please select action type for all action nodes".
Fields every action has
| Field | What it does |
|---|---|
| Action Type | What the step does. Picking a new one resets the step's Label and Description to match and swaps in the new action's fields. |
| Label | The name shown on the step in the canvas. Later steps list this step's values under this name, so give it a clear one if the workflow has several steps of the same kind. |
| Description | A short note shown under the label on the step. |
| Enable Run Input | Advanced option. Chat with us and we'll set it up with you. |
| Handle | Advanced option. Leave it as it is unless we've set something up with you. |
Action reference
Action Type is one searchable list. It's grouped the same way as the tables below, and each group lists its actions alphabetically.
Three actions change many customers at once, so they're offered only in workflows that start with the Timer Triggered trigger: Change Activity Status, Update Segment, and Delete All Store Credits. If you don't see one of them, check the workflow's trigger. See Timers.
General
| Action | What it does |
|---|---|
| Run code | Advanced option. Runs a custom step we build with you, for example to prepare data for the steps after it. Chat with us and we'll set it up with you. |
| Wait | Pauses the run for the time you set in days, hours, and minutes, then continues with the next step. |
Integrations
| Action | What it does |
|---|---|
| HTTP Request | Advanced option. Sends details from the workflow to another system you use. Chat with us and we'll set it up with you. |
| Send Custom External Event | Advanced option. Sends an event you name to connected tools such as Klaviyo or Omnisend, so they can react to it. Chat with us and we'll set it up with you. |
| Shopify Mutation | Advanced option. Makes a change in your Shopify store from inside the workflow. Chat with us and we'll set it up with you. |
Merchant Portal
| Action | What it does |
|---|---|
| Cancel Paid Membership Subscription | Cancels the customer's paid membership, right away or at the end of the current billing cycle. |
| Change Activity Status | Sets one of your activities to Active or Draft. Offered only with the Timer Triggered trigger. |
| Delete All Store Credits | Resets the store credits you pick to zero for every customer, or only for customers in the segments you choose. Offered only with the Timer Triggered trigger. |
| Extend Paid Membership Subscription | Adds days to the customer's active paid membership. |
| Grant Paid Membership Subscription | Gives the customer a paid membership at no charge, with or without an end date. |
| Reactivate Paid Membership Subscription | Advanced option. Brings back a cancelled paid membership subscription without charging the customer right away. Chat with us and we'll set it up with you. |
| Request Review | Asks the customer to review a product from one of their orders. |
| Save Customer Discount | Saves a discount code that already exists in your Shopify admin to the customer's account. |
| Unblock Membership Trial | Lets the customer use the trial of the paid memberships you pick. |
| Update Segment | Saves a new set of settings to one of your segments. Offered only with the Timer Triggered trigger. |
Notifications
| Action | What it does |
|---|---|
| Send Email | Sends one of your email templates to the customer. |
| Send Push Notification | Sends a short message to the customer's phone through your Apple Wallet or Google Wallet pass. |
Rewards
| Action | What it does |
|---|---|
| Create Gift Card | Issues a gift card with the balance you set and gives it to the customer. See Create Gift Card workflow action. |
| Grant Lottery Tickets | Gives the customer tickets in one of your lottery activities. |
| Grant Reward | Gives the customer a reward such as points, a discount code, or a free gift, set up the same way as a reward on an activity. |
Store Credits
| Action | What it does |
|---|---|
| Credit Points | Adds points to the customer's balance. |
| Debit Points | Subtracts points from the customer's balance. |
Notifications
Send Email
| Field | What it does |
|---|---|
| To (Email Address) | Who receives the email. Leave it empty to send to the customer the workflow is running for. Click Insert variable to use another address from the run. |
| Email Template | The template to send. Once you pick one, click Edit selected to open it in a new tab. Create new template and View all templates open the email templates area. |
The template's subject and body can include values from the run, such as the customer's name or a gift card code created earlier in the workflow. See Email templates for how to write and test templates.
Send Push Notification
| Field | What it does |
|---|---|
| Header | The title of the notification. Shown on Google Wallet passes; Apple Wallet shows the content only. |
| Content | The message itself. Keep it short: customers read it at a glance on their phone. |
Both fields accept values from the run. Click Insert variable to add one.
Here's how delivery works:
- The notification reaches customers who have your pass in Apple Wallet or Google Wallet and have notifications turned on for it. If the customer has no pass, the step completes and the run continues.
- Google Wallet delivers up to 3 push notifications per customer in any 24-hour period, and decides how and when they appear on the phone.
To reach customers without a pass, add a Send Email step as well. For more on passes, see Wallet passes overview.
Store credits and rewards
Credit Points and Debit Points
The two steps share most fields.
| Field | What it does |
|---|---|
| User Id | Leave it empty to change the balance of the customer the workflow is running for. |
| Store Credit | Which balance to change. Leave it empty to use your default store credit. Pick one only if you run more than one. See Store credits. |
| Amount | How many points to add or subtract. Fixed number or a value from the run, such as the points amount from the trigger. |
| Transaction description | Optional note saved with the change. It shows in the Description column of the member's Recent transactions. If empty, Toki uses "Credit points" or "Debit points". |
| Add as non-cumulative (Credit Points only) | The customer gets points to spend, but the credit is left out of their progress toward tiers that use the Cumulative store credit condition. Use it for goodwill gestures that shouldn't move the customer up a tier. |
| Allow negative balance (Debit Points only) | Lets the customer's balance go below zero. Off by default, so a debit larger than the balance stops the run. |
| Mark as penalty (Debit Points only) | A regular debit works like a purchase: the balance goes down, but the customer's total earned credits stay the same. Check this when the debit should also lower that total, which tiers and segments using the Cumulative store credit condition see. |
These are the same choices you have when adjusting one member by hand. See Balance adjustments, Tier conditions, and Segment conditions.
Grant Reward
| Field | What it does |
|---|---|
| User Id | Leave it empty to reward the customer the workflow is running for. |
| Add Reward | Adds a reward to the step. Each reward has a Type, such as a fixed amount of points, a discount code, free shipping, a free gift, or a collectible, plus the settings that type needs. Each reward also has a Segment; leave it at For everyone or pick a segment to reserve that reward for its members. |
When the step runs, the customer receives one reward from the list: the first one whose Segment includes them. The reward settings are the same ones you use on activities. See Reward types and Creating rewards.
Grant Lottery Tickets
| Field | What it does |
|---|---|
| User Id | Leave it empty to give the tickets to the customer the workflow is running for. |
| Lottery Activity | Which of your lottery activities the tickets belong to. |
| Number of Tickets | How many tickets to give. Fixed number or a value from the run. |
| Prize Pool Amount per Ticket | How much each ticket adds to the prize pool. Leave it empty to use the amount set on the activity. |
For how lottery rewards work, see Reward types.
Timing
Wait
| Field | What it does |
|---|---|
| Wait Duration | How long to pause: days, hours, and minutes. |
The step shows "Wait for" and the duration on the canvas. While a run is waiting, it stays Running in the execution history, then picks up with the next step when the time is up. Use it for timed sequences, like a welcome email today and a reminder three days later.
Activities, segments, and store credits on a schedule
These three actions appear only when the workflow's trigger is Timer Triggered, because they change your program for many customers at once, not for one customer. See Timers for setting up the schedule.
Change Activity Status
| Field | What it does |
|---|---|
| Activity | The activity to change. The list includes activities that are currently inactive. |
| New Status | Active or Draft. |
Use it to switch an activity on for a launch day and off again afterward, each from its own timer.
Update Segment
| Field | What it does |
|---|---|
| Segment | The segment to change. Once you pick one, its current settings load into the step. |
Edit the loaded settings the way you would on the segment itself, including its conditions. When the step runs, Toki saves the whole set of settings to the segment, replacing what was there. See Segments and Segment conditions.
Delete All Store Credits
| Field | What it does |
|---|---|
| Select store credits to reset | Which store credits to set to zero. Pick at least one. |
| Select segments (optional) | Reset balances only for customers in these segments. With nothing selected, every customer is affected. |
| Reason (optional) | Saved with the reset in each customer's transactions. If empty, Toki uses "Store credit has expired". |
A summary under the fields spells out exactly which store credits and customers the step will affect. This is the usual way to expire points at the end of a season.
Paid memberships
For what plans, trials, and billing cycles mean, see Paid memberships and Paid membership billing.
Grant Paid Membership Subscription
| Field | What it does |
|---|---|
| User Id | Leave it empty for the customer the workflow is running for. |
| Membership | The paid membership to give. |
| Plan | Which of the membership's plans the customer gets. |
| Duration in days (optional) | How long the membership lasts. Leave it empty for no expiration. |
The customer gets the membership without paying for it, so it's a good fit for prizes, VIP gestures, or making up for a service issue. The customer can't hold two active paid membership subscriptions at once, so use it for customers who don't have one yet.
Extend Paid Membership Subscription
| Field | What it does |
|---|---|
| User Id | Leave it empty for the customer the workflow is running for. |
| Days to add | Days added to the membership's expiration date and, when the membership has one, its next payment date. |
Works on the customer's active membership on a recurring plan.
Cancel Paid Membership Subscription
| Field | What it does |
|---|---|
| User Id | Leave it empty for the customer the workflow is running for. |
| Paid membership ID | Which of your paid memberships to cancel for the customer. Insert it with a variable, for example the membership ID that a paid membership trigger provides. |
| Cancellation policy | Immediately, or At the end of the billing cycle so the customer keeps access they've paid for. |
| Reason message | Optional note saved with the cancellation. If empty, Toki uses "Cancelled by workflow". |
Unblock Membership Trial
| Field | What it does |
|---|---|
| Memberships | Pick the paid memberships whose trial the customer may use. |
| Use variables | Check it to type Membership IDs instead, one per line, for example from a variable in the run. |
Reactivate Paid Membership Subscription
Advanced option. It needs the membership, its contract, and a next payment date from earlier steps. Chat with us and we'll set it up with you.
Discounts and reviews
Save Customer Discount
| Field | What it does |
|---|---|
| User Id | Leave it empty for the customer the workflow is running for. |
| Discount code | A discount code that already exists in your Shopify admin. Fixed code or a value from the run. |
The code is saved to the customer's account and listed with the discounts they've received on their profile. Each code can be saved once per customer. See Member profile.
Request Review
| Field | What it does |
|---|---|
| Review Group ID | Which review group the request belongs to. |
| Order ID | The order the customer is asked to review. Usually a value from the run, such as the order ID from an Order Processed trigger. |
Toki creates a review request for the customer and sets off the Request Review trigger, so another workflow can send the invitation. The step also adds the product's name, image, and link, plus the link the customer uses to submit the review, for the steps below it.
Values actions add for later steps
Every step below one of these actions can use its values. They appear in the variable picker grouped under the step's Label.
| Action | Values |
|---|---|
| Create Gift Card | Gift Card Code, Gift Card Amount, Gift Card Recipient User ID, Gift Card Warnings. See Create Gift Card workflow action. |
| Send Push Notification | Is Push Notification Sent: true once the notification went out. Use it in a condition to send an email instead when it didn't. |
| Grant Reward | Action Result: details of the reward that was given. |
| Request Review | Product ID, Product Name, Product URL, Product Image URL, Store URL, Submit URL. |
Related
- Workflows: the Workflows page, the canvas, Draft and Active, saving and deleting.
- Workflow triggers: what starts a workflow and how to use its values in action fields.
- Workflow conditions: send different customers to different actions.
- Timers: the schedule behind Change Activity Status, Update Segment, and Delete All Store Credits.
- Create Gift Card workflow action: the gift card action in detail.
- Workflow test runs and execution history: check what each action did in a run.
- Email templates: build the email a Send Email step sends.
- Balance adjustments: the manual version of Credit Points and Debit Points.