Skip to main content
AfterSell → SalesforceIntegration guide

Connecting AfterSell to Salesforce

AfterSell works through checkout extensions and post-purchase pages, which puts its offers inside Shopify's sandboxed surfaces where your own scripts cannot reach. 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 AfterSell upsell order 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

AfterSell and Salesforce: usually the wrong place for upsell data

For a direct-to-consumer AfterSell store, Salesforce is usually a poor fit: order records land where no sales rep works them. It fits only when wholesale, subscriptions or accounts run there. Then write acquisition source, the landing click ID and cumulative post-purchase offer revenue to custom fields on the Contact or Person Account matched on email.

Most AfterSell stores sell direct to consumers, and their order data has no natural home in a Salesforce org built around Leads and Opportunities. If nobody in sales works these customers, pushing every Shopify order and accepted offer into Salesforce creates records no one opens and API usage no one needs. Say no to that version of the project.

The case where it fits is a Shopify store that also runs wholesale, subscriptions or account management through Salesforce. There, the useful write is to the Contact or Person Account matched on email: first-order acquisition source, the click ID captured at landing, and cumulative post-purchase offer revenue in custom fields. That lets a rep see that a buyer took the upsell without importing a transaction ledger into the CRM.

Match before you write. Shoppers who check out as guests with a work email one time and a personal email the next will create duplicate Contacts if your matching rules key on email alone, and a validation rule can reject the write while the integration reports success. If a Shopify-to-Salesforce connector is already in place, check whether it syncs order edits; an upsell applied after the order was created may never reach the CRM.

AfterSell → Salesforce · what breaks

Why this join usually fails — AfterSell → Salesforce

  1. 01

    The Lead or Contact identity never reaches AfterSell

    Extension surfaces are isolated by design. Attempting to instrument them client-side does not work and is not supported.

  2. 02

    Trying to instrument a sandbox

    Time gets spent attempting to observe checkout extension behaviour from the storefront. It cannot be done, by design, and every hour spent on it is an hour not spent on the server-side path that works.

  3. 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.

  4. 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.

AfterSell → Salesforce · the fix

What working looks like — AfterSell → Salesforce

  • The Lead or Contact identity on every order

  • 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

AfterSell → Salesforce · architecture

How AfterSell and Salesforce actually connect

  1. 1

    AfterSell holds the truth

    Checkout UI extensions run sandboxed. Nothing you write can observe them, so the only reliable view of what the customer accepted is the order itself.

  2. 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. 3

    The identifier is the bridge

    The Lead or Contact identity, captured at the visit and carried into the AfterSell upsell order.

  4. 4

    The event source decides reliability

    Send the final order total from the webhook, with upsell line items identified.

  5. 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.

AfterSell → Salesforce · normal or broken

Working vs. broken, side by side — AfterSell → Salesforce

Normal, not a fault

  • The Lead or Contact identity present on the order

  • Sent from the Shopify order webhook

  • 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

    Extension surfaces are isolated by design. Attempting to instrument them client-side does not work and is not supported.

  • Sent from the browser

    Time gets spent attempting to observe checkout extension behaviour from the storefront. It cannot be done, by design, and every hour spent on it is an hour not spent on the server-side path that works.

  • 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

AfterSell → Salesforce · diagnose

Diagnostic order — AfterSell → Salesforce

  1. 01

    Count orders carrying the Lead or Contact identity

  2. 02

    Follow one real conversion end to end

  3. 03

    Confirm the conversion is sourced from the order, not from a page

    On modern Shopify checkout there is no supported page-based option left, so this is the only correct architecture.

  4. 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.

  5. 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.

AfterSell → Salesforce · prove

How it gets proven — AfterSell → Salesforce

Source of truth

The final Shopify order total, read from the order record.

  • The Lead or Contact identity confirmed present on a live order.
  • A test value confirmed present on the record in the UI, and confirmed to survive Lead conversion.
  • Final order totals reconciled from the webhook against imported conversions.

AfterSell → Salesforce · free audit

What we check in the free audit

  • Count orders carrying the Lead or Contact identity
  • Follow one real conversion end to end
  • Confirm the conversion is sourced from the order, not from a page
  • Write a test value and open the record in the UI
  • Read the match rate, not the success message

Checked against

The final Shopify order total, read from the order record.

Get my free conversion tracking audit

Free30 minutesNo obligation

AfterSell → Salesforce · when not to buy

When you don't need this — AfterSell → Salesforce

  • Measure identifier coverage yourself first — pull your last hundred orders and count how many carry the Lead or Contact identity.
  • If your conversions already come from the order webhook, checkout extensions change nothing for you.
  • 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.

AfterSell → Salesforce · what we deliver

What gets built — AfterSell → Salesforce

  • Identifier capture into AfterSell

    Do not try to instrument the checkout surface. Read the order server-side, which is the supported and more reliable path anyway.

  • Event source: the Shopify order webhook

    Send the final order total from the webhook, with upsell line items identified.

  • 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

    Refunds reverse.

Written guarantee

95%+ tracking accuracy

Measured against The final Shopify order total, read from the order record.. Miss it and we keep working at no cost.

Get my free conversion tracking audit

From $400 · See packages

FAQ

AfterSell → Salesforce questions, answered

Only if someone in Salesforce acts on them, such as account managers for wholesale or repeat buyers. For pure direct-to-consumer stores, keep upsell analysis in Shopify or a warehouse.

Free · 30 min

Get AfterSell and Salesforce joined properly

Free30 minutesNo obligation