Meet Toki Operator

Docs/Merchants/Integrations & API

Integrations and your API key

Last updated

The Integrations page is where you connect the other tools you run your store with, such as your email platform, subscription app, or review app. Each integration has its own short settings form, usually a key you copy from the other tool. The same page holds your Toki API Key, which your developer uses to build custom connections and to receive webhooks.

Open the Integrations page

  1. In the Toki app, open Integrations.

The page lists every available integration, with a search field at the top. The Toki API Key card sits below the list.

Find an integration

Type in Search integrations to filter the list by the integration's name or website.

Each row shows the integration's logo, name, and website. The Shopify row is always first and shows your own store's domain. Integrations you have already connected come next and carry a green Installed badge.

The actions on a row depend on the integration:

ActionWhat it does
InstallOpens the integration's setup page.
ManageOpens the settings of an installed integration.
UninstallDisconnects an installed integration.
GuideOpens the setup guide for the integration in a new tab.
Contact UsStarts a chat with us for integrations we set up together with you.

Install an integration

  1. Open Integrations.
  2. Find the integration and click Install.
  3. On the Install page, fill in the fields. Required fields are marked with an asterisk. The table below lists what each integration asks for.
  4. Click Save in the bar at the top of the page.

Toki checks the values as you save. If a value is off, the problem appears under that field and nothing is saved until you correct it. When everything checks out, you return to the Integrations list and the integration shows the Installed badge.

A few integrations connect differently:

  • Gorgias asks for your Gorgias Account Subdomain (the "acme" in acme.gorgias.com). Click Next, check the details, then click Install. Gorgias opens in a new tab so you can approve the connection.
  • Tremendous has nothing to paste. Click Install and sign in to Tremendous to connect it.
  • Shopify: Customer Metafields has no credentials. Open it and click Save to turn it on.
  • Snowflake is set up together with us. Click Contact Us and we'll walk through it with you.
  • Loox, Okendo, Reviews.io, Stamped, Yotpo, Fairing, Smartrr, and Skio have nothing to configure in Toki. They are marked Installed and come with a Guide action that opens the setup steps.

What each integration asks for

Have these ready before you click Install. You find them in the other tool's account or settings area.

IntegrationWhat you enter
AttentiveAPI Key
Churn BusterAccount ID, API Key
CorsoClient ID, Client Secret
DripAccount ID, API Token (from your Drip user settings)
GreensparkAPI Token
HeartlandAPI Key
Judge.meAPI Key
KlaviyoPublic API Key / Site ID, Private API Key, plus two switches: Enable Auto Profile Creation and Enable Coupons Integration
Ko-fiVerification Token
ListrakEmail: Client ID, Email: Client Secret, Email: List ID, Cross Channel: Client ID, Cross Channel: Client Secret, plus the Listrak IDs for the properties and events you want to use
LoopAPI Key
OmnisendAPI Key
PostscriptAPI Key (the private key from your Postscript account settings) and an optional Email that is already subscribed in Postscript, which Toki uses to send test events
RechargeAPI Token, API Client Secret
ReloadifyClient ID, Client Secret
SendlaneAPI Key, List Id
Stay.aiAPI Key
TaggunAPI Key

The two Klaviyo switches decide how far the connection goes:

SwitchWhat it does when it is on
Enable Auto Profile CreationEvery Klaviyo form submitted on your storefront creates a Toki member for the email address entered, if that person is not a member yet. With the switch off, Toki only acts on Klaviyo forms that are connected to a Klaviyo: Sign up reward. Either way, the submission fires the Klaviyo Submission event you can use in event-triggered campaigns.
Enable Coupons IntegrationCoupon codes that Klaviyo assigns to a customer also appear in that customer's Toki wallet, next to their other coupons, as long as the code exists as a discount code in your Shopify store. Toki picks them up each time the customer opens their coupons.

To get the Greenspark API Token:

  1. In your Greenspark account, open Account, then API, then API Keys, and click Create API Key.
  2. Name the key, choose Greenspark API as the type, and click Create API Key.
  3. Copy the key right away. Greenspark shows it only once; if you lose it, create a new one.
  4. In Toki, paste it into API Token on the Install Greenspark page.

With Greenspark installed, you can create rewards where customers spend points on Greenspark projects. See Reward types.

Several integrations also offer a Guide action with step-by-step instructions for finding the values in the other tool.

Loyalty details in Gorgias

Once Gorgias is installed, your support agents see each customer's loyalty details in Gorgias and can change their balance without opening Toki.

Toki adds a Toki Customer Details card to Gorgias with the customer's:

  • Balance and Monetary Balance: their balance of your default store credit, in points and as money.
  • Points Earned: all the points they have earned.
  • Tier Name and Tier Rewards: their current tier and its rewards.
  • Their next tier: its name, its rewards, and how many points or how much spending they still need to reach it.
  • Asset Name (the name of your default store credit), Referral Link, Apple Download Link (the link to their Apple Wallet pass), and Birthdate.

Toki updates these details each time the customer's balance changes, they unlock or lose a tier, or they complete an activity. If the customer isn't in Gorgias yet, Toki adds them there, matched by email address.

The card also has two buttons:

ButtonWhat it does
Add balanceAdds points to the customer's default store credit. The agent enters the Add Points Amount and a Description.
Subtract balanceTakes points off the customer's default store credit, up to their current balance. The agent enters the Subtract Points Amount and a Description.

The change appears in the member's transaction history as ADDED or SPENT, with the agent's description, and counts just like an adjustment you make from the member's profile. See Balance adjustments.

Change an integration's settings

  1. Open Integrations.
  2. On the row of an installed integration, click Manage.
  3. Edit the fields on the Manage page. Fields that hold secrets are masked.
  4. Click Save in the bar at the top, or Discard to keep the current settings.

Uninstall an integration

  1. Open Integrations.
  2. On the row of an installed integration, click Uninstall.
  3. In the Uninstall dialog, click Uninstall to confirm.

Toki disconnects the integration and deletes the credentials you entered. You can reinstall it at any time by entering them again.

The Shopify integration

The Shopify row represents your store's connection to Toki. It is always present and has no uninstall action. Click Manage to open its settings.

Multi Pass Token

The Manage Shopify page has a Shopify Multi Pass section with one field, Multi Pass Token. Enter the token and click Save. Toki uses it to connect customer sign-in with Shopify Multipass: a customer who signs in to the Toki wallet is signed in to their Shopify customer account at the same time, and signing out of the wallet signs them out of your store as well.

The token is the Multipass secret from your Shopify admin. Multipass is part of Shopify Plus, and Shopify keeps it for stores that already use it. Customer sign-in with Toki has the steps to turn it on and copy the secret.

Toki uses one customer sign-in method at a time: Multipass or the customer identity provider. While the identity provider is active, the Multi Pass Token field is read-only and a notice on the page says so. Disable the provider first if you want to switch to Multipass. The identity provider lives on the same page; see Customer sign-in with Toki.

Update Webhooks, Fetch orders, and Update app

The Shopify row also carries three actions. Each opens a dialog with a short explanation and one button.

ActionWhat it does
Update WebhooksRefreshes the updates your Shopify store sends to Toki about orders, refunds, customers, products, and subscriptions. In the dialog, click Update Webhooks. A confirmation appears when it is done.
Fetch ordersImports past orders from your store into Toki. In the dialog, click Fetch orders. The dialog shows a running count of fetched orders; you can close it and the import continues in the background.
Update appOpens Shopify's approval page for the Toki app with its current set of permissions. In the Update Shopify App dialog, click Update App, then approve in the tab that opens. Run it when we ask you to, so your store grants the latest permissions.

Fetch orders imports your paid, partially paid, and partially refunded orders. It skips orders Toki already has and orders with no customer or email address. It links each order to the customer's member profile, and customers who aren't members yet become members. If an imported order is older than a member's Joined date, the date moves back to that order's date. Imported orders count toward the order counts and First time purchasers only checks of purchase rewards, but they don't earn rewards themselves. See Purchase rewards.

Your Toki API key

The Toki API Key card is at the bottom of the Integrations page. The key identifies your account to the Toki API. Your developer uses it to build custom connections and to set up webhook subscriptions; Toki also signs every webhook delivery with it. See Webhooks.

Your account has one active key at a time. Treat it like a password: share it only with the people who build on your behalf.

Chat with us and we'll share the API reference with you and your developer. We can also help you set up Toki's design modules on a headless storefront, where they go in with an HTML snippet; see Install modules on your storefront.

Generate and copy the key

  1. Open Integrations and scroll to Toki API Key.
  2. If the card says You don't have an API Key yet, click Generate.
  3. The key appears next to Your Toki API Key:. Click the copy icon beside it to copy it to your clipboard.

Regenerate the key

Click Regenerate on the Toki API Key card to replace the key. The old key stops working the moment the new one appears, so give the new key to your developer right away and update any tool that uses the old one. Webhook deliveries are signed with the new key from then on.

Webhook logs

Click Webhooks Logs under the Toki API Key card to see your webhook subscriptions, every delivery Toki sent, and how your endpoint responded. See Webhook logs.

Related

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