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 — see the warning below before you decide.
What the chatbot can do
Step 0:
- 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.