Receive a return initiation event via webhook or customer portal submission containing the order ID, line items to return, and reason codes
Validate the return eligibility by checking the order date against your return window policy and confirming the items are returnable (not final sale) using your order management system
Create a return record via the returns API with order_id, line_items (with return_reason and quantity), and return_method (refund, exchange, or store credit); receive a return_id
Generate a prepaid return shipping label by calling the label generation endpoint with the return_id and ship-from address; store the label URL and tracking number against the return record
Receive an inbound tracking update webhook when the return package is in transit and a return receipt webhook when the warehouse scans the package; trigger refund or exchange processing on receipt confirmation
Issue the refund or store credit by calling your commerce platform's refund API with the line item amounts, or create a new draft order for exchanges
Known gotchas
Return fraud is common; validate that the return reason and item condition match before approving store credit or exchanges, and flag high-risk return patterns
Exchange orders create new inventory demand; reserve or allocate exchange inventory at RMA creation time, not at return receipt, to prevent promising out-of-stock items
Return shipping label costs should be tracked per return for P&L reporting; free returns can significantly impact margin if not monitored by category or SKU
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp