> For the complete documentation index, see [llms.txt](https://alhena.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://alhena.gitbook.io/docs/integrations/marketing.md).

# Lead Generation

Capture customer information from AI conversations and sync it to your marketing and customer data platforms.

These integrations work with the **Lead generation agent**, which engages users to capture contact information and preferences during conversations.

## Supported Platforms

* [HubSpot](/docs/integrations/marketing/integrating-hubspot-with-alhena-ai.md) - Sync leads to HubSpot CRM
* [Klaviyo](/docs/integrations/marketing/integrating-klaviyo-with-alhena-ai.md) - Create and update Klaviyo profiles
* [mParticle](/docs/integrations/marketing/integrating-mparticle-with-alhena-ai.md) - Send customer data to mParticle CDP

## How It Works

Lead generation has two separate parts:

1. **Integration attributes define what Alhena can extract and where it is sent.** Add every contact detail, preference, quiz answer, or consent value that you want to sync in the HubSpot, Klaviyo, or mParticle integration settings.
2. **A guideline defines when and how the AI should ask for those values.** For example, the AI can collect an email after a product quiz, ask a wholesale shopper for company details, or offer marketing signup after answering a question.

When a customer provides the requested information, the lead generation agent extracts the configured attributes from the conversation and syncs them to the connected platform.

{% hint style="warning" %}
Connecting a lead generation integration does not, by itself, make the AI ask customers for information. Likewise, a guideline can ask for a value, but that value is not synced unless the corresponding integration attribute is configured. Set up both parts for every value you want to collect.
{% endhint %}

## Set Up Proactive Lead Capture

1. Connect [HubSpot](/docs/integrations/marketing/integrating-hubspot-with-alhena-ai.md), [Klaviyo](/docs/integrations/marketing/integrating-klaviyo-with-alhena-ai.md), or [mParticle](/docs/integrations/marketing/integrating-mparticle-with-alhena-ai.md).
2. In the integration settings, configure every attribute you want Alhena to extract. Use a clear description and examples so the AI can recognize the value in natural conversation.
3. In **AI Settings > Guidelines**, add or update a guideline that says:
   * when to collect the information;
   * which values to request;
   * how to ask for them; and
   * what to do if the customer declines or skips an optional field.
4. Test the complete flow in the Playground, including a customer who provides all fields and one who declines an optional field.

For example:

```
When a shopper finishes the product recommendation quiz, offer to email their
results. If they accept, collect their first name and email address. Ask for
marketing consent separately, and continue without subscribing them if they
decline. Do not ask again for information they already provided.
```

Keep the guideline and integration attributes aligned. In this example, configure attributes for first name, email address, quiz results you want to retain, and marketing consent before testing the flow.

## Ask AI Help to Draft the Guideline

[AI Help](/docs/features/ai-help.md) can review your existing guidelines and draft a new lead-capture guideline or an edit to an overlapping one. Tell it the collection moment, the fields you need, the destination integration, and how optional fields or consent should behave.

For example, ask:

```
At the end of our product quiz, collect first name, email address, skin type,
and optional email marketing consent, then sync them to Klaviyo. Draft the
guideline and tell me which Klaviyo attributes I need to configure.
```

AI Help can prepare the guideline and identify the integration setup you need. You still configure the attributes on the integration page and approve the guideline before it goes live.
