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

# Swap Commerce

To connect your Swap Commerce account to Pimento, follow the below steps:

## 1. Open Swap Commerce Integration

Navigate to the [Swap Commerce integration settings](https://app.getpimento.com/clients/settings/integrations/swap-commerce/edit/new) within the Pimento dashboard.

<img height="200" src="https://mintcdn.com/hutchlogistics/ZGe7nTnq4eS8wbl0/images/swapcommerce-connect.png?fit=max&auto=format&n=ZGe7nTnq4eS8wbl0&q=85&s=32ae02d1dcb8d7f373b106c17b603b94" alt="Connect Swap Commerce" data-path="images/swapcommerce-connect.png" />

## 2. Copy Webhook URL

Copy the webhook URL **exactly** as shown on the settings page. Copying this incorrectly will result in no orders being downloaded.

<img height="200" src="https://mintcdn.com/hutchlogistics/ZGe7nTnq4eS8wbl0/images/swapcommerce-webhook.png?fit=max&auto=format&n=ZGe7nTnq4eS8wbl0&q=85&s=f9dd84fe242010ab0aab3e26534b6b62" alt="Swap Commerce Webhook URL" data-path="images/swapcommerce-webhook.png" />

## 3. Configure Webhook in Swap

1. Navigate to **Integrations** in your Swap dashboard

2. Click **New webhook**

3. Give it a name (e.g., "Hutch Returns")

4. Paste the webhook URL from above

5. Select the **Return** event

<Info>
  You will need to create two separate webhooks: one for **create** events and one for **update** events.
</Info>

6. After creating the webhook, copy and save the **Webhook Secret** shown

<Warning>
  The Webhook Secret won't be shown again, so make sure to save it securely.
</Warning>

## 4. Generate Returns QC API Key

1. Go to **Returns** → **Quality Control Settings** in Swap

2. Enable **Quality Control**

3. Click **Generate API Key**

4. Copy the token from the popup

<Warning>
  The API key won't be shown again, so make sure to save it securely.
</Warning>

## 5. Configure Swap Settings

To ensure returns sync correctly between Pimento and Swap, you need to configure the following settings in Swap:

### Automatic Updates

Set updates to **Automatic** to ensure completed returns show as complete within Swap.

<img height="200" src="https://mintcdn.com/hutchlogistics/d38t0JidjLvulD94/images/swap-automatic-updates.png?fit=max&auto=format&n=d38t0JidjLvulD94&q=85&s=190eeb4c5f056eb466b1001a9a8ed40a" alt="Swap Automatic Updates Setting" data-path="images/swap-automatic-updates.png" />

### Sellable/Unsellable Actions

Configure sellable and unsellable actions to ensure items correctly get passed to Swap. You will need to create one action for each:

**Sellable Action:**

* **Provider condition** → `sellable` (lowercase)
* **Store condition** → `Sellable`
* **Quality approved** → `Yes`

**Unsellable Action:**

* **Provider condition** → `unsellable` (lowercase)
* **Store condition** → `Damaged`
* **Quality approved** → `No`

<img height="200" src="https://mintcdn.com/hutchlogistics/d38t0JidjLvulD94/images/swap-quality-control.png?fit=max&auto=format&n=d38t0JidjLvulD94&q=85&s=1fb17949779a06c98c74823e0b478f8f" alt="Swap Quality Control Actions" data-path="images/swap-quality-control.png" />

## 6. Complete Integration

1. Enter the **Webhook Secret** from Step 3

2. Enter the **QC API Key** from Step 4

3. Click **Connect Integration**

<img height="200" src="https://mintcdn.com/hutchlogistics/ZGe7nTnq4eS8wbl0/images/swapcommerce-connected.png?fit=max&auto=format&n=ZGe7nTnq4eS8wbl0&q=85&s=7d087af842b1f8ae37eb99e3428ceea4" alt="Swap Commerce Connected" data-path="images/swapcommerce-connected.png" />

Your Swap Commerce account is now connected to Pimento, and returns will automatically sync between the platforms.

<Info>
  Make sure you have completed Step 5 to configure the required Swap settings (Automatic Updates and Sellable/Unsellable Actions) to ensure returns sync correctly.
</Info>
