Toki.

Docs/Merchants/Campaigns & Messaging

Message placeholders and starter text

An automatic campaign can speak to each customer about their own moment: the points they just earned, the tier they unlocked, the code they received. You do that with placeholders, short tags in double curly braces that Toki swaps for the customer's real value the moment it sends. This article covers how placeholders work, what starter text Toki fills in when you pick a trigger, and which placeholders each trigger supports.

How placeholders work

A placeholder is a name inside double curly braces, such as {{amount}}. When a customer does the action you picked in When to send, Toki takes your message, replaces each placeholder with that customer's value, and sends the result.

For example, a Points Earned campaign with the text You have earned {{amount}} points reaches a customer who just earned 50 points as "You have earned 50 points".

Placeholders work in every message field of an Automatically campaign:

  • Push notification content
  • Email subject and Email message
  • Wallet notification title and Wallet notification body

Use a placeholder once or many times, in any of these fields.

Writing placeholders

A few rules keep your messages filling in the way you expect:

  • Copy the name exactly. Type the placeholder as shown in the tables below: lowercase, underscores between words, and both sets of curly braces with no spaces inside. {{amount}} is filled in; {{ Amount }} is sent as typed.
  • Match the trigger. Each trigger has its own placeholders. Use the ones listed for the trigger you picked in When to send. Anything that isn't a placeholder for that trigger goes out as plain text, exactly as you typed it, so proofread your message before you set the campaign to Active.
  • Check after changing the trigger. When you pick a different trigger, your text stays as it is. Make sure its placeholders are on the new trigger's list.
  • Expect dates as timestamps. Date placeholders such as {{toki_expires_at}} and {{next_retry_at}} are filled in as a full timestamp, for example 2025-03-01T10:00:00.000Z.
  • Test sends show placeholders as typed. A Test send has no customer action behind it, so the tags go out exactly as you wrote them. Placeholders fill in on real sends, when the trigger fires for a customer.
  • Use plain text in scheduled campaigns. Placeholders take their values from the customer action that triggers an Automatically campaign. An On Schedule campaign sends one message to everyone at a time you pick, so write it without placeholders. See Scheduled campaigns.

Starter text

When you pick a trigger under When to send, Toki fills in starter text so you never start from a blank page. Each trigger comes with a starter title and a starter body. Here's where they go:

FieldWhat Toki fills in
Campaign nameA suggested name in capital letters based on the trigger, such as POINTS EARNED, if you haven't named the campaign yet
Push notification contentThe starter title and starter body together on one line
Email subjectThe starter title
Email messageThe starter body
Wallet notification titleThe starter title
Wallet notification bodyThe starter body

Good to know:

  • Toki fills in all three channels, including the ones you haven't turned on. Turn a channel on later and its text is already waiting.
  • Toki only fills in empty fields. Anything you've already written stays exactly as you wrote it, including after you switch triggers.
  • To bring a trigger's starter text back into a field you've edited: pick any other trigger in When to send, clear the field, then pick your trigger again.
  • Starter text is a starting point. Read it, make it sound like your brand, and add or remove placeholders as you like. The Points Earned starter body is You have earned {{amount}} points; you might change it to Nice! {{amount}} points just landed. Your balance is now {{toki_point_balance}}.

Placeholders by trigger

The tables below list the placeholders for every trigger in When to send. For what each trigger does and when it fires, see Automatic campaigns.

Activities and challenges

TriggerPlaceholders
Activity Completed{{toki_activity_name}}: the activity's name
Challenge Started{{toki_challenge_name}}: the challenge's name
Challenge Completed{{challenge_name}}: the challenge's name. {{reward}}: the reward the customer earned
Activity/Challenge Approved{{activity_name}}: the activity or challenge name. {{reward}}: the reward the customer earned
Activity/Challenge Denied{{activity_name}}: the activity or challenge name. {{reason}}: the reason you gave when denying
Voting Activity Completed{{toki_voting_activity_name}}: the activity's name. {{user_answer}}: the customer's answer

Points and rewards

TriggerPlaceholders
Points Earned{{amount}}: the points just earned. {{toki_point_balance}}: the customer's current balance. {{toki_points_earned}}: all points the customer has ever earned
Points Spent{{amount}}: the points spent
Redemption Created{{toki_discount_code}}: the discount code
Reward Created{{toki_code}}: the code. {{toki_value}}: the reward's value
Automated Gift Sent{{product_label}}: the product's name
Transactions Deleted

Memberships

TriggerPlaceholders
Membership Unlocked{{membership_name}}: the membership's name. {{toki_tier_name}}: the same name; both work
Membership Lost{{toki_tier_name}}: the membership's name. {{membership_name}}: the same name; both work
Paid Membership Subscribed{{toki_membership_name}}: the membership's name
Paid Membership Renewed{{toki_membership_name}}: the membership's name
Paid Membership Renewal Payment Failed{{membership_name}}: the membership's name. {{failed_attempt_number}}: which payment attempt just failed. {{failed_attempts_remaining}}: how many retries are left. {{next_retry_at}}: when the next attempt happens
Paid Membership Cancellation Requested{{toki_reason}}: a short reason code, such as manually-cancelled. {{toki_expires_at}}: when the membership ends
Paid Membership Cancelled{{toki_reason}}: a short reason code, such as manually-cancelled or expired

Referrals

TriggerPlaceholders
Referred a Friend{{toki_referrer_name}}: the referrer's name. {{toki_referrer_email}}: the referrer's email. {{toki_referee_email}}: the friend's email. {{toki_referee_used_code}}: the code the friend used
Referral Code Used{{toki_referrer_name}}: the referrer's name. {{toki_referrer_email}}: the referrer's email. {{toki_referee_email}}: the friend's email. {{toki_referee_used_code}}: the code the friend used
Send Refer a Friend Invite{{toki_subject}}: the invite's subject. {{toki_message}}: the invite's message. {{toki_referrer_name}}: the referrer's name. {{toki_referrer_email}}: the referrer's email. {{toki_referrer_link}}: the referrer's share link

Sign-ups and account

TriggerPlaceholders
Account Created
Authenticated
Newsletter Sign Up{{toki_magic_link}}: a sign-in link for the customer. {{toki_discount_code}}: the sign-up discount code, when your sign-up gives one
Klaviyo Submission{{toki_magic_link}}: a sign-in link for the customer
Birthday
Birthdate Changed{{toki_birthdate}}: the new birthdate

Wishlists

TriggerPlaceholders
Wishlist Item Added{{toki_label}}: the product's name
Wishlist Item Removed{{toki_label}}: the product's name

Gift cards

TriggerPlaceholders
Product Gift Card Gifted{{toki_amount}}: the gift card amount. {{toki_code}}: the gift card code. {{toki_note}}: the sender's note. {{toki_gifted_to_email}}: the recipient's email
Product Gift Card Delivered{{toki_amount}}: the gift card amount. {{toki_code}}: the gift card code. {{toki_note}}: the sender's note. {{toki_gifted_by_name}}: the sender's name. {{toki_gifted_by_email}}: the sender's email

Orders, reviews, and segments

TriggerPlaceholders
Order Processed
Review Created{{review_rating}}: the star rating. {{review_headline}}: the review's headline. {{review_body}}: the review's text
Request Review{{product_name}}: the product's name. {{product_url}}: a link to the product. {{product_image_url}}: a link to the product's image. {{store_url}}: a link to your store. {{submit_url}}: a link where the customer can write the review
Segment Reminder

Related

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