Connect Klaviyo and build your first flow
By the end of this tutorial, Curobi is sending subscription events to your Klaviyo account, a Klaviyo welcome flow emails every new subscriber, and Curobi has stopped sending its own confirmation email so customers don’t get two. It takes about five minutes, plus however long you spend writing the email.
Works on every Curobi plan, including Free. Development stores can use it too, so you can build and test flows before launch. Background reading: Klaviyo.
Before you start
- Any Curobi plan works, including Free.
- You’re an Owner or Admin in Klaviyo. Other Klaviyo roles can’t create API keys.
- Klaviyo is already connected to your Shopify store through Klaviyo’s own Shopify integration. Curobi adds subscription events to the customer profiles that integration created; it doesn’t replace it.
1. Create a private API key in Klaviyo
Curobi needs a private API key with two permissions: read your account name, and send events. It can’t read your lists, campaigns or anything else.
The quick way: in Curobi, click Integrations in the top navigation, then Set up on the Klaviyo card, then Create the key in Klaviyo. Klaviyo’s create screen opens with both permissions already ticked. Name the key CUROBI, click Create, and copy it.
Step by step, if you’d rather start in Klaviyo:
- Log in to Klaviyo.
- Click your organization name in the bottom-left corner.
- Click Settings, then API keys.
- Click Create Private API Key.
- Name the key CUROBI.
- Choose Custom, then set Accounts to Read Access and Events to Full Access. Leave everything else at No Access.
- Click Create.
- Copy the key now. It starts with
pk_, and Klaviyo shows it only once.
Klaviyo doesn’t let you edit a key’s permissions after it’s created. If you picked the wrong ones, delete the key and create a new one.
2. Connect it in Curobi
- In Curobi, click Integrations in the top navigation.
- On the Klaviyo card, click Set up.
- Paste the key into Private API key.
- Click Connect.
You’ll see “Klaviyo connected.”, followed by how many Curobi metrics were added to Klaviyo (step 3). The Connection section now shows your Klaviyo account name and the date you connected. Curobi checks the key with Klaviyo before saving it, then stores it encrypted. It’s never shown again, not even to you.
A key without Events: Full Access isn’t saved. You’ll see “That key can’t send events. Give it Events: Full Access in Klaviyo, then try again.” If Curobi refuses the key for another reason, see Troubleshooting.
If the message says “N of 9 Curobi metrics were added” or “Couldn’t add the Curobi metrics to Klaviyo”, you’re still connected. Step 3 shows how to add the missing ones.
3. Check your metrics in Klaviyo
Klaviyo only lists a metric once it has received an event. So you can build flows straight away, Curobi sends one sample event for each of the nine Curobi metrics when you connect, instead of waiting for a customer to subscribe, pause or cancel.
- On Curobi’s Klaviyo page, scroll to Metrics in Klaviyo. It shows All 9 added, or how many are not added yet.
- If any are missing, click Add metrics to Klaviyo. It’s safe to click more than once: Klaviyo keeps only one sample per metric.
- In Klaviyo, open Analytics → Metrics. The Curobi metrics show up within a few minutes.
Connected before Curobi added metrics on connect? The section shows 9 not added yet. Click Add metrics to Klaviyo once.
The samples go to a profile called Curobi Sample Events. It has no email address, so no flow can email it and Klaviyo doesn’t bill for it. Each sample is marked Test: true and carries no revenue, and it has the same fields as a real event, so you can use them in flow filters and email previews. Samples aren’t listed under Recent deliveries in Curobi, which shows real subscription events only.
4. Build a flow in Klaviyo
Build the first flow on Curobi Subscription Started: it’s the metric Curobi’s test event sends (item 6), so you can check the flow in your own inbox straight away.
-
In Klaviyo, go to Flows → Create flow → Build your own.
-
Choose Metric as the trigger and pick Curobi Subscription Started.
-
Add an Email action and write your welcome message. To start, paste this block, which uses the ready-to-print fields:
Thanks for subscribing to {{ event.ItemNamesText }}! Billed {{ event.Frequency|lower }}: {{ event.ChargeAmountText }} Next charge: {{ event.NextChargeDateText }}Every field you can use is listed under Event details for your emails.
-
In the email’s settings, turn Smart Sending off while you test. Otherwise Klaviyo skips anyone it emailed in the last 16 hours, which is often you.
-
Set the email and the flow to Live. Klaviyo doesn’t send emails left in Draft.
-
Check it end to end in your own inbox: back in Curobi, scroll to Send a test event, type your own email address in Send to, and click Send test event. The test is always a Curobi Subscription Started, the metric this flow starts on. The sample from step 3 won’t trigger the flow: a flow only reacts to events that arrive after it’s live, and the sample has no email address to send to.
The test sends an event, not an email. Nothing arrives in your inbox unless a live flow is built on the metric. The test is marked Test: true, so you can filter it out of real flows, and it isn’t listed under Recent deliveries in Curobi. To confirm it arrived, look in Klaviyo: Analytics → Metrics, or the activity feed on the profile for the email you typed.
The email should arrive within a minute or two. If it doesn’t, open the flow’s Analytics in
Klaviyo: it shows whether the email was sent, skipped or blocked. The test event has no
ManageUrl, so a “manage your subscription” link in your email will be empty in the test and filled
in for real customers.
5. Hand Curobi’s confirmation email to Klaviyo
Curobi already sends new subscribers a confirmation email. With your welcome flow live, every new subscriber would now get two. Hand Curobi’s to Klaviyo:
- On Curobi’s Klaviyo page, find Who emails your customers.
- On the Subscription confirmed row, click Klaviyo.
- Confirm Switch to Klaviyo.
From now on your Klaviyo flow sends the welcome email and Curobi doesn’t. If Klaviyo is ever disconnected, Curobi goes back to sending its own confirmation automatically. Changing your Curobi plan doesn’t affect this.
Only hand an email over once its Klaviyo flow is Live. Curobi can’t see your Klaviyo flows, so if you switch first, customers get no email at all.
Next steps
- Build more flows. Good next ones: a win-back series on Curobi Subscription Cancelled, a “your box is on its way soon” email with an upsell on Curobi Upcoming Charge, and a friendly “let’s fix your card” message on Curobi Payment Failed. All nine metrics are already in Klaviyo, so you can build these now. To see one send an email, you need a real event on your development store: the test event only sends Curobi Subscription Started, and the samples from step 3 don’t trigger flows.
- Build segments on the profile fields, such as everyone whose Curobi Active Subscriber is true. See Profile fields for segments.
- Check deliveries. Recent deliveries on the Klaviyo page shows every real event as Delivered, Skipped, Retrying or Failed. See Checking it’s working.