Salesforce offline conversions to Google Ads, Meta, TikTok and LinkedIn

Salesforce FlowApex or outbound messagePrivate sales webhook
Four ad platforms

Your ads never see what happens after the form. This page shows how to make a Salesforce Flow, Apex trigger or outbound message post each stage change to the DataCops sales webhook, so Google Ads, Meta, TikTok and LinkedIn learn which clicks became customers.

Setup in 5 minutes
No credit card
One lead from a Meta ad
From form fill to won deal in HighLevel
With DataCops
Form fillSent to Meta
Booked callSent to Meta
Showed upSent to Meta
Deal wonSent with its value
Matched to the original ad click by email

Trusted by agencies and brands running paid media

AffilinoBigfishClever DigitalKeetraxLegendListingLogicNumeroStormZealdBurst Digital
Definition

How do Salesforce offline conversions work?

Offline conversions are sales, or steps toward a sale, that happen away from your website and are sent back to the ad platform that brought the customer. In Salesforce that means a lead that became qualified, or an opportunity that reached Closed Won.

DataCops has no native Salesforce app, and we will not pretend otherwise. What it has is a private sales webhook. Salesforce posts a small message when a stage changes, DataCops matches the person to the ad click it kept on your own domain, and sends the result to every platform you connected.

DataCops has no native Salesforce app. A Salesforce Flow, Apex trigger or outbound message posts each stage change to a private webhook, and DataCops sends it to Google Ads, Meta, TikTok and LinkedIn.

What your ads learn from

Salesforce lead to customer
What your ads see today Form Qualified Closed Won, with value
With DataCops Form Qualified Closed Won, with value
Salesforce with a sales cycle
What your ads see today Form Meeting held Proposal Closed Won
With DataCops Form Meeting held Proposal Closed Won

Why send Salesforce stages to your ads

Ad platforms optimize for what they are told. If the only signal is the form fill, they find more people who fill in forms, including the ones who never answer the phone. A Closed Won event with a value tells them what a good click looks like.

The catch is timing. Salesforce closes a deal weeks after the click. Safari caps browser-script cookies at 7 days, and iOS 17 Link Tracking Protection strips gclid and fbclid from links. By the time the deal closes, the ad click is often gone from the browser. DataCops keeps the click on your own domain for up to 90 days, so the match still works on the day Salesforce reports the sale.

How to connect Salesforce to the DataCops webhook

You need the private sales webhook URL from your DataCops dashboard. Treat it like a password and keep it out of shared documents. From Salesforce, there are three ways to call it.

  1. Salesforce Flow: a record-triggered flow on Lead or Opportunity, fired when the stage changes, with an HTTP callout action that posts the JSON below. This needs no code and is the easiest to maintain.
  2. Apex: a trigger or queueable class that makes an HTTP callout when the stage field changes. Use it when you need logic a Flow cannot express, and register the webhook host as a remote site or named credential.
  3. Outbound message or middleware: an outbound message, or Zapier, Make or n8n listening to Salesforce and posting to the webhook. Use it when your team already runs one of these.

Direct posting is one less thing to break. A middleware tool adds a step that can fail, and a task count you may pay for, but it is quicker to set up if nobody on your team writes Flows.

Example payload from a Closed Won opportunity

This is an example, with made-up values. Field names are the real ones the webhook reads.

Example JSON body posted when an opportunity reaches Closed Won

{
  "event": "won",
  "email": "[email protected]",
  "phone": "+14155550137",
  "value": 4800,
  "currency": "USD",
  "order_id": "006XX00000ABC123",
  "gclid": "Cj0KCQjw-example",
  "fbclid": "IwAR-example",
  "lead_id": "00QXX00000LEAD01",
  "test": false
}

The event is required. The stage names to use for lead, booked, showed, won and paid are in the offline conversions docs. Email or phone must be present, and phone should carry the country code. Send value and currency on won events so Google Ads, Meta, TikTok and LinkedIn can optimize for revenue. The click IDs are optional and worth sending when you store them on the Lead or Contact.

Five Salesforce pitfalls to plan for

Most failed Salesforce setups break in the same handful of places.

  1. Lead conversion changes the record. When a Lead converts, Salesforce creates a Contact, an Account and often an Opportunity, and the field values you mapped on the Lead do not always copy across. Map your email, phone and click ID fields on both the Lead and the Contact, and check the conversion field mapping before you go live.
  2. One contact, several opportunities. A customer who buys twice should count twice, but a customer whose opportunity is edited three times should count once. Use the opportunity ID as order_id. The same order_id sent twice is counted once.
  3. Stage renaming. Flows and Apex usually match on the stage name. If someone renames Negotiation to Contract Sent, your automation silently stops firing. Match on a stable field such as IsWon, or keep a short list of allowed stage names and review it whenever the pipeline changes.
  4. Sandbox versus production. A sandbox full of test data will happily post to a live webhook. Send the test flag as true from every sandbox and test record. Test rows are logged, and you can confirm the mapping without a fake sale reaching your ads.
  5. Ownership. Automation runs as a user. If that user is deactivated, the callout stops. Run flows as a system or integration user, and give that user access to the fields you send.

What DataCops does and does not do

DataCops matches each posted sale to the ad click it kept, by click ID or by hashed email and phone, and sends it to Google Ads, Meta, TikTok and LinkedIn. Each row in the delivery log shows as sent, held, skipped or failed, with the reason. Pixel and server events are deduplicated by event_id.

It does not read Salesforce for you, so nothing arrives until Salesforce posts it. It does not reverse refunds on Meta or TikTok. It does not read back per-row Google Ads rejections yet. Microsoft Ads is not supported. LinkedIn matches on hashed email, li_fat_id or name with company, and not on phone, so send email when you can.

Real people only

Filter fake leads before you send

A bot that fills in your form becomes a lead your ads try to find more of. DataCops checks every visit for bots and datacenter traffic, and for VPNs and proxies if you choose. Switch on Real people only for a platform and flagged visits never reach it.

Sales that come from your CRM are sent as your CRM reports them, with no bot check, so qualify them there before you send.

How DataCops spots bots
Meta, delivery
Real people only
Bots and datacenter traffic never reach Meta. VPNs and proxies too, if you choose.
Send everything
Meta gets every visitor, bots included.
Lead from a bot Skipped

Set up Salesforce offline conversions

About 5 minutes for the site, plus the Flow on the Salesforce side.

  1. Step 1
    code

    Add the DataCops script
    One script and one DNS record keep every ad click on your own domain.

  2. Step 2
    ads_click

    Connect your ad platforms
    Sign in to Google Ads, Meta, TikTok or LinkedIn and pick the account.

  3. Step 3
    hub

    Post from Salesforce
    Point a Flow, Apex callout or outbound message at your private sales webhook.

FAQ

No. There is no native Salesforce or Pipedrive app. Salesforce sends stage changes to your private DataCops sales webhook, using a Flow, an Apex callout or an outbound message, or through Zapier, Make or n8n.

Let your ads learn from Closed Won

Start free, add the script, and post your first Salesforce sale in an afternoon.

Setup in 5 minutes. No credit card.

Live traffic quality

Updated just now

Visits · last 24h

487
Real users
35873.5%
Bots · auto-filtered
12926.5%

Without filtering, 26.5% of your reported traffic is bot noise inflating dashboards and draining ad spend.

Don't trust your analytics!

Make confident, data-driven decisions withactionable ad spend insights.

Setup in 2 minutes
No credit card