Documentation · Integrations

Klaviyo Setup

Let the chatbot read back a discount code Klaviyo already issued to a customer, tell them whether they are subscribed, and say what happened to an email they never received.

Setup

Step 1: Create a private API key

In Klaviyo, go to Settings → API keys and create a private key.

Step 2: Pick your newsletter list

This is what "am I subscribed?" gets answered about. Leave it unset and the chatbot reports the profile's overall marketing consent instead, which is the right answer for a store running a single newsletter.

Step 3: Limit which coupons may be read

Leave this empty to allow any coupon the key can see. Set it if you also run staff or wholesale coupons through Klaviyo — otherwise the chatbot could read those back to a customer who asks the right question.

Step 4: Decide whether the chatbot may check email delivery

Offered only if your key can read Events and Metrics, because that is what the lookup needs. Leave the email list empty to cover everything you send, or name a flow or message ID if the chatbot should only ever discuss one email — the welcome discount, typically. The ID is in the address bar when you open that email in Klaviyo.

Step 5: Decide whether the chatbot may unsubscribe people

Off unless you turn it on, and it is the only setting here that changes what your key must be able to do — read the note on unsubscribing below before you decide.


What the chatbot can do

  • Look up a discount code the customer already has. "I lost my welcome code" is the common one.
  • Check newsletter subscription — including telling a customer their emails were bouncing, which is something they can actually fix.
  • Check what happened to an email you sent them: whether it went out, when, and whether it bounced. Needs the Events scope.
  • Unsubscribe them, if you switch it on. Off by default, and the only action here that writes.

Unsubscribing is the one thing that writes

Leave it off — the default — and everything works with a read-only key, which cannot change anyone's consent no matter what happens in a conversation.

Turn it on and the key also needs subscriptions:write. Klaviyo fixes a key's scopes when you create it, so that means replacing the key rather than editing it.

What you get for it: "stop emailing me" handled on the spot, instead of the customer hunting for a link in an old email. It only ever unsubscribes the address they verified, and it never touches order confirmations or delivery updates — those are not marketing email.

Delivered is not the same as "in their inbox"

What Klaviyo records is that the customer's mail provider accepted the message. It cannot see a spam folder, so the chatbot says the email was accepted and suggests searching spam — it never tells someone an email is sitting in an inbox they are looking at.

It also cannot resend anything. Klaviyo sends to lists and segments, and resending one email to one person is a button in Klaviyo's own interface with no API behind it. When a customer is chasing a discount code, the chatbot reads the code out instead, which solves the problem without another email.

There is one state it cannot see: an email Klaviyo skipped. That shows in your flow analytics but not in the data an integration can read, so a suppressed customer produces no delivery record at all — the chatbot explains the suppression instead.