Docs/Merchants/Workflows & Timers
Create Gift Card workflow action
The Create Gift Card action issues a gift card from inside a workflow. Whatever starts the workflow, such as a birthday, a completed challenge, or a customer joining a segment, the customer gets a gift card that works at checkout like any Shopify gift card. You set the balance, and Toki generates the code or uses one you provide.
This action lives in Toki's Workflows page. If you build automations in Shopify Flow instead, see Create gift cards with Shopify Flow.
Add the action to a workflow
- In the Toki app, click Workflows in the left navigation. Open the workflow you want, or create a new one.
- Click the + button under the step that should come before the gift card, and choose Add Action.
- Open the new step. In Action Type, search for and pick Create Gift Card. It sits under the Rewards group.
- Fill in the fields described below.
- Click Save to close the step, then save the workflow.
Every field accepts fixed text or values from earlier in the workflow. Click Add variable next to a field to insert one, for example the customer's ID from the trigger.
Fields
| Field | What it does |
|---|---|
| User Id | Who receives the gift card. Leave it empty to give the card to the customer the workflow is running for. Fill it in only when the card should go to someone else. |
| Initial balance | The gift card's starting value, in your store currency. Required. Enter a number above zero, like 25.00. Decimals are fine. |
| Gift card code (optional) | The code the customer enters at checkout. Leave it empty and Toki generates one for you. If you enter your own, use at least 8 characters and a code that isn't already in use in any of your stores. Toki stores custom codes in lowercase letters. |
| Message / note (optional) | A short message saved with the gift card, like "Happy birthday!". It shows in the Note column of the Gift Cards table, and Toki's gift card email can include it with the {{note}} placeholder. See Gift card delivery and emails. |
Like every action, the step also has a Label. The default is "Create Gift Card". Later steps list this step's values under that label, so give it a clear name if your workflow creates more than one card.
What happens when the step runs
- Toki creates the gift card with the balance you set, and the code you entered or a generated one.
- If Toki is connected to more than one of your stores, the same code with the same balance is created in each of them. The card works at checkout in every store.
- The card is attached to the recipient. Open Members, open the customer, and go to the Gift Cards tab to see it. From there you can update the balance, manage delivery, or check where it was spent. See Manage issued gift cards.
- When Assign customer to gift card is on, Toki also attaches the card to the customer in your Shopify admin, and Shopify sends its own gift card notification. See Gift card settings.
Deliver the card
The Create Gift Card step creates the card. To email it to the customer, add a Send Email step right after it:
- Click the + button under the Create Gift Card step and choose Add Action.
- Open the new step and set Action Type to Send Email.
- Leave To (Email Address) empty to send to the customer the workflow is running for, or click Insert variable to pick another address.
- In Email Template, pick the template that announces the gift.
- Save the step and the workflow.
Put the gift card code in the template so the customer can use it. In any step below Create Gift Card, click Add variable: the picker shows the exact placeholder text under each value, such as {{createGiftCard.giftCardCode}}. Copy it into the template's Subject or HTML Body. Toki fills it in with the real code when the email goes out. See Email templates for how to write and test templates.
You can also send Toki's standard gift card email by hand later: open the card in the Gift Cards table and use Manage delivery. See Gift card delivery and emails.
Values available to later steps
Every step below Create Gift Card can use these values. They appear in the Add variable picker, grouped under the step's Label.
| Value | What it holds |
|---|---|
| Gift Card Code | Code of the created gift card. |
| Gift Card Amount | Initial balance of the created gift card. |
| Gift Card Recipient User ID | ID of the user assigned to the created gift card. |
| Gift Card Warnings | Store-specific warnings returned while creating the gift card. |
Related
- Workflows: the Workflows page, the canvas, Draft and Active, saving and deleting.
- Workflow actions: every action you can add to a workflow.
- Gift card delivery and emails: edit Toki's gift card email and the
{{note}}placeholder. - Manage issued gift cards: find a card, update its balance, manage delivery.
- Gift card settings: the Assign customer to gift card setting.
- Email templates: build the email your Send Email step sends.
- Create gift cards with Shopify Flow: the same idea, built in Shopify Flow.