Connecting Salesforce to AppsFlyer
Salesforce holds the opportunity, the amount and the close — the only place the actual revenue outcome is recorded. AppsFlyer exists because mobile app attribution is a different problem from web attribution, and on iOS a large share of it is now aggregated and delayed by design rather than by accident. The join between them succeeds or fails on one thing: whether the AppsFlyer device identifier, appsflyer_id reaches the Salesforce Lead or Opportunity before the conversion happens, because AppsFlyer can only match a conversion it can tie back to a click it recognizes.
Free30 minutesNo obligation
Specific to this pair
When a Salesforce deal belongs in AppsFlyer, and when it doesn't
AppsFlyer fits only funnels where users start an application in-app and a rep closes it in Salesforce. Have the app set your customer user ID, write the appsflyer_id onto the Lead, and map it to the Opportunity. On Closed Won, post an in-app event with amount, currency and opportunity ID, configuring partner postbacks deliberately. SKAdNetwork windows often miss these deals.
Most Salesforce opportunities are signed by a company on a contract, nowhere near an app install, and posting them to the AppsFlyer server-to-server API with no appsflyer_id attributes them to nothing. The pair fits one shape: an app where the user starts an application or request in-app and a human closes it later in Salesforce, such as a membership, a quote or an enrollment. If that is not your funnel, keep AppsFlyer on installs and in-app events.
Where it fits, the join is built at sign-up: the app sets your own customer user ID in the SDK, your backend writes the appsflyer_id onto the Lead, and the field mapping carries it to the Opportunity. On Closed Won, a flow posts an in-app event with the amount, the deal currency and the opportunity ID. Map that event deliberately in each partner's postback settings, or AppsFlyer will forward a sales-closed deal to ad networks as if it were an in-app purchase.
Timing is the limit. On iOS users without ATT consent, SKAdNetwork's conversion windows close long before a sales-assisted deal usually does, so those users never report the deal at all. For a deal reopened after closing, check whether your setup accepts a negative-revenue event rather than leaving the original standing.
Salesforce → AppsFlyer · what breaks
Why this join usually fails — Salesforce → AppsFlyer
- 01
The AppsFlyer device identifier, appsflyer_id never reaches Salesforce
Lead conversion is where identifiers die. A custom field on Lead that has no mapped counterpart on Contact or Opportunity is silently discarded when the Lead converts, and nobody notices until months of data are unattributable.
- 02
The identifier is lost at lead conversion
This one failure explains most broken Salesforce attribution. The data is captured correctly, then thrown away by a mapping nobody configured.
- 03
Web conversions sent to a mobile attribution platform
This is the common error and it produces confident nonsense. A purchase made on your website has no device identifier and no install behind it. AppsFlyer will either discard it or attribute it to nothing, and the revenue disappears somewhere between the two systems without anyone noticing it went.
- 04
Nothing reconciles afterwards
AppsFlyer shows the event on the raw data export with its attributed media source. Check the raw export, not the aggregate dashboard, and confirm the event carries a device identifier rather than landing as organic.
Salesforce → AppsFlyer · the fix
What working looks like — Salesforce → AppsFlyer
The AppsFlyer device identifier, appsflyer_id on every opportunity
Conversions arriving in AppsFlyer
The event is attributed to the install source, forwarded to whichever networks are configured, and appears in the cohort reporting.
Reconciled against the source
Salesforce → AppsFlyer · architecture
How Salesforce and AppsFlyer actually connect
- 1
Salesforce holds the truth
The opportunity carries the amount, stage and close date. Because Leads convert into Contacts, Accounts and Opportunities, the identifier must be mapped through the conversion or it is dropped exactly at the moment the record becomes valuable.
- 2
AppsFlyer needs a click to match
AppsFlyer needs the device identifier and an event name it recognizes, plus the revenue value for in-app purchases. A server event about a user with no linked device cannot be attributed to an install.
- 3
The identifier is the bridge
The AppsFlyer device identifier, appsflyer_id, captured at the visit and carried into the Salesforce Lead or Opportunity.
- 4
The event source decides reliability
Fire on the transition into Closed Won, carrying the amount and the identifier. Note that Salesforce's own advertising integrations vary in what they support — build on the record, not on a connector that might change.
- 5
Deduplication at the destination
AppsFlyer deduplicates in-app events by its own event identifier. Sending the same purchase from both the SDK and your server produces two events and double-counts revenue in every dashboard downstream, including the ad networks AppsFlyer forwards to.
Salesforce → AppsFlyer · normal or broken
Working vs. broken, side by side — Salesforce → AppsFlyer
Normal, not a fault
The AppsFlyer device identifier, appsflyer_id present on the opportunity
Sent from a Salesforce flow, Apex trigger or scheduled export on StageName change
Deduplicated correctly
AppsFlyer deduplicates in-app events by its own event identifier. Sending the same purchase from both the SDK and your server produces two events and double-counts revenue in every dashboard downstream, including the ad networks AppsFlyer forwards to.
Reconciles with the source
Actually broken
The AppsFlyer device identifier, appsflyer_id missing on most records
Lead conversion is where identifiers die. A custom field on Lead that has no mapped counterpart on Contact or Opportunity is silently discarded when the Lead converts, and nobody notices until months of data are unattributable.
Sent from the browser
This one failure explains most broken Salesforce attribution. The data is captured correctly, then thrown away by a mapping nobody configured.
Counted twice, or not at all
This is the common error and it produces confident nonsense. A purchase made on your website has no device identifier and no install behind it. AppsFlyer will either discard it or attribute it to nothing, and the revenue disappears somewhere between the two systems without anyone noticing it went.
Nobody has reconciled it
Salesforce → AppsFlyer · diagnose
Diagnostic order — Salesforce → AppsFlyer
- 01
Count opportunitys carrying the AppsFlyer device identifier, appsflyer_id
- 02
Follow one real conversion end to end
- 03
Convert a test Lead and inspect the resulting Opportunity
If the identifier is not on the Opportunity, the field mapping is missing. This takes five minutes and rules out the most likely cause outright.
- 04
Check what share of your revenue happens in the app at all
If most purchases are on the web, AppsFlyer is not your conversion destination and the work belongs somewhere else entirely.
- 05
Read the match rate, not the success message
AppsFlyer shows the event on the raw data export with its attributed media source. Check the raw export, not the aggregate dashboard, and confirm the event carries a device identifier rather than landing as organic.
Salesforce → AppsFlyer · prove
How it gets proven — Salesforce → AppsFlyer
Source of truth
A Salesforce report of Closed Won opportunities for the same window, by close date.
- The AppsFlyer device identifier, appsflyer_id confirmed present on a live opportunity.
- In-app revenue events reconciled per transaction against your billing system, with the organic share stated rather than assumed away.
- A test lead converted end to end with the identifier confirmed present on the resulting opportunity.
Salesforce → AppsFlyer · free audit
What we check in the free audit
- Count opportunitys carrying the AppsFlyer device identifier, appsflyer_id
- Follow one real conversion end to end
- Convert a test Lead and inspect the resulting Opportunity
- Check what share of your revenue happens in the app at all
- Read the match rate, not the success message
Checked against
A Salesforce report of Closed Won opportunities for the same window, by close date.
Free30 minutesNo obligation
Salesforce → AppsFlyer · when not to buy
When you don't need this — Salesforce → AppsFlyer
- Measure identifier coverage yourself first — pull your last hundred opportunitys and count how many carry the AppsFlyer device identifier, appsflyer_id.
- If your Salesforce instance is heavily customized and administered by another team, scope their availability before commissioning this — the build is usually blocked on admin access rather than on the tracking work.
- If you have no mobile app, this is not a destination for you. If you have one but sell mostly on the web, send web conversions to your ad platforms directly and use AppsFlyer only for install and in-app events.
Salesforce → AppsFlyer · what we deliver
What gets built — Salesforce → AppsFlyer
Identifier capture into Salesforce
Custom field on Lead, matching custom field on Contact and Opportunity, and the field mapping configured so conversion carries it across. Verify by converting a test lead and reading the resulting opportunity.
Event source: a Salesforce flow, Apex trigger or scheduled export on StageName change
Fire on the transition into Closed Won, carrying the amount and the identifier. Note that Salesforce's own advertising integrations vary in what they support — build on the record, not on a connector that might change.
Dispatch to AppsFlyer
The AppsFlyer server-to-server events API, posted from your billing system with the device identifier and revenue.
Reversals where they exist
An opportunity moved back out of Closed Won can be retracted, and enterprise pipelines do this often enough to be worth wiring.
Written guarantee
95%+ tracking accuracy
Measured against A Salesforce report of Closed Won opportunities for the same window, by close date.. Miss it and we keep working at no cost.
From $400 · See packages
FAQ
Salesforce → AppsFlyer questions, answered
Only for deals that started from a user of your app, with that user's appsflyer_id stored on the Lead and carried to the Opportunity. Without the device identifier the event cannot be attributed to an install.
SKAdNetwork only accepts conversion value updates within fixed windows after install. A deal closed by a rep weeks later usually falls outside them.
Almost always because the AppsFlyer device identifier, appsflyer_id never reached the Salesforce Lead or Opportunity. Lead conversion is where identifiers die. A custom field on Lead that has no mapped counterpart on Contact or Opportunity is silently discarded when the Lead converts, and nobody notices until months of data are unattributable. Measure coverage before debugging the dispatch.
AppsFlyer assigns its own device ID and matches installs to clicks through referrer data on Android and Apple's frameworks on iOS. There is no durable cross-device identifier. On iOS without ATT consent, attribution falls back to SKAdNetwork, which returns aggregated conversion values on a delay with no user-level detail at all — so a share of your installs will be attributable only in aggregate, permanently.
A Salesforce flow, Apex trigger or scheduled export on StageName change. Fire on the transition into Closed Won, carrying the amount and the identifier. Note that Salesforce's own advertising integrations vary in what they support — build on the record, not on a connector that might change.
AppsFlyer shows the event on the raw data export with its attributed media source. Check the raw export, not the aggregate dashboard, and confirm the event carries a device identifier rather than landing as organic.
More on Salesforce → AppsFlyer
- Salesforce → Google AdsConnecting Salesforce to Google Ads
- Salesforce → MetaConnecting Salesforce to Meta Conversions API
- Salesforce → GA4Connecting Salesforce to GA4
RELATED GUIDES
Where Salesforce → AppsFlyer fits in the rest of your tracking
- Copper → AppsFlyerConnecting Copper to AppsFlyer
- Keap → AppsFlyerConnecting Keap to AppsFlyer
- Close → AppsFlyerConnecting Close to AppsFlyer
- Law firmsConversion tracking for law firms, without sending case details anywhere
- Less Annoying CRM → AppsFlyerConnecting Less Annoying CRM to AppsFlyer
- Freshsales → AppsFlyerConnecting Freshsales to AppsFlyer
- Zoho Books → AppsFlyerConnecting Zoho Books to AppsFlyer
- SugarCRM → AppsFlyerConnecting SugarCRM to AppsFlyer
Free · 30 min
Get Salesforce and AppsFlyer joined properly
Free30 minutesNo obligation
