Shopify Abandoned Cart Recovery
Periodically checks Shopify for abandoned carts, verifies phone numbers via Rapiwa.
What it does
Recover lost sales by automatically sending personalized WhatsApp discount codes to customers who abandoned their Shopify carts. The system verifies phone numbers via Rapiwa before messaging and logs all results in Google Sheets for easy tracking.
Step by step
- Configure a scheduled trigger to run every hour or daily depending on volume.
- Use the Shopify Admin API with a GET request to fetch abandoned checkouts from the last cycle.
- Parse the JSON response to extract customer email, phone number, and cart total.
- Append rows to Google Sheets using the HTTP Request tool with headers for authentication.
Where the LLM does the work
- Generate personalized WhatsApp message copy that incorporates the customer's name and specific cart items.
- Create dynamic discount code logic that adjusts the percentage off based on the cart value threshold.
- Refine the tone of the recovery message to match the brand voice while remaining concise for SMS/WhatsApp limits.
Watch out for
Rapiwa may return errors for invalid formats, add input validation before calling the verification endpoint.
Google Sheets has row insertion limits per minute, batch your logs to avoid throttling errors.
WhatsApp message templates require pre-approval, ensure you use approved template IDs or risk rejection.
Tools that fit
Shopify Admin API API Retrieve checkout and customer data
Rapiwa API Service Verify WhatsApp numbers and send messages
HTTP Request API Execute API calls to external services
Code LLM Format customer data and personalize messages
The agent brief
Everything your agent needs, including the gotchas. Copy it and go.
You are helping me build the following AI agent workflow. ## Goal Shopify Abandoned Cart Recovery: Periodically checks Shopify for abandoned carts, verifies phone numbers via Rapiwa. ## Specification - What it does: Recover lost sales by automatically sending personalized WhatsApp discount codes to customers who abandoned their Shopify carts. The system verifies phone numbers via Rapiwa before messaging and logs all results in Google Sheets for easy tracking. - Trigger: On a schedule (Scheduled ยท daily check for abandoned carts) - Autonomy: Fully hands-off - Expected setup effort: about an afternoon - Tools/services involved: - Shopify Admin API: Retrieve checkout and customer data - Rapiwa API: Verify WhatsApp numbers and send messages - Google Sheets: Track outreach attempts and contact status - HTTP Request: Execute API calls to external services - Code: Format customer data and personalize messages ## Known pitfalls, handle each one explicitly in your implementation 1. Rapiwa may return errors for invalid formats, add input validation before calling the verification endpoint. 2. Google Sheets has row insertion limits per minute, batch your logs to avoid throttling errors. 3. WhatsApp message templates require pre-approval, ensure you use approved template IDs or risk rejection. ## Reference implementation https://n8n.io/workflows/11129 (workflow template) Fetch and inspect this before building. If it matches my stack, adapt it; if not, rebuild the pattern with my tools. ## Process requirements 1. Before building: ask me which of the listed tools I actually use and what my platform is (n8n / Make / code / other). Do not assume. 2. Adapt the pattern to my answers; do not force the reference stack. 3. Address every pitfall above; tell me how you handled each. 4. Provide a test plan I can run before letting this touch real data. 5. Ask before any step that sends messages, modifies data, or spends money. Source: https://usecasesforagents.com/use-case/automated-shopify-abandoned-cart-recovery/ via usecasesforagents.com
Frequently asked questions
Can I use a different Ecommerce than Shopify?
Yes. Shopify is only the example ecommerce in this recipe. The same flow works with Adobe Commerce (Magento 2), AliExpress Affiliate API, WooCommerce and Zoho Commerce. Swap the ecommerce connection and keep the rest of the setup as written.
Want this running in your business?
This is what I do. I design and build AI agents like this one, and keep them running. If you want it set up for your team instead of doing it yourself, get in touch.
Who it's for
Also fits E-commerce Operator.