tl  tr
  Home | Tutorials | Articles | Videos | Products | Tools | Search
Interviews | Open Source | Tag Cloud | Follow Us | Bookmark | Contact   
 Generative AI > Google Gemini API > Post-Purchase Follow-up Agent

Post-Purchase Follow-up Agent

Author: Venkata Sudhakar

The relationship with a ShopMax India customer does not end at checkout. A customer who just bought a Samsung TV needs setup guidance. A headphone buyer wants to know about sound profiles and app pairing. Sending the right follow-up message at the right time builds trust, reduces support calls, and creates a natural opening to recommend accessories that genuinely add value.

This tutorial builds a Post-Purchase Follow-up Agent using ADK and Gemini. The agent checks which orders were delivered in the last 48 hours, generates a personalised follow-up message with product-specific tips and accessory suggestions, and schedules a review request for day 7.

The below example shows the post-purchase workflow for ShopMax India recent deliveries.


It gives the following output,

Post-Purchase Follow-ups - ShopMax India (3 deliveries)

--- ORD-5501 | Kavya Reddy, Hyderabad ---
Hi Kavya! Hope your new Samsung 55-inch 4K TV is already brightening up your
living room. Quick tip: set brightness to 45-50 for perfect picture in Indian
daylight, and download the SmartThings app to unlock smart home controls.
A Soundbar pairs beautifully with this TV if you want cinema-quality audio.
We would love to hear your thoughts - drop us a review in 7 days!

--- ORD-5502 | Rohit Joshi, Pune ---
Hi Rohit! Your Sony WH-1000XM5 headphones are one of the best in the world -
enjoy them! Download the Sony Headphones Connect app to tune the EQ exactly
to your taste, and try Speak-to-Chat mode - it pauses music when you talk.
A portable headphone stand keeps them safe when not in use.
Share your experience with a review after a week of listening!

--- ORD-5503 | Divya Krishnan, Bangalore ---
Hi Divya! Welcome to your new Apple iPad Air! Enable Stage Manager in Settings
for a powerful multitasking setup, and consider the Apple Pencil 2 - it charges
right on the iPad edge and is perfect for notes and sketching.
We would love a review from you in 7 days - thank you for choosing ShopMax!

Schedule this agent to run daily at 8 AM via Cloud Scheduler. Store each follow-up event in Firestore with a sent_at timestamp to prevent duplicate messages. On day 7, trigger a second Cloud Function to send the review request link, completing the post-purchase engagement loop.


 
  


  
bl  br