> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sourcemedium.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Two Boxes - Integration instructions

> Receive Two Boxes return inspection, grading and disposition events by webhook, delivered as the Return Inspections table.

> [!NOTE]
>
> Raw data only. Two Boxes is not part of SourceMedium's dashboards. Its events feed one table in your warehouse, `obt_return_inspections`: one row per returned line with its disposition, reasons and grading times, joined to the order it came from.

Two Boxes inspects and grades returned units at your warehouse. It has no API for returns: it sends each event to a webhook URL you give Two Boxes support. SourceMedium receives each event, checks that it came from Two Boxes, removes shopper details, and stores it.

> [!NOTE]
>
> Sign in to [SourceMedium](https://urchin.sourcemedium.com), open your store, then choose **Data sources → Connect data source** and select the platform. You need an **Admin** or **Editor** workspace role.
>
> [After you connect](https://docs.sourcemedium.com/docs/data-inputs/platform-integration-instructions/after-you-connect.md) explains the first sync and connection statuses.

## Vendor documentation

| Topic | Official guide |
| - | - |
| Webhooks | [Getting started](https://docs.twoboxes.com/docs/getting-started) |
| Event payloads | [Payload object schemas](https://docs.twoboxes.com/docs/payload-object-schemas) |

## What you need

* **A Two Boxes account for your brand.** If your 3PL owns the Two Boxes account, its subscription carries every brand it serves; ask SourceMedium before connecting.
* **Someone who can email Two Boxes support.** Two Boxes sets up webhook subscriptions itself.

## How to connect

**1. Get your webhook URL**

Find **Two Boxes** in the connector picker and click **Connect**. Open the Two Boxes data source page and copy the webhook URL, or the ready-made message for Two Boxes support.

**2. Ask Two Boxes support to send events**

Send support the message. They point your webhook subscription at the URL and reply with a shared token and an HMAC secret.

**3. Enter the token and HMAC secret**

On the same page, paste both and click **Save token and secret**. The source reads **Setting up** until the first event arrives, then **Connected**, and shows when the last event arrived.

Until the token and secret are saved, SourceMedium refuses Two Boxes' events, and Two Boxes retries each one up to 15 times with increasing delays, so enter them soon after support replies. Events whose retries run out can only be replayed by Two Boxes support. If Two Boxes issues new values, enter both again on the same page.

## What data arrives

Every event Two Boxes sends lands: return initiated, package scanned (found and not found), line item added, graded, shipped back or archived, return updated, completed, ignored or archived, and bulk return initiated or updated. SourceMedium keeps each line's latest state in `obt_return_inspections`:

* **What came back:** SKU, UPC, barcode, product and variant name, quantity received and expected.
* **Why:** the shopper's return reason category and detailed reason.
* **The outcome:** the grader's disposition (for example Return to Stock, Resale, Donate, Recycle, Dispose, Ship Back), graded inspection points, put-away bin, and any transformed SKU or UPC.
* **When:** the parcel's arrival scan and the end of grading, with hours from order to arrival and from arrival to graded.
* **Where:** 3PL, warehouse site and merchant.
* **Links:** the storefront order, line, product and variant IDs, the returns provider's return and line IDs, and the matching SourceMedium order (`sm_order_key`).

Removed before storage: customer name, email and tags, RMA and ship-back addresses, free-text comments, and graders' names and emails (graders appear by ID only).

## History

Events start when Two Boxes support points your subscription at SourceMedium. Earlier history is available only if Two Boxes support replays it.

## Known gaps

* **Returns without a SourceMedium order.** A line whose storefront order SourceMedium does not have keeps its row with no order fields.
* **Disconnecting** stops new events. Events already received stay until your store's data is deleted.

## Troubleshooting

* **Still Setting up after support confirmed?** Check that the URL support used matches the one on the data source page exactly. Reconnecting creates a new URL.
* **Events stopped?** The token or secret may have changed; enter both again.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.