Toki.

Docs/Merchants/Integrations & API

Omnisend

Omnisend is an email and SMS platform. Once connected, every Toki event reaches the customer's Omnisend contact as a custom event, together with their up-to-date loyalty properties, so you can start Omnisend automations and build Omnisend segments on loyalty data. Omnisend works with every reward you already run: one key is all you set up in Toki.

What you need from Omnisend

Toki asks for one thing: an Omnisend API key.

Field in TokiWhat it isWhere to find it
API KeyA key that lets Toki write to your Omnisend account. Treat it like a password.Create one in Omnisend under Store Settings, then API keys (steps below). Omnisend shows the key once, so copy it right away and keep it somewhere safe, such as a password manager.

Create the API key

  1. In Omnisend, open Store Settings, then API keys, and click Create API key.
  2. Type a descriptive name that reminds you what the key is for, such as "Toki".
  3. Choose the key's permissions, as described under "What Toki does with the key" below.
  4. Click Create API key, then Copy API key, and store the key somewhere safe. Omnisend does not show or let you copy the key again once you finish creating it.

What Toki does with the key

Toki uses the key for two things in your Omnisend account:

In OmnisendToki uses the key to
ContactsFind the contact with the member's email address, update its toki_ properties, and add the contact when it is not in Omnisend yet.
EventsSend Toki events to that contact.

When you create the key, Omnisend asks which data it can access. Give it access to Contacts, so Toki can find, add, and update contacts, and to events, so Toki can send them.

Connect Omnisend

  1. In the Toki app, open Integrations.
  2. On the Omnisend row, click Install.
  3. On the Install Omnisend page, paste your API Key.
  4. Click Save in the bar at the top of the page.

The field is required: if it is empty, "API Key is required" appears under it and nothing is saved. Toki stores the key as you enter it and uses it for the first time with the next event it sends, so check that you copied the whole key before you save.

From then on, Toki sends every event to Omnisend as it happens. Each Toki event shows up in Omnisend the first time a member sets it off after you connect: the first points earned bring Toki Points Earned, the first tier change brings Toki Membership Unlocked, and so on.

Omnisend lists a custom event among its automation triggers only after the event has arrived at least once. To build an automation on an event that has not come in yet, set it off yourself first; see Troubleshooting below.

The install, manage, and uninstall flow is the same for every integration; see Integrations and your API key.

Change or disconnect

To use a different key, click Manage on the Omnisend row, replace the API Key on the Manage Omnisend page, and click Save. Toki uses the new key from the next event on.

To disconnect, click Uninstall on the row and confirm in the Uninstall Omnisend dialog. Toki deletes the key it stored and stops sending events. Nothing changes in your Omnisend account: the events and contact properties already sent stay there.

What Toki sends to Omnisend

Each time something happens to a customer in Toki, such as earning points, reaching a tier, or redeeming a reward, Toki sends it to Omnisend as a custom event on the contact with the customer's email address. The event is named after the Toki event, for example Toki Points Earned, and its details, such as the points just earned, arrive as the event's fields.

Right after each event, Toki updates the same contact's properties with the customer's current loyalty data. The properties all start with toki_, such as toki_point_balance, toki_tier_name, and toki_referral_link. Toki sends them with every event, not just the ones that changed.

The complete list of events, their details, and the contact properties is in Toki events and properties in your email and SMS tools.

Toki sends events for customers who have an email address in Toki and are members of the store. Suspended members get no events while the suspension lasts.

Contacts Toki adds to Omnisend

When a member is not in Omnisend yet, Toki adds the contact with the member's email address and their toki_ properties. The new contact starts as unsubscribed from email. Toki never subscribes anyone in Omnisend, and it never changes the subscription status of a contact that already exists: marketing consent stays entirely in Omnisend's hands.

Event names in Omnisend

Every event keeps its Toki name: Points Earned in a Toki campaign or workflow is Toki Points Earned in Omnisend, Membership Unlocked is Toki Membership Unlocked, and Referred a Friend is Toki Referred a Friend. Omnisend also stores a system name for each event: the Toki name in lowercase with underscores, such as toki_points_earned or toki_membership_unlocked.

How properties look in Omnisend

A few properties are shaped for Omnisend so you can use them in segment conditions:

  • Balances arrive as numbers. toki_point_balance, toki_monetary_balance, toki_points_earned, toki_loyalty_nt_points, and toki_nt_spend_left are numbers on the contact, so a condition such as "toki_point_balance is greater than 500" works. toki_loyalty_nt_points loses its thousands separator on the way: a member who is 1,500 points from the next tier has the number 1500. When your program runs more than one store credit, the per-store-credit balances toki_point_balance_ and toki_monetary_balance_ followed by the store credit ID are numbers too. A value that is empty in Toki, such as toki_nt_spend_left for a member whose next tier is not spend-based, stays empty.
  • Dates arrive as timestamps. toki_points_expires_at, toki_paid_membership_next_payment_at, toki_wallet_downloaded_at, toki_apple_pass_downloaded_at, and toki_google_pass_downloaded_at are sent in the form Omnisend reads as a date, so you can segment on "points expire before" or "wallet pass added after". A member with no such date has the property empty.
  • Names use letters, digits, and underscores only. Any other character in a property or field name becomes an underscore. This matters for the per-store-credit balances: the dashes in the store credit ID become underscores, so a store credit with the ID 1a2b-3c4d has the contact property toki_point_balance_1a2b_3c4d. The ID is shown under the store credit's name on the Store credits page; see Store credits.
  • Balances in event fields are text. In the event itself, amount, toki_point_balance, and toki_points_earned on Toki Points Earned arrive as text. For number comparisons, use the contact properties toki_point_balance and toki_points_earned.

Rewards and features that use Omnisend

Omnisend works with every reward you already run. No activity in Ways to Earn depends on Omnisend; every activity, tier, redemption, and referral reports to Omnisend on its own once the key is saved.

A few features send Omnisend something extra:

  • Gift card products with Delivery Provider set to External leave the gift card email to you: the Toki Product Gift Card Delivered event carries the code, amount, and note, so an Omnisend automation can send it. See Gift card delivery.
  • The Send Custom External Event workflow action can send an event you name to Omnisend, with properties you choose. Leave its integrations field empty to send to every connected tool, or pick Omnisend alone. See Workflow actions.
  • Survey, quiz, and poll answers reach the contact as properties named after the activity's Alias and the question's alias; see Creating rewards.
  • Customers' wallet pass download links reach Omnisend as toki_apple_download_link and toki_google_download_link; see Wallet passes.

Typical setups built on Toki events

You build the automations and segments in Omnisend; Toki supplies the events and contact properties. These are the combinations merchants use most:

You want to…Start the automation from this eventUseful fields and contact properties
Welcome new membersToki Account CreatedContact properties toki_referral_link and toki_point_balance
Congratulate a customer on a new tierToki Membership UnlockedEvent field toki_tier_name; contact property toki_tier_rewards
Win back a customer who dropped out of a tierToki Membership LostEvent field toki_tier_name
Confirm points as they come inToki Points EarnedEvent fields amount (points just earned) and toki_point_balance
Deliver a discount code a customer earnedToki Reward CreatedEvent fields toki_code, toki_type, and toki_value
Thank a customer whose friend placed an orderToki Referred a FriendEvent fields toki_referee_email and toki_order_amount
Remind customers about wishlisted productsToki Wishlist Item AddedEvent fields toki_product_id, toki_variant_id, and toki_label
Follow up on survey or quiz answersToki Voting Activity CompletedContact properties named toki_, the activity alias, _, and the question alias, one per answer
Reward your biggest balancesNo event: a segmentContact property toki_point_balance greater than a number of your choice
"You're 300 points away from Gold"Any, or a segmentContact properties toki_loyalty_nt_points and toki_nt_name; toki_nt_spend_left for tiers that unlock by spend
"Your points expire soon"No event: a segmentContact property toki_points_expires_at before a date of your choice
Get more wallet passes installedNo event: a segmentContact property toki_wallet_downloaded equal to false, with toki_apple_download_link and toki_google_download_link in the message

Use Toki Account Created for welcome automations: it fires when the customer's loyalty account is created, so the automation runs for new members only.

Start an automation from a Toki event

  1. In Omnisend, open Automations, click Create workflow, then Create from scratch.
  2. In the trigger dropdown, find the Toki event, such as Toki Membership Unlocked.
  3. Build the workflow. Omnisend shows the event's fields as custom fields in the workflow settings, in splits, and in message personalization. In message text, an event field looks like [[event.toki_tier_name]].

To see which Toki events have arrived and which fields each one carries, open Store Settings, then API, then Custom events in Omnisend, and click the event's name.

To add one of Toki's contact properties to a message, click Personalization tag, then Custom properties, and pick the toki_ property.

Troubleshooting

Events or toki_ properties are not showing up in Omnisend. Open Integrations and check that the Omnisend row shows Installed; Toki only sends events to connected tools. The customer needs an email address in Toki and must not be suspended. Properties travel with events, so a customer who has not set off any event since you connected has no toki_ properties yet. If events still do not arrive, the key may not have been copied in full: create a new key in Omnisend, paste it into the Manage Omnisend page, and click Save.

An event you want to build an automation on is not in Omnisend yet. Events appear in Omnisend, including in the list of automation triggers, the first time a member sets them off after you connect. To get one there sooner, set it off yourself: adding points to a test member's balance, for example, sends Toki Points Earned for that member. See Balance adjustments.

A contact Toki added shows as unsubscribed. This is how Toki adds contacts: with the email address and the toki_ properties, and without marketing consent. Subscription status is managed in Omnisend.

Existing members have no toki_ properties. A member's properties reach Omnisend with their first event after you connect. If you want every member's properties in Omnisend right away, chat with us and we'll sync them for you.

A property name in Omnisend looks different from the one in Toki. Characters other than letters, digits, and underscores become underscores in Omnisend, as described under "How properties look in Omnisend" above. To see a member's properties exactly as Toki sends them, open the member's profile under Members and choose User properties from the More actions menu; see Member profile.

Related

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