|
|
Abandoned Cart Recovery Agent
Author: Venkata Sudhakar
ShopMax India loses significant revenue each week to abandoned carts. A customer adds a Samsung TV or Apple iPad to their cart, gets distracted, and never completes the purchase. An automated recovery agent that detects these drop-offs within hours and sends a personalised, time-sensitive message can recover 15-25% of that lost revenue without any manual effort. This tutorial builds an Abandoned Cart Recovery Agent using ADK and Gemini. The agent scans carts abandoned for more than 2 hours, scores each by recovery priority using cart value and customer tier, and generates a personalised outreach message with a targeted incentive. The below example shows the recovery workflow for ShopMax India abandoned carts.
It gives the following output,
Abandoned Cart Recovery - ShopMax India
3 carts found | Total value at risk: Rs 1,22,000
--- CART-001 | HIGH PRIORITY (score: 100) ---
Customer: Vikram Nair, Hyderabad (Gold tier)
Cart: Samsung 55-inch 4K TV - Rs 62,000
Incentive: 5% off + free delivery
Message: Hi Vikram, your Samsung 55-inch 4K TV is still waiting for you!
As a valued Gold member, we are offering you an exclusive 5% discount plus
free delivery - just for today. Complete your order before midnight:
shopmax.in/cart/CART-001
--- CART-002 | MEDIUM PRIORITY (score: 65) ---
Customer: Sneha Pillai, Pune (Silver tier)
Cart: Sony Headphones + Bose Speaker - Rs 44,500
Incentive: 3% off coupon SAVE3
Message: Hi Sneha, great taste - the Sony WH-1000XM5 and Bose SoundLink
are a perfect combo! Use code SAVE3 at checkout to save Rs 1,335.
Offer valid for 24 hours: shopmax.in/cart/CART-002
--- CART-003 | LOW PRIORITY (score: 30) ---
Customer: Arjun Menon, Chennai (Bronze tier)
Cart: Bose SoundLink Speaker - Rs 15,500
Incentive: Free delivery
Message: Hi Arjun, your Bose SoundLink Speaker is still in your cart!
Complete your order today and we will cover the delivery - free.
shopmax.in/cart/CART-003
In production, trigger this agent via a Cloud Scheduler job every 2 hours. Integrate with your WhatsApp Business API or email service to dispatch messages automatically, and log each recovery attempt in Firestore to avoid sending duplicate messages to the same customer.
|
|