Aftership returns
AfterShip is a platform for creating shipping labels and managing delivery workflows through connected courier accounts.
Key features include:
- Creating shipping labels through the Postmen API
- Supporting return shipments
- Connecting carrier accounts for label generation
This scenario generates a return shipping label in AfterShip Shipping when a refund is created in ShopWired. It retrieves the original order data from the ShopWired API, then sends the return shipment details to AfterShip Shipping using the Postmen API.
This scenario allows:
- Triggering when a refund is created in ShopWired
- Retrieving order data from the ShopWired API
- Using the customer's address from the original order
- Creating a return label in AfterShip Shipping
Prerequisites
Prerequisites
- An account with Make
- An account with AfterShip Shipping
- AfterShip Shipping Pro plan with API access
- Connected carrier account in AfterShip Shipping
Scenario blueprint
Scenario blueprint
A blueprint is provided for this scenario here: Public blueprint link
Modules used in this scenario:
- ShopWired refund created
- HTTP - Get order details
- AfterShip Shipping - Create return label
This scenario uses:
- A ShopWired webhook trigger
- An HTTP module to retrieve order data from the ShopWired API
- An AfterShip API module to create the return label
Required user inputs
Required user inputs
| Field | Description |
|---|---|
| Webhook URL | The webhook URL generated by Make to be added to ShopWired |
| ShopWired API credentials | HTTP Basic authentication credentials used to retrieve the order |
| AfterShip connection | Authenticated AfterShip Shipping account used for label creation |
| YOUR_SHIPPER_ACCOUNT_ID | The shipper account ID from AfterShip Shipping |
| YOUR_SERVICE_TYPE | The service type to use for the return label |
| YOUR_BUSINESS_NAME | The business name for the return address |
| YOUR_COMPANY | The company name for the return address |
| YOUR_ADDRESS | The return address line 1 |
| YOUR_CITY | The return address city |
| YOUR_POSTCODE | The return address postcode |
| YOUR_PHONE | The return address phone number |
| YOUR_EMAIL | The return address email address |
Placeholder values used
Placeholder values used
| Placeholder | Description |
|---|---|
| YOUR_SHIPPER_ACCOUNT_ID | The AfterShip Shipping shipper account ID |
| YOUR_SERVICE_TYPE | The courier service used to create the return label |
| YOUR_BUSINESS_NAME | The contact name on the return address |
| YOUR_COMPANY | The company name on the return address |
| YOUR_ADDRESS | The street address used for returns |
| YOUR_CITY | The city used for returns |
| YOUR_POSTCODE | The postcode used for returns |
| YOUR_PHONE | The phone number used for returns |
| YOUR_EMAIL | The email address used for returns |
How to import and enable the scenario
How to import and enable the scenario
- Select the scenario link
- Open it in Make
- Create a new scenario from the blueprint
- Replace all placeholder values
- Connect required accounts
- Turn the scenario on
How to connect the ShopWired webhook
How to connect the ShopWired webhook
- Open the scenario in Make
- Select the first module to copy the webhook URL
- Navigate to Your account > API & webhooks
- Navigate to the Webhooks section
- Select
Create webhook - Select the webhook topic as
order.refund.created - Enter the webhook URL from Make into the notification URL setting
- Save the webhook
How to test the scenario
How to test the scenario
- Turn the scenario on in Make
- Create a refund in ShopWired for an existing order
- Wait for the webhook to send the refund data to Make
- Check that the HTTP module retrieves the order data successfully
- Confirm that AfterShip Shipping creates the return label
ShopWired webhook data
ShopWired webhook data
Event: order.refund.created
{
"event": {
"topic": "order.refund.created",
"subjectType": "refund",
"subjectId": 12345,
"data": {
"object": {
"id": 12345,
"orderId": 10001
}
}
}
}
Data mapping overview
Data mapping overview
| ShopWired data | Used for |
|---|---|
event.data.object.orderId |
Retrieves the original order through the ShopWired API |
data.shippingAddress.name |
Sets the customer contact name as the return sender |
data.shippingAddress.addressLine1 |
Sets the customer return address line 1 |
data.shippingAddress.city |
Sets the customer return address city |
data.shippingAddress.postcode |
Sets the customer return address postcode |
data.shippingAddress.telephone |
Sets the customer return address phone number |
data.shippingAddress.emailAddress |
Sets the customer return address email |
data.totalWeight |
Sets the parcel weight for the return label |
Limitations
Limitations
- This scenario only runs when a refund is created in ShopWired
- This scenario requires API access in AfterShip Shipping
- The parcel dimensions are hardcoded in the request body
- The scenario uses the original order shipping address as the return sender address
- Custom modifications are not supported by ShopWired
Recommendations
Recommendations
- Update the hardcoded parcel dimensions to match your packaging
- Replace all return address placeholders before turning the scenario on
- Confirm that the selected carrier service supports return labels
- Check that the order weight is available and formatted correctly in ShopWired
- Change the country value if returns are being created outside Great Britain