Connecting AfterShip Returns to Salesforce
AfterShip handles returns across many carriers and regions, which makes it the place where the true cost of a cross-border return finally becomes visible. Sending conversions into Salesforce rather than out of it is how marketing data reaches the place sales actually works. The join between them succeeds or fails on one thing: whether the Lead or Contact identity reaches the AfterShip return before the conversion happens, because Salesforce can only match a conversion it can tie back to a click it recognizes.
Free30 minutesNo obligation
Specific to this pair
AfterShip Returns into Salesforce: return history on the account
For most consumer AfterShip stores, Salesforce is not worth it; net returns in a warehouse. For wholesale or service accounts, create a custom Return object linked to the Contact or Account and order, carrying AfterShip return ID as external ID, reason, resolution, refund amount and return shipping cost, joined on order number and email.
Fit first. Most stores using AfterShip Returns do not keep their shoppers in Salesforce CRM, and for them this pair is not worth building. It makes sense for wholesale or B2B accounts, or brands that hold customers as Person Accounts or Contacts for service. The value there is not ad attribution; it is putting return history in front of the people who manage the account. Note that Salesforce Commerce Cloud is a different product from Sales or Service Cloud, so check which one any AfterShip connector you find actually targets.
Join on the store order number and the customer's email. The structure that holds up is a custom Return object with lookups to the Contact or Account and to the order record if you already sync orders, carrying the AfterShip return ID, reason, resolution, refund amount and return shipping cost. Writing return totals into fields on the Contact loses per-return detail and gets overwritten. Make the AfterShip return ID an external ID so upserts do not create a second record on retry; matching on email alone attaches returns to whichever duplicate Contact the rule finds first.
If you already push closed-won value from Salesforce to ad platforms as offline conversions, returns are what turn a wholesale order's gross value into a net one before it goes out. For ordinary consumer orders, keep returns out of Salesforce and net them in a warehouse.
AfterShip Returns → Salesforce · what breaks
Why this join usually fails — AfterShip Returns → Salesforce
- 01
The Lead or Contact identity never reaches AfterShip Returns
Returns are initiated in a hosted portal weeks after the order.
- 02
Return cost averaged across very different markets
A market with a twelve percent return rate and cheap domestic logistics is a different business from one with the same rate and international freight. One blended net figure recommends the wrong market.
- 03
Writes that succeed and change nothing
Field-level security, validation rules and required-field constraints can reject a write while the API reports success. Open the record and look rather than trusting the response.
- 04
Nothing reconciles afterwards
Check the record in Salesforce itself, not the API response. Then confirm the value survives Lead conversion onto the Contact, Account and Opportunity — the mapping is separate and is usually the thing that was missed.
AfterShip Returns → Salesforce · the fix
What working looks like — AfterShip Returns → Salesforce
The Lead or Contact identity on every return
Conversions arriving in Salesforce
The marketing context appears on the record and flows into the opportunity, where sales and reporting can both use it.
Reconciled against the source
AfterShip Returns → Salesforce · architecture
How AfterShip Returns and Salesforce actually connect
- 1
AfterShip Returns holds the truth
A domestic return costs a label. An international return can cost more than the item's margin, and the rate differs by market. Averaging them hides which markets are actually profitable.
- 2
Salesforce needs a click to match
Salesforce needs a resolvable record and a custom field to write to. Field-level security and validation rules can silently reject writes, which is a Salesforce-specific failure that returns success at the API level and changes nothing.
- 3
The identifier is the bridge
The Lead or Contact identity, captured at the visit and carried into the AfterShip return.
- 4
The event source decides reliability
Send orders net of returns including actual return shipping, reported by destination market.
- 5
Deduplication at the destination
Salesforce deduplicates according to whatever matching rules your org has configured, which vary enormously between instances. Duplicate Leads are the standard failure and merging them afterwards is manual work.
AfterShip Returns → Salesforce · normal or broken
Working vs. broken, side by side — AfterShip Returns → Salesforce
Normal, not a fault
The Lead or Contact identity present on the return
Sent from the store order record, adjusted by return outcome and cost
Deduplicated correctly
Salesforce deduplicates according to whatever matching rules your org has configured, which vary enormously between instances. Duplicate Leads are the standard failure and merging them afterwards is manual work.
Reconciles with the source
Actually broken
The Lead or Contact identity missing on most records
Returns are initiated in a hosted portal weeks after the order.
Sent from the browser
A market with a twelve percent return rate and cheap domestic logistics is a different business from one with the same rate and international freight. One blended net figure recommends the wrong market.
Counted twice, or not at all
Field-level security, validation rules and required-field constraints can reject a write while the API reports success. Open the record and look rather than trusting the response.
Nobody has reconciled it
AfterShip Returns → Salesforce · diagnose
Diagnostic order — AfterShip Returns → Salesforce
- 01
Count returns carrying the Lead or Contact identity
- 02
Follow one real conversion end to end
- 03
Compute net margin per destination market after return costs
It frequently reverses which markets look worth advertising in.
- 04
Write a test value and open the record in the UI
The API saying it worked and the field actually holding the value are different things in Salesforce more than anywhere else.
- 05
Read the match rate, not the success message
Check the record in Salesforce itself, not the API response. Then confirm the value survives Lead conversion onto the Contact, Account and Opportunity — the mapping is separate and is usually the thing that was missed.
AfterShip Returns → Salesforce · prove
How it gets proven — AfterShip Returns → Salesforce
Source of truth
Store orders net of returns, with return shipping cost by destination.
- The Lead or Contact identity confirmed present on a live return.
- A test value confirmed present on the record in the UI, and confirmed to survive Lead conversion.
- Net margin reconciled per market after returns and their logistics cost.
AfterShip Returns → Salesforce · free audit
What we check in the free audit
- Count returns carrying the Lead or Contact identity
- Follow one real conversion end to end
- Compute net margin per destination market after return costs
- Write a test value and open the record in the UI
- Read the match rate, not the success message
Checked against
Store orders net of returns, with return shipping cost by destination.
Free30 minutesNo obligation
AfterShip Returns → Salesforce · when not to buy
When you don't need this — AfterShip Returns → Salesforce
- Measure identifier coverage yourself first — pull your last hundred returns and count how many carry the Lead or Contact identity.
- Single-market sellers with flat return shipping can use one blended figure without losing anything.
- If your Salesforce org is administered by a team you cannot get time with, scope their availability before starting — this build is usually blocked on admin access rather than on the work.
AfterShip Returns → Salesforce · what we deliver
What gets built — AfterShip Returns → Salesforce
Identifier capture into AfterShip Returns
Join on the order identifier and carry return cost back onto it before computing margin.
Event source: the store order record, adjusted by return outcome and cost
Send orders net of returns including actual return shipping, reported by destination market.
Dispatch to Salesforce
API writes to the Lead or Contact record, or a platform event, carrying the marketing context as custom field values.
Reversals where they exist
Returns reverse with their full logistics cost.
Written guarantee
95%+ tracking accuracy
Measured against Store orders net of returns, with return shipping cost by destination.. Miss it and we keep working at no cost.
From $400 · See packages
FAQ
AfterShip Returns → Salesforce questions, answered
Check AfterShip's current integration list and confirm whether it targets Commerce Cloud or Sales and Service Cloud. Otherwise, upsert returns through the Salesforce API with the return ID as an external ID.
In a custom Return object linked to the Contact or Account and the order, not as summary fields on the Contact.
Almost always because the Lead or Contact identity never reached the AfterShip return. Returns are initiated in a hosted portal weeks after the order. Measure coverage before debugging the dispatch.
Salesforce resolves on its own record identity — a Lead, a Contact, or an Account — rather than on a click identifier. What you are doing here is attaching marketing context to a record so the pipeline carries it, which means the click identifier arrives as a custom field value rather than as a matching key. The hazard is duplicates: two Leads for one person means two records with half the history each.
The store order record, adjusted by return outcome and cost. Send orders net of returns including actual return shipping, reported by destination market.
Check the record in Salesforce itself, not the API response. Then confirm the value survives Lead conversion onto the Contact, Account and Opportunity — the mapping is separate and is usually the thing that was missed.
More on AfterShip Returns → Salesforce
- AfterShip Returns → Marketing CloudConnecting AfterShip Returns to Salesforce Marketing Cloud
- Loop → SalesforceConnecting Loop Returns to Salesforce
- Loop → Marketing CloudConnecting Loop Returns to Salesforce Marketing Cloud
RELATED GUIDES
Where AfterShip Returns → Salesforce fits in the rest of your tracking
- Narvar → SalesforceConnecting Narvar to Salesforce
- Redo → SalesforceConnecting Redo to Salesforce
- Loop → SalesforceConnecting Loop Returns to Salesforce
- AfterShip Returns → MarketoConnecting AfterShip Returns to Marketo
- AfterShip Returns → 6senseConnecting AfterShip Returns to 6sense
- Footwear ecommerceConversion tracking for footwear ecommerce, measured net of returns
Free · 30 min
Get AfterShip Returns and Salesforce joined properly
Free30 minutesNo obligation
