githubEdit

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

  1. In Klaviyo, go to Settings > API Keys

  2. Create a new Private API key or copy an existing one

  3. See Klaviyo's guidearrow-up-right for detailed instructions

Setup

Step 1: Connect Klaviyo

  1. In Alhena, go to Settings > Integrations

  2. Find Klaviyo and click Enable

  3. Paste your Klaviyo Private API key

  4. Click Connect

Step 2: Configure Attributes

Choose which information to extract from conversations:

  1. Click Add attribute

  2. Enter the Attribute name (Klaviyo property key, e.g., email, first_name, phone_number)

  3. Add a Description to help the AI identify this information

  4. Optionally add Examples of values

Default attributes (pre-configured):

  • email

  • first_name

  • last_name

  • consent


What Gets Captured

Automatic context (no setup needed):

  • alhena_chat_id - Conversation identifier

  • page_url and page_title - Where the conversation happened

  • Visitor 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 is handled automatically:

  • The consent attribute is included by default

  • If 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:

Agent
Description

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:

  1. Go to Settings > Integrations > Klaviyo

  2. Click Disconnect

  3. Confirm the disconnection

Last updated