Klaviyo
Capture leads from AI conversations and sync them to Klaviyo as profiles, with automatic consent handling and subscription management.
Automatically extract lead information from conversations and create or update profiles in Klaviyo. Includes built-in consent handling for email and SMS marketing subscriptions.
Prerequisites
A Klaviyo account
A Klaviyo Private API key
Getting Your API Key
In Klaviyo, go to Settings > API Keys
Click Create Private API Key
Give the key a name, then Select scopes (see below) and create the key
See Klaviyo's guide for detailed instructions
Required Scopes
When creating the Private API Key, set the following scopes. Everything else can be set to No Access.
Lists
Full (Read & Write)
Profiles
Full (Read & Write)
Subscriptions
Full (Read & Write)
Setup
Step 1: Connect Klaviyo
In Alhena, go to Settings > Integrations
Find Klaviyo and click Enable
Paste your Klaviyo Private API key
Click Connect
Step 2: Configure Attributes
Choose which information the AI should extract from conversations and sync to each Klaviyo profile:
Click Add attribute to open the Add attributes for Klaviyo profiles dialog.
Pick an Attribute name from the dropdown of predefined Klaviyo properties —
first_name,last_name,phone_number,organization,title,utm_source,utm_medium,utm_campaign,gclid— or choose Custom attribute to enter your own property key (e.g.,company_size,industry).Add an Attribute description that tells the AI how to extract the value (required). Selecting a predefined attribute pre-fills a suggested description and examples, which you can edit.
Optionally add Examples of expected values using Add example (up to 10).
Click Save changes.
Default attributes are pre-configured:
emailandconsentare always included and cannot be removedfirst_nameandlast_name
Step 3: Assign Conversations to Lists (Optional)
Beyond creating or updating profiles, you can have the AI add conversations to specific Klaviyo lists based on rules you describe in plain language.
Assignment rules
In the Klaviyo Lists section:
Click Add assignment rule.
Select the Klaviyo list the matching conversations should be added to. (Each list can have one rule; lists that already have a rule are not shown.)
Under When should conversations be added to this list?, describe the condition in natural language — e.g., "Identify users looking for wholesale opportunities and extract their business email." The AI uses this during conversations to decide when to add a profile to the list.
Click Save changes.
Saved rules appear in a table showing the List name and Assignment rule, with actions to edit or delete each one.
Fallback list
In the Fallback List section, select a list to catch conversations that don't match any assignment rule, then click Save changes. Leave it unset if you don't want a catch-all list.
What Gets Captured
Automatic context (no setup needed):
alhena_chat_id- Conversation identifierpage_urlandpage_title- Where the conversation happenedVisitor location (city, region, country, timezone, IP)
Optional attributes you can add:
Standard Klaviyo fields (
phone_number,organization,title, etc.)Custom profile properties
UTM parameters (
utm_source,utm_medium,utm_campaign,gclid)
Consent Handling
Consent is handled automatically:
The
consentattribute is included by defaultIf a user indicates they want to receive marketing communications, Alhena records their consent
With consent + email: subscribed to Email Marketing
With consent + phone: subscribed to SMS Marketing (requires Klaviyo SMS to be enabled)
Without consent: profile is created but not subscribed
Enabled Agents
When you connect Klaviyo, lead capture is enabled for the lead generation agent:
Lead generation agent
Extracts configured attributes from conversations and syncs them to Klaviyo
You can configure this agent in AI Settings > Agents.
Disconnecting
To disconnect Klaviyo:
Go to Settings > Integrations > Klaviyo
Click Disconnect — this takes effect immediately
Last updated