- Engages customers via chat, email, or SMS
- Looks up their order automatically
- Collects return reason and item condition
- Validates against your return policy
- Generates return labels (via API)
- Updates your order management system
- Notifies your fulfillment team
Prerequisites
- Completed the First Conversational Agent guide
- Shopify or order management system connected
- Basic understanding of integrations and HTTP requests
The Business Problem
Returns are expensive — not just the refund, but the time your team spends:- Answering “what’s your return policy?”
- Collecting order numbers and item details
- Verifying return eligibility
- Generating shipping labels
- Updating inventory systems
- Following up on status
Architecture Overview
Step 1: Create the Application
Step 2: Set Up the Trigger
We’ll use a web widget trigger so customers can initiate returns from your website.Add Web Widget trigger
Drag a Start node for testing. Later, you’ll replace this with a web widget or email trigger.
Step 3: Build the Returns Skillset
The skillset handles the conversation: collecting order info, return reason, and item details.Sample Conversation
AI: Hi Sarah! I’m here to help with your return. I’m sorry the product didn’t work out. Can you tell me your order number? You’ll find it in your confirmation email — it usually starts with #. Customer: It’s #12345 AI: Got it, order #12345. Which item from that order would you like to return? Customer: The blue sweater AI: The blue sweater — no problem. What’s the reason for the return? Customer: It doesn’t fit right AI: I understand — fit issues are frustrating! What condition is the sweater in? Customer: I tried it on once but it still has tags AI: Would you prefer a full refund, an exchange for a different size, or store credit? Customer: Exchange for a larger size AI: Perfect! Let me confirm: You’d like to exchange the blue sweater from order #12345 for a larger size because it doesn’t fit. The item is opened but unused. Is that correct? Customer: Yes AI: Great! I’m processing your exchange now…
Step 4: Look Up the Order
After collecting the order number, verify it exists and get order details.Step 5: Validate Return Eligibility
Use AI to check if the return meets your policy.Step 6: Route by Eligibility
Step 7: Process Eligible Returns
For eligible returns, generate a shipping label and update the order.Generate Return Label
Add HTTP Request node
If you use a shipping API (ShipStation, EasyPost, etc.):
- Method: POST
- URL:
https://api.easypost.com/v2/shipments
Update Order in Shopify
Send Confirmation to Customer
Notify Fulfillment Team
Step 8: Handle Ineligible Returns
For returns that don’t meet policy, explain why and offer alternatives.Complete Workflow
Adding Email Support
Let customers initiate returns by email too.Add parallel trigger
Create another workflow with an App Trigger (Gmail):
- Filter: Subject contains “return” or “exchange”
Testing Scenarios
Test these scenarios to ensure robustness:| Scenario | Expected Behavior |
|---|---|
| Valid return within 30 days | Approved, label generated |
| Return after 30 days | Rejected with explanation |
| Damaged item (any age) | Approved under damage exception |
| Sale item | Rejected - final sale |
| Wrong order number | Asked to verify |
| Customer wants exchange + refund | Clarify which one |
| Unclear item description | AI asks for clarification |
Metrics to Track
| Metric | Target | Why It Matters |
|---|---|---|
| Self-service completion rate | >80% | Fewer tickets for your team |
| Average conversation length | <5 minutes | Customer satisfaction |
| Return approval rate | Monitor | Policy effectiveness |
| Human escalation rate | <10% | AI handling most cases |
| Customer satisfaction (post-return) | >4/5 | Overall experience |
Customization Ideas
Add Photo Upload
For damaged items, let customers upload photos:Multi-Item Returns
Handle returns with multiple items by makingitem_to_return a loop:
Proactive Return Offers
For very dissatisfied customers, proactively offer returns before they ask.Troubleshooting
Order lookup fails
Order lookup fails
Check if the order number format matches what Shopify expects. Some stores use prefixes like “ORD-” that customers might not include.
Policy validation is too strict/lenient
Policy validation is too strict/lenient
Adjust the AI prompt with more specific rules. Be explicit about edge cases and exceptions.
Shipping label API errors
Shipping label API errors
Verify address formatting. EasyPost and ShipStation have specific requirements for address fields.
Customers abandon mid-conversation
Customers abandon mid-conversation
Consider sending an email follow-up if they don’t complete within 30 minutes. Add a timeout handler.
Next Steps
Lead Qualification
See how skillsets work for sales use cases.
Integrations
Connect to more e-commerce platforms.
Knowledge Base
Add your return policy to the knowledge base.
Channels
Enable more communication channels.
