> ## Documentation Index
> Fetch the complete documentation index at: https://docs.meetdarwin.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Send leads to Salesforce

> Create a Salesforce lead for every visitor who leaves their details in Darwin's website chat, through Zapier and without code.

<div className="darwin-location"><strong>Runs through</strong> Zapier → Darwin + Salesforce <a href="https://app.meetdarwin.ai/admin/settings/api">Open API settings ↗</a></div>

When a visitor leaves their name and email in Darwin's chat, Zapier creates a lead in Salesforce with the page they chatted on, their traffic source and a link to the conversation.

<Note>
  This connection runs through Zapier: Darwin's Zapier app starts the Zap and Zapier's Salesforce app does the work in Salesforce. You choose the fields. Salesforce is a Premium app on Zapier, so this Zap needs a paid Zapier plan.
</Note>

## Before you start

* A paid Zapier plan (Salesforce is a Premium app on Zapier).
* A Salesforce edition with API access: Enterprise, Unlimited, Performance or Developer, or Professional with API access added. The connecting user needs permission to create leads.
* Darwin added to your Zapier account and a Darwin key for Zapier. [Connect Zapier](/integrations/zapier) covers both in two minutes.

## Create a lead for every new lead

<Steps>
  <Step title="Choose the Darwin trigger">
    In Zapier, create a Zap. For the trigger, choose **Darwin** and the event **New Lead**. Connect your Darwin account with the key, then select **Test trigger** to load a sample.
  </Step>

  <Step title="Add the Salesforce action">
    Choose **Salesforce** as the action app and the event **Create Lead**, then connect your Salesforce account.

    Salesforce requires **Last Name** and **Company** on every lead, and visitors don't always give them. Before this step, add a **Formatter** step (**Text → Default Value**) that fills a placeholder such as `Website visitor` when **Company** is empty, and another for **Last name**.
  </Step>

  <Step title="Map the fields">
    Darwin's lead carries **Email**, **First name**, **Last name**, **Company** and **Phone** when the visitor gave them, plus **Page URL**, **Traffic source**, the UTM values, Darwin's grade and **Darwin url**, a link to the conversation. Map the required fields from the Formatter steps:

    | Salesforce field | Darwin field |
    | - | - |
    | Last Name | Last name (with its default) |
    | Company | Company (with its default) |
    | First Name | First name |
    | Email | Email |
    | Phone | Phone |
    | Lead Source | Pick a value from your picklist, such as Web |
    | Description | Visitor's first message, then Darwin url |
  </Step>

  <Step title="Test and publish">
    Test the action, check the result in Salesforce, then publish the Zap. Open the new lead in Salesforce and check the owner your assignment rules gave it.
  </Step>
</Steps>

## Also useful

* **Route hot visitors fast.** A Zap on **Visitor Asked for a Person** can create the lead with a higher rating, or post to your sales channel at the same time.
* **Add to a campaign.** Add Zapier's **Add Lead to Campaign** step to attribute website chat leads to a Salesforce campaign.

## Good to know

* Zapier needs Salesforce My Domain, and your Salesforce admin may need to approve Zapier as a connected app.
* The Zap acts on leads from the moment you turn it on. Earlier leads are in Darwin under Conversations, which you can download as a CSV.

<AccordionGroup>
  <Accordion title="Darwin isn't listed in Zapier">
    Darwin is in private beta on Zapier. Open the invite link in [Connect Zapier](/integrations/zapier) while signed in to the Zapier account you build Zaps in.
  </Accordion>

  <Accordion title="Is this a native Salesforce integration?">
    No. It runs through Zapier: Darwin's Zapier app starts the Zap and Zapier's Salesforce app creates the lead. You choose which fields go where.
  </Accordion>

  <Accordion title="Salesforce says a required field is missing">
    Lead requires Last Name and Company. Add the Formatter default steps above, or map a field your visitors always give.
  </Accordion>

  <Accordion title="My Agent Studio test didn't start the Zap">
    Preview conversations never start a Zap, so testing your agent doesn't fill your tools. Chat on your live website to test end to end, or use the samples from **Test trigger**.
  </Accordion>
</AccordionGroup>

[Connect Zapier →](/integrations/zapier) · [All Darwin triggers and actions →](/integrations/zapier#triggers) · [Webhooks and the API →](/api-reference/introduction)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.