If you're a retailer using an ERP system and looking to integrate yayloh for returns and after-sales workflows, this guide explains how yayloh interacts with Shopify and how your ERP can access and process the relevant data for bookkeeping, refunds, gift cards, and exchanges.
Integration Overview
yayloh can use the Shopify Return API to write return data back into Shopify when the return is registered (optional step).
yayloh enriches Shopify orders with metafields, tags, and notes to improve data mapping and reconciliation once the return is processed.
Your ERP reads all necessary data (refunds, gift cards, exchanges) directly from Shopify at registration and resolution.
Shopify Return API: Creating Returns and Expected Deliveries (optional)
When Do You Need This?
This section applies if:
You are using an ERP as a Warehouse Management System (WMS).
You want to track expected returns in your warehouse.
You want to bookkeep gift cards at the time of redemption instead of issuance (read more).
Note: If you're not using your ERP as a WMS or tracking return inspections, this step is optional. Still, enable the Shopify Return API if you record gift card redemptions—it helps log and reconcile returns in Shopify.
New Return Notification with expected return details:
yayloh triggers the
returnCreate
mutation in Shopify as soon as a return is registered through the return form.This immediately creates a reverse fulfillment order, generating an expected return with all details of the incoming returns.
yayloh also calls
reverseDeliveryCreateWithShipping
to attach the shipping label, carrier, tracking number, and tracking URL.Shopify updates the order status to Return in Progress, giving visibility into upcoming returns.
Quality Control Results
Once inspection is done, your ERP calls
reverseFulfillmentOrderDispose
to indicate the condition (RESTOCKED, MISSING, NOT_RESTOCKED).yayloh subscribes to
reverse_fulfillment_orders/dispose
shopify webhooks to trigger next steps like refunds or credit issuance.
You can read more specifics here here.
Refunds & ERP Synchronization
Refunds
How it works: Refunds are triggered directly in Shopify via yayloh once validated.
Refund fees: If you charge handling or restocking fees, yayloh writes a metafield at the order level. This metafield can be accessed by your ERP system to ensure accurate bookkeeping. You can read more about metafield here.
ERP Integration: Your ERP reads refund data directly from Shopify’s native order information.
Gift Cards
Issuing Store Credit via Gift Cards
Gift cards are created in Shopify by yayloh when a store credit is approved.
Your ERP reads this information directly from Shopify.
Bookkeeping Options
Depending on your accounting setup, you can choose when to recognize revenue:
At issuance: Book the gift card as revenue when it is issued.
At redemption: yayloh uses the Shopify Return API to create a return for the original order. Your ERP can then book the transaction as a refund.
Exchanges
How We Handle Exchanges
When a customer requests an exchange, yayloh creates a new order in Shopify. This order can be:
Marked as paid
Or created with a 100% discount
You can choose this based on how you prefer to manage accounting for exchanged goods.
To support clear reconciliation between the original and the exchange order, yayloh automatically:
Adds the tag
#yaylohexchange
to the new exchange order.Includes the original order ID in the order note of the exchange order.
The new order name using a customizable prefix (e.g.
EXC-{original order ID}
).
You can choose any prefix you prefer for naming exchange orders.