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

# Set up Salesforce with Zapier

> Send leads, opportunities and Closed Won deals from Salesforce to Cometly with Zapier, so you can see which ad produced each lead and sale.

You can send leads and opportunities from Salesforce to Cometly with Zapier, a tool that passes data between apps through automated workflows called Zaps. Each Zap watches Salesforce for a change, such as a new lead, and sends it to Cometly as an event. An event is an action Cometly tracks for a person, such as a lead or a purchase.

Most of your sales pipeline happens in Salesforce, long after the ad click. Once these events reach Cometly, it can match each one to the visitor and to the ad or channel that brought them. Your reports then show which ads produce leads, opportunities and closed revenue.

This guide covers three Zaps:

1. [Send leads to Cometly](#send-leads-from-salesforce-to-cometly): track new leads created in Salesforce.
2. [Send opportunities to Cometly](#send-new-salesforce-opportunities-to-cometly): record opportunities as events in Cometly.
3. [Send Closed Won opportunities to Cometly](#send-closed-won-salesforce-opportunities-to-cometly): report to Cometly when an opportunity is moved to "Closed Won" in Salesforce.

> [!NOTE]
>
> Cometly also has a direct Salesforce integration with triggers for new and updated contacts, leads and opportunities. See [Salesforce](https://docs.cometly.com/integrations/platforms/salesforce.md).

## Before you start

Connect Cometly to Zapier. In Cometly, go to **Integrations** > **Zapier**, click **Activate Zapier** and create an API token. See [Zapier](https://docs.cometly.com/integrations/zapier.md).

## Send leads from Salesforce to Cometly

Set up a Zap so that every new lead in your Salesforce account is sent to Cometly:

[Configuring Zapier Integration for Salesforce Leads](https://www.loom.com/embed/cc83898eee904f61a2a89fd9b9f6d534)

## Send new Salesforce opportunities to Cometly

Set up a Zap so that when a lead is converted into an opportunity in Salesforce, it is tracked in Cometly:

[Setting up a Zap for when Leads convert into Opportunities in Salesforce](https://www.loom.com/embed/8700a66c76a6460f8084d5dac7c1568a)

## Send Closed Won Salesforce opportunities to Cometly

Set up a Zap that sends a purchase event to Cometly when your opportunities are moved to the "Closed Won" status:

[Setting up Zap for when your Salesforce Opportunities get moved to Closed Won](https://www.loom.com/embed/07020cc836bd43cba239c8f0d0cea199)

## Check it worked

In Zapier, click **Test Step** on the Cometly action to send a test event. Then open **Events Manager** in Cometly and check the **Events Log** tab: the test event appears there. Once your Zaps are on, new Salesforce leads and opportunities show up in the same place.

## Frequently asked questions

### Should I use Zapier or the direct Salesforce integration in Cometly?

The direct integration sends Salesforce events to Cometly without a Zap in between, so check it first. It needs a Salesforce **Enterprise**, **Unlimited**, **Developer** or **Performance** edition and the **Author Apex** permission on your Salesforce user profile. The Zaps on this page are the other way to send the same leads and opportunities. See [Salesforce](https://docs.cometly.com/integrations/platforms/salesforce.md).

### Do I need a separate Zap for each Salesforce event?

Yes. Create one Zap per event type, which is why this guide has three: one for leads, one for new opportunities and one for Closed Won opportunities. To control which records are sent, add a Zapier filter to the Zap.

### How do I send the Salesforce opportunity amount to Cometly?

In the Cometly action of your Zap, map the Salesforce field that holds the amount to the event value. Cometly uses that value to report revenue for the event.

## Next steps

* [Connect Cometly to Zapier and send events from any app](https://docs.cometly.com/integrations/zapier.md)
* [Use the direct Salesforce integration instead of Zapier](https://docs.cometly.com/integrations/platforms/salesforce.md)
* [Manage the custom events your Zaps send to](https://docs.cometly.com/guides/events/custom-events.md)
* [Send HubSpot deals to Cometly with Zapier](https://docs.cometly.com/integrations/guides/hubspot-deals-zapier.md)
* [Send events with webhooks when Zapier has no app for your tool](https://docs.cometly.com/integrations/webhooks.md)

Still have questions or need a hand? We're happy to help. Reach our team at [support@cometly.com](mailto:support@cometly.com).


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