Skip to main content
AfterShip Returns → AmplitudeIntegration guide

Connecting AfterShip Returns to Amplitude

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. Amplitude is built around behavioural cohorts, which makes the identity resolution and the event taxonomy load-bearing in a way they never are for an ad pixel. The join between them succeeds or fails on one thing: whether the user ID and device ID pair reaches the AfterShip return before the conversion happens, because Amplitude can only match a conversion it can tie back to a click it recognizes.

Free30 minutesNo obligation

Specific to this pair

AfterShip Returns in Amplitude: negative revenue on the right user

Resolve each AfterShip return's order number to the store customer ID and send it to Amplitude as user_id, never the email, so it lands on the original buyer. Send an Order Returned event with order ID, reason, resolution, refund amount, market and return shipping cost, with insert_id derived from the AfterShip return ID.

Amplitude is where you would see whether customers acquired by a given campaign keep what they buy. That only works if the AfterShip return lands on the same Amplitude user as the original purchase. AfterShip identifies a return by order number and customer email; Amplitude identifies people by user ID and device ID. The server that receives the return has to resolve the order to the store customer ID and send that as user_id. Sending the email instead creates a second person whenever your browser SDK identifies users by customer ID.

Send the return as its own event, such as Order Returned, with the order ID, return reason, resolution, refund amount, destination market and return shipping cost as properties. For revenue charts, a negative price with a revenueType that separates refund from return shipping lets lifetime value net both out without mixing them; confirm how your project's revenue charts treat negative values before relying on it. Derive insert_id from the AfterShip return ID so a retried notification does not refund the same order twice.

Timing is the analytical catch. Returns arrive weeks after the order, so a cohort's revenue in Amplitude drops after the fact. Compare acquisition cohorts only once their return window has closed, and split by destination country before blaming a campaign, because international return cost and return rate both vary by market.

AfterShip Returns → Amplitude · what breaks

Why this join usually fails — AfterShip Returns → Amplitude

  1. 01

    The user ID and device ID pair never reaches AfterShip Returns

    Returns are initiated in a hosted portal weeks after the order.

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

  3. 03

    Revenue events that carry no revenue

    Amplitude will happily accept a purchase event with no price field. The event count looks correct, the funnel looks correct, and the revenue reporting stays at zero — which people usually discover a quarter later when someone asks what a cohort is worth.

  4. 04

    Nothing reconciles afterwards

    Amplitude shows the event in the user's activity stream with its properties expanded. Read the properties, because an event that arrives without its revenue fields still looks like a success.

AfterShip Returns → Amplitude · the fix

What working looks like — AfterShip Returns → Amplitude

  • The user ID and device ID pair on every return

  • Conversions arriving in Amplitude

    The event lands on the user, joins their behavioural history, and becomes available for cohorts, funnels and retention.

  • Reconciled against the source

AfterShip Returns → Amplitude · architecture

How AfterShip Returns and Amplitude actually connect

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

    Amplitude needs a click to match

    Amplitude needs a device or user identifier, an event type and its properties. Revenue events need the price and quantity fields specifically, or the revenue reporting stays empty while events flow normally.

  3. 3

    The identifier is the bridge

    The user ID and device ID pair, captured at the visit and carried into the AfterShip return.

  4. 4

    The event source decides reliability

    Send orders net of returns including actual return shipping, reported by destination market.

  5. 5

    Deduplication at the destination

    Amplitude deduplicates on insert_id. Omit it and a retried batch is counted twice, which shows up as a phantom spike that someone will eventually build a hypothesis on.

AfterShip Returns → Amplitude · normal or broken

Working vs. broken, side by side — AfterShip Returns → Amplitude

Normal, not a fault

  • The user ID and device ID pair present on the return

  • Sent from the store order record, adjusted by return outcome and cost

  • Deduplicated correctly

    Amplitude deduplicates on insert_id. Omit it and a retried batch is counted twice, which shows up as a phantom spike that someone will eventually build a hypothesis on.

  • Reconciles with the source

Actually broken

  • The user ID and device ID pair 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

    Amplitude will happily accept a purchase event with no price field. The event count looks correct, the funnel looks correct, and the revenue reporting stays at zero — which people usually discover a quarter later when someone asks what a cohort is worth.

  • Nobody has reconciled it

AfterShip Returns → Amplitude · diagnose

Diagnostic order — AfterShip Returns → Amplitude

  1. 01

    Count returns carrying the user ID and device ID pair

  2. 02

    Follow one real conversion end to end

  3. 03

    Compute net margin per destination market after return costs

    It frequently reverses which markets look worth advertising in.

  4. 04

    Check a purchase event for the price and quantity fields specifically

    Not whether the event arrived — whether the revenue fields are populated, in the exact names Amplitude expects.

  5. 05

    Read the match rate, not the success message

    Amplitude shows the event in the user's activity stream with its properties expanded. Read the properties, because an event that arrives without its revenue fields still looks like a success.

AfterShip Returns → Amplitude · prove

How it gets proven — AfterShip Returns → Amplitude

Source of truth

Store orders net of returns, with return shipping cost by destination.

  • The user ID and device ID pair confirmed present on a live return.
  • Revenue reconciled per transaction against your billing system, with identity merge behaviour verified across signup.
  • Net margin reconciled per market after returns and their logistics cost.

AfterShip Returns → Amplitude · free audit

What we check in the free audit

  • Count returns carrying the user ID and device ID pair
  • Follow one real conversion end to end
  • Compute net margin per destination market after return costs
  • Check a purchase event for the price and quantity fields specifically
  • Read the match rate, not the success message

Checked against

Store orders net of returns, with return shipping cost by destination.

Get my free conversion tracking audit

Free30 minutesNo obligation

AfterShip Returns → Amplitude · when not to buy

When you don't need this — AfterShip Returns → Amplitude

  • Measure identifier coverage yourself first — pull your last hundred returns and count how many carry the user ID and device ID pair.
  • Single-market sellers with flat return shipping can use one blended figure without losing anything.
  • If nobody is building cohorts or retention analysis, this is a large amount of instrumentation for reporting a dashboard already gives you.

AfterShip Returns → Amplitude · what we deliver

What gets built — AfterShip Returns → Amplitude

  • 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 Amplitude

    The Amplitude HTTP V2 API, posted server-side with the identity, event type and properties.

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

Get my free conversion tracking audit

From $400 · See packages

FAQ

AfterShip Returns → Amplitude questions, answered

Receive the return server-side (check which webhooks or API access your AfterShip plan includes), resolve the order to your customer ID, and post a return event to the HTTP V2 API with negative revenue and an insert_id built from the return ID.

Free · 30 min

Get AfterShip Returns and Amplitude joined properly

Free30 minutesNo obligation