Integrations

Klaviyo

Send TierWise's events to Klaviyo and build flows on them. The connection runs through Shopify Flow, so there's no API key to paste into TierWise.

How it fits together

TierWiseReward code issued
Shopify FlowKlaviyo: Track an Event
KlaviyoFlow sends the email

Setting it up

You need the Klaviyo app installed on your store and your Klaviyo public API key, from Klaviyo → Settings → API keys.

  1. Create a Flow workflow. Apps → Flow → Create workflow. Pick the trigger Reward code issued.
  2. Add the Klaviyo action. Add action → Klaviyo → Track an Event. Paste your public API key and name the event, for example Loyalty reward issued. Use Add variable to fill in the customer's email and name.
  3. Add the event properties. Paste the snippet from Event properties to paste into the Event Properties box. Leave Customer Properties empty: anything there is written onto the person's Klaviyo profile for good. Save and turn the workflow on.
  4. Send Klaviyo a sample event. Klaviyo only lists an event after it has received it once, so you can't build the email until something has fired the event. That is what the sample button is for. In TierWise, open Integrations, enter the email of a customer on your store (usually your own) and click Send sample events. It sends every event once, with obvious test values, through whatever Flow workflows you have. Events without a workflow go nowhere, so you can build one workflow at a time and press the button again after each. Give Klaviyo a minute. Use {{customer.email}} for the email in the Klaviyo action, not the last order's email, or the sample will fail for a customer with no orders.
  5. Build the Klaviyo flow. In Klaviyo, create a flow triggered by your event under Your metrics → Shopify. Add an email. In the editor, click Preview, pick the sample event, and click a field under Event properties to copy it into the message. Set the email and the flow to Live.

Repeat steps 1 to 3 for any other event you want in Klaviyo. Use the field names from Shopify Flow as property values.

Event properties to paste

The Event Properties box takes one JSON object. The left side of each line is the name you'll see in Klaviyo; the right side is the field from the TierWise trigger, which Flow fills in when the event fires. Copy the snippet for the trigger you picked and paste it in as is.

Reward code issued
{
  "reward_code": "{{rewardCode}}",
  "reward_value": "{{rewardValue}}",
  "reward_expires_on": "{{rewardExpiresOn}}",
  "tier_name": "{{tierName}}"
}

The other five events, for when you build more workflows:

Reward code about to expire
Reward code about to expire
{
  "reward_code": "{{rewardCode}}",
  "reward_value": "{{rewardValue}}",
  "reward_expires_on": "{{rewardExpiresOn}}",
  "days_left": "{{daysLeft}}",
  "tier_name": "{{tierName}}"
}
Reward code used
Reward code used
{
  "reward_code": "{{rewardCode}}",
  "reward_value": "{{rewardValue}}",
  "order_name": "{{orderName}}"
}
Tier reached
Tier reached
{
  "tier_name": "{{tierName}}",
  "previous_tier_name": "{{previousTierName}}",
  "spend_this_year": "{{spendThisYear}}"
}
About to lose tier
About to lose tier
{
  "current_tier_name": "{{currentTierName}}",
  "tier_in_january": "{{tierInJanuary}}",
  "spend_this_year": "{{spendThisYear}}",
  "spend_needed_to_keep": "{{spendNeededToKeep}}"
}
Tier lost
Tier lost
{
  "previous_tier_name": "{{previousTierName}}",
  "new_tier_name": "{{newTierName}}",
  "spend_last_year": "{{spendLastYear}}"
}

Flows worth building

TierWise eventKlaviyo flowProperties to send
Reward code issued"Here's your code" with the code front and centrereward_code, reward_value, expires_on, tier_name
Tier reachedWelcome to the new tier and what it unlockstier_name, previous_tier_name, spend_this_year
About to lose tierDecember reminder with the exact amount to keep their statuscurrent_tier_name, spend_needed_to_keep
Tier lostA January win-back offerprevious_tier_name, new_tier_name
Reward code about to expire"Use it before it's gone", a few days outreward_code, reward_value, expires_on, days_left
Reward code usedA thank-you, or a nudge toward the next codereward_code, order_name

Good to know