Toki.

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

  1. In the Toki app, click Workflows in the left navigation. Open a workflow, or click New Workflow and pick a trigger.
  2. Hover over the step the action should follow and click the + button under it. Choose Add Action.
  3. Hover over the new step and click the edit icon to open it.
  4. In Action Type, type in Search actions... or scroll the grouped list, then click the action you want. Its fields appear below.
  5. Fill in the fields. The reference below explains each one.
  6. 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

FieldWhat it does
Action TypeWhat the step does. Picking a new one resets the step's Label and Description to match and swaps in the new action's fields.
LabelThe 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.
DescriptionA short note shown under the label on the step.
Enable Run InputAdvanced option. Chat with us and we'll set it up with you.
HandleAdvanced 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

ActionWhat it does
Run codeAdvanced 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.
WaitPauses the run for the time you set in days, hours, and minutes, then continues with the next step.

Integrations

ActionWhat it does
HTTP RequestAdvanced 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 EventAdvanced 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 MutationAdvanced 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

ActionWhat it does
Cancel Paid Membership SubscriptionCancels the customer's paid membership, right away or at the end of the current billing cycle.
Change Activity StatusSets one of your activities to Active or Draft. Offered only with the Timer Triggered trigger.
Delete All Store CreditsResets 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 SubscriptionAdds days to the customer's active paid membership.
Grant Paid Membership SubscriptionGives the customer a paid membership at no charge, with or without an end date.
Reactivate Paid Membership SubscriptionAdvanced 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 ReviewAsks the customer to review a product from one of their orders.
Save Customer DiscountSaves a discount code that already exists in your Shopify admin to the customer's account.
Unblock Membership TrialLets the customer use the trial of the paid memberships you pick.
Update SegmentSaves a new set of settings to one of your segments. Offered only with the Timer Triggered trigger.

Notifications

ActionWhat it does
Send EmailSends one of your email templates to the customer.
Send Push NotificationSends a short message to the customer's phone through your Apple Wallet or Google Wallet pass.

Rewards

ActionWhat it does
Create Gift CardIssues a gift card with the balance you set and gives it to the customer. See Create Gift Card workflow action.
Grant Lottery TicketsGives the customer tickets in one of your lottery activities.
Grant RewardGives 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

ActionWhat it does
Credit PointsAdds points to the customer's balance.
Debit PointsSubtracts points from the customer's balance.

Notifications

Send Email

FieldWhat 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 TemplateThe 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

FieldWhat it does
HeaderThe title of the notification. Shown on Google Wallet passes; Apple Wallet shows the content only.
ContentThe 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.

FieldWhat it does
User IdLeave it empty to change the balance of the customer the workflow is running for.
Store CreditWhich balance to change. Leave it empty to use your default store credit. Pick one only if you run more than one. See Store credits.
AmountHow many points to add or subtract. Fixed number or a value from the run, such as the points amount from the trigger.
Transaction descriptionOptional 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

FieldWhat it does
User IdLeave it empty to reward the customer the workflow is running for.
Add RewardAdds 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

FieldWhat it does
User IdLeave it empty to give the tickets to the customer the workflow is running for.
Lottery ActivityWhich of your lottery activities the tickets belong to.
Number of TicketsHow many tickets to give. Fixed number or a value from the run.
Prize Pool Amount per TicketHow 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

FieldWhat it does
Wait DurationHow 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

FieldWhat it does
ActivityThe activity to change. The list includes activities that are currently inactive.
New StatusActive or Draft.

Use it to switch an activity on for a launch day and off again afterward, each from its own timer.

Update Segment

FieldWhat it does
SegmentThe 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

FieldWhat it does
Select store credits to resetWhich 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

FieldWhat it does
User IdLeave it empty for the customer the workflow is running for.
MembershipThe paid membership to give.
PlanWhich 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

FieldWhat it does
User IdLeave it empty for the customer the workflow is running for.
Days to addDays 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

FieldWhat it does
User IdLeave it empty for the customer the workflow is running for.
Paid membership IDWhich 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 policyImmediately, or At the end of the billing cycle so the customer keeps access they've paid for.
Reason messageOptional note saved with the cancellation. If empty, Toki uses "Cancelled by workflow".

Unblock Membership Trial

FieldWhat it does
MembershipsPick the paid memberships whose trial the customer may use.
Use variablesCheck 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

FieldWhat it does
User IdLeave it empty for the customer the workflow is running for.
Discount codeA 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

FieldWhat it does
Review Group IDWhich review group the request belongs to.
Order IDThe 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.

ActionValues
Create Gift CardGift Card Code, Gift Card Amount, Gift Card Recipient User ID, Gift Card Warnings. See Create Gift Card workflow action.
Send Push NotificationIs Push Notification Sent: true once the notification went out. Use it in a condition to send an email instead when it didn't.
Grant RewardAction Result: details of the reward that was given.
Request ReviewProduct ID, Product Name, Product URL, Product Image URL, Store URL, Submit URL.

Related

Didn't find what you need? Chat with us — a human answers, usually within the hour.