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.
- Create a Flow workflow. Apps → Flow → Create workflow. Pick the trigger Reward code issued.
- 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. - 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.
- 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. - 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 event | Klaviyo flow | Properties to send |
|---|---|---|
| Reward code issued | "Here's your code" with the code front and centre | reward_code, reward_value, expires_on, tier_name |
| Tier reached | Welcome to the new tier and what it unlocks | tier_name, previous_tier_name, spend_this_year |
| About to lose tier | December reminder with the exact amount to keep their status | current_tier_name, spend_needed_to_keep |
| Tier lost | A January win-back offer | previous_tier_name, new_tier_name |
| Reward code about to expire | "Use it before it's gone", a few days out | reward_code, reward_value, expires_on, days_left |
| Reward code used | A thank-you, or a nudge toward the next code | reward_code, order_name |
Good to know
- Use a sender address on your own domain. Klaviyo refuses Gmail and similar addresses, or delivers them to spam.
- Sample events use test values such as
TEST-CODE-1234, so they're easy to spot and exclude. - Codes are still issued without Klaviyo. If the workflow is off, customers see their codes on their Rewards page.