> For the complete documentation index, see [llms.txt](https://docs.xorosoft.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.xorosoft.com/xoroerp-1/connected-apps/shopify/configuration-settings/after-ship.md).

# After Ship

## Shopify Integration: AfterShip Returns

### Overview

AfterShip Returns is a third-party returns management platform that allows customers to initiate product returns and exchanges for Shopify orders. This integration enables the return lifecycle to be synchronized between AfterShip, Shopify, and Xoro.

When a customer creates a return request in AfterShip, the return information is automatically synchronized to Xoro, where the return process is managed through Return Merchandise Authorizations (RMAs), Advance Shipping Notices (ASNs), and Credit Memos (CMs).

The integration automates the return receiving process and ensures inventory, financial transactions, and return statuses remain synchronized across all systems.

***

### Return Process Flow

#### Standard Return Flow

1. A sales order is created and fulfilled in Shopify.
2. The customer initiates a return request through AfterShip.
3. AfterShip sends the return information to Xoro.
4. Xoro automatically creates an RMA.
5. Xoro automatically creates an ASN linked to the RMA.
6. The returned inventory is received against the ASN.
7. Upon ASN closure, Xoro automatically creates a Credit Memo (CM).
8. Xoro sends a return receipt confirmation to AfterShip.
9. AfterShip marks the RMA as received.
10. AfterShip updates Shopify with the return receipt confirmation.
11. Shopify processes the refund or exchange.
12. Xoro captures the resulting refund information through Shopify polling and updates the Credit Memo accordingly.

<figure><img src="/files/Zfea9kuO97CpRTjQGPJD" alt=""><figcaption></figcaption></figure>

***

### Automated ASN Return Processing

The integration supports a new automated return workflow that must be enabled for AfterShip returns.

#### Automated Flow

**RMA Creation → ASN Creation → ASN Receipt → Credit Memo Creation**

Once enabled:

* RMAs received from AfterShip are automatically created in Xoro.
* Corresponding ASNs are automatically generated.
* Inventory adjustments are processed through ASN receiving.
* Credit Memos are automatically created when the ASN is received and closed.
* Return confirmations are automatically sent back to AfterShip.

This process eliminates manual intervention during return receiving.

***

### Impact in Xoro

The integration affects inventory, returns, and financial transactions within Xoro.

#### Inventory Updates

* RMA records the return authorization.
* ASN manages the physical receipt of returned inventory.
* Inventory quantities are updated during ASN receiving.

#### Financial Updates

* Credit Memos are automatically generated after ASN completion.
* Refund information received from Shopify updates the Credit Memo status and amounts.
* Credit Memo values depend on the refund method processed in Shopify.

#### Status Synchronization

Once the ASN is closed:

1. Xoro sends a confirmation to AfterShip.
2. AfterShip marks the return as received.
3. AfterShip sends the received status to Shopify.
4. Shopify completes refund or exchange processing.
5. Xoro retrieves refund details through polling and updates the corresponding Credit Memo.

***

### Return Refund Scenarios

#### Item Return Without Monetary Refund

In this scenario:

* Items are returned and received.
* No monetary refund is issued to the customer.

**Result in Xoro**

* A Credit Memo is created with a value of **$0.00**.

***

#### Item Return with Monetary Refund

In this scenario:

* Items are returned.
* A monetary refund is issued to the customer.

**Result in Xoro**

* A Credit Memo is created.
* A Credit Memo Refund transaction is created for the refunded amount.

***

#### Item Return with Gift Card Compensation

In this scenario:

* Items are returned.
* No direct refund is issued.
* Customer receives a gift card instead.

**Result in Xoro**

* A Credit Memo is created.
* Credit Memo processing reflects the return while the compensation is managed through the gift card process in Shopify.

***

### Exchange Scenarios

#### Exchange for an Item of Equal Value

The customer exchanges the returned item for another item of the same value.

**Result in Xoro**

* A new Sales Order is created for the replacement item.
* The replacement Sales Order is created with a value of **$0.00**.
* A Credit Memo is created in **Applied** status.
* No additional customer payment is required.

***

#### Exchange for an Item of Lesser Value

The customer exchanges the returned item for a lower-priced item.

**Result in Xoro**

* The original Sales Order remains available for reference.
* A new Sales Order is created for the replacement item with a value of **$0.00**.
* A Credit Memo is created in **Refunded** status.
* The difference in value is refunded to the customer.

***

#### Exchange for an Item of Greater Value

The customer exchanges the returned item for a higher-priced item.

**Result in Xoro**

* A Credit Memo is created in **Applied** status.
* A new Sales Order is created for the replacement item.
* The Sales Order reflects the additional amount owed by the customer.

***

### Integration Configuration

To enable AfterShip Returns integration, configure the following settings.

#### Third-Party Return Source

Navigate to the integration settings and select:

**Third Party Return Source = AfterShip**

***

#### Access Token

Enter the Access Token provided by the client for AfterShip authentication.

***

#### Enable Return Synchronization

Enable the following option:

**Sync Return from Third Party Return App**

When enabled:

* Return requests from AfterShip are imported into Xoro.
* RMAs are automatically created.
* ASN automation becomes available.

***

### RMA User Interface

After the integration and configuration are enabled:

* RMA functionality becomes available in the Xoro user interface.
* Returns received from AfterShip can be viewed and tracked through the RMA process.
* ASN and Credit Memo records can be reviewed through their respective modules.

***

### Key Benefits

* Automated return synchronization from AfterShip.
* Automatic RMA creation.
* Automatic ASN generation and receiving workflow.
* Automated Credit Memo creation.
* Inventory updates through ASN processing.
* Refund and exchange synchronization with Shopify.
* Reduced manual effort and improved return visibility across systems.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.xorosoft.com/xoroerp-1/connected-apps/shopify/configuration-settings/after-ship.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
