Generative AI for Customer Retention: How a D2C SaaS Personalised Cashback Reminders to Drive Repeat Purchases
Company Overview
The Customer is a SaaS company that builds direct-to-consumer (D2C) customer-retention products for Shopify Plus brands. Its flagship offering is a one-click cashback engine that lets shoppers earn and redeem cashback directly at checkout. To grow as a SaaS business and improve retention for its brand clients, the Customer needed a production-grade backend that handled real-money transactions reliably across many brands at once — and that could replace its generic, one-size-fits-all retention messaging with AI-personalised reminders sent at the right moment for each shopper.
Customer Challenge
1. Generic Retention Nudges with No Personalisation or Timing
• Customer retention nudges were generic promotional blasts with no personalisation and no timing intelligence.
• The result was low open rates and poor redemption conversion — the messaging was not earning its keep.
2. No Transactional Integrity on Redemptions
• The existing backend had no atomic transaction guarantee on redemptions.
• This made concurrent redemption race conditions and double-spend possible — a serious risk for a real-money feature.
3. Balances Not Available in Real Time at Checkout
• Cashback balance retrieval was not real-time and required page reloads at checkout.
• This broke the app-like, one-click experience the product depended on.
4. No Multi-Tenant Isolation or Scale
• The implementation lacked multi-tenant isolation and the API performance to serve multiple brand clients simultaneously.
• Onboarding new brands could not be done cleanly or at scale.
5. Idle Infrastructure Cost Made the Product Unviable
• The server-based backend ran with idle compute cost regardless of order volume.
• For a SaaS product, this fixed overhead made the unit economics commercially unviable.
Solution Approach
CloudTry built a fully serverless AWS backend operating across four flows, with AI personalisation and transactional integrity designed in from the start.
1. Earning Flow — Real-Time Cashback Crediting
• Shopify order-completion webhooks are received by Amazon API Gateway and trigger a Cashback Processor Lambda function.
• The function reads the brand's cashback rules from Amazon DynamoDB, credits the customer's balance atomically, appends an immutable audit record, and sends a "cashback earned" notification via Amazon SES.
2. AI Nudge Flow — Personalised Reminders at the Right Moment
• The Cashback Processor passes the customer's purchase event to Amazon EventBridge, which schedules a personalised cashback reminder at the customer's predicted optimal engagement window.
• When the trigger fires, a Nudge Orchestrator Lambda reads the customer's context from DynamoDB and invokes Amazon Bedrock (Claude Haiku) to generate a reminder message tailored to that specific customer's behaviour and balance.
• The AI-generated nudge is delivered via Amazon SES — the right message, to the right person, at the right time.
3. Display Flow — Sub-100ms Live Balances
• When the customer returns to checkout, the Shopify storefront calls a Balance Retrieval Lambda through API Gateway.
• The function reads the live cashback balance from DynamoDB and returns it with sub-100ms response time, displaying the Apply button for a one-click experience with no page reload.
4. Redemption Flow — Atomic, Double-Spend-Proof Deduction
• When the customer clicks Apply, a Redemption Processor Lambda executes a DynamoDB conditional write that deducts the cashback only if the balance is sufficient and no concurrent redemption is in progress.
• This prevents double-spend entirely, and the updated order total is returned to Shopify checkout.
5. Scalable Serverless AWS Architecture
• Amazon API Gateway — exposes the order webhook, balance retrieval, and redemption endpoints.
• AWS Lambda — runs four functions (Cashback Processor, Nudge Orchestrator, Balance Retrieval, Redemption Processor) on a pay-per-invocation basis with no idle cost.
• Amazon DynamoDB — stores per-brand balances, cashback rules, customer context, and the audit trail on on-demand pricing, with conditional writes providing transactional atomicity.
• Amazon EventBridge — schedules each customer's nudge at their predicted optimal engagement window.
• Amazon Bedrock (Claude Haiku) — generates the personalised cashback reminder messages.
• Amazon SES — delivers cashback-earned notifications, AI nudges, and redemption confirmations.
• Amazon CloudWatch — monitors all Lambda functions, Bedrock invocations, DynamoDB operations, and API latency with per-brand dashboards.
6. Multi-Tenant Isolation and Immutable Audit Trail
• The DynamoDB partition strategy provides full data isolation per brand client, supporting unlimited brands with no infrastructure changes on onboarding.
• Every cashback credit and deduction is recorded in an immutable, timestamped audit trail per transaction per brand, queryable for dispute resolution.
7. Fully Serverless Operations (No Idle Cost)
• The entire backend is serverless, with infrastructure spend scaling directly with order volume.
• Cost is near-zero when a brand client has no orders and scales automatically during high-volume periods such as sale events, with no additional infrastructure investment.
The solution runs in a live AWS production environment integrated with the Customer's Shopify-based storefronts, with no servers to manage.
Outcomes & Impact
Transformation Overview (Before vs After)
|
Aspect |
Before |
After |
|
Retention Nudges |
Generic promotional blasts, fixed timing |
AI-personalised messages at each customer's optimal moment |
|
Cashback Crediting |
Not real-time |
Credited in real time on order completion |
|
Balance at Checkout |
Required page reload, not live |
Live balance in sub-100ms, no reload |
|
Redemption Integrity |
No atomic guarantee; double-spend possible |
Atomic conditional writes; double-spend eliminated |
|
Multi-Tenancy |
No isolation; could not scale across brands |
Full per-brand isolation; unlimited clients |
|
Compute Model |
Always-on server with idle cost |
Serverless, scales with order volume |
Results Achieved
1. AI-Personalised Cashback Reminders at the Right Moment
• Amazon Bedrock (Claude Haiku) generates a personalised reminder per customer, scheduled by Amazon EventBridge for each customer's predicted optimal engagement window — driving higher open rates and redemption conversion than generic promotional blasts, at a cost of under $0.0002 per nudge.
2. Sub-100ms Balance Retrieval at Checkout
• Live cashback balances are served at checkout in under 100ms, displayed without any page reload to enable the one-click experience.
3. Double-Spend Eliminated
• DynamoDB conditional writes prevent double-spend across all concurrent redemption scenarios, confirmed in UAT race-condition testing.
4. 32% Improvement in Repeat Purchase Rate
• An established D2C brand client demonstrated a 32% improvement in repeat purchase rate following deployment.
5. Unlimited Multi-Tenant Scale
• The multi-tenant DynamoDB architecture supports unlimited D2C brand clients with full data isolation and no infrastructure changes on onboarding.
6. Commercially Viable, Usage-Based Cost Model
• The serverless pay-per-transaction model carries zero idle cost, with infrastructure spend scaling directly with order volume.
7. Immutable Audit Trail per Transaction
• Every cashback credit and deduction is timestamped and queryable per brand, supporting dispute resolution.
8. High Customer Satisfaction
• The engagement closed with a customer satisfaction score of 4.75 out of 5.
Key Differentiators & Business Impact
The standout here is the economics of AI personalisation. Generating a tailored cashback reminder through Amazon Bedrock costs under $0.0002 per message, yet a personalised, well-timed nudge converts measurably better than a generic blast. That makes the ROI on AI personalisation in this context exceptionally strong — meaningful uplift for a near-zero marginal cost. Pairing Bedrock with Amazon EventBridge scheduling means each customer is reached when they are predicted to be most receptive, which outperforms fixed-time batch campaigns.Underneath the personalisation sits a backend engineered for real money. DynamoDB conditional writes provide atomic deduction at scale, eliminating double-spend entirely without a separate locking mechanism or distributed transaction coordinator. Sub-100ms balance retrieval was treated as a product requirement rather than a nice-to-have — any perceptible delay at checkout would break the one-click experience — which made Lambda cold-start management an explicit priority during the build.
The serverless model is what makes the Customer's SaaS economics work. Because infrastructure cost is near-zero when a brand client has no orders and grows only as that client generates revenue, the Customer can price the product competitively and onboard new brands without taking on fixed overhead. A multi-tenant data design, agreed up front, lets it add brands with full isolation and no infrastructure changes — turning a backend rebuild into a genuine commercial enabler, with a 32% lift in repeat purchase rate at an established brand client to show for it.
Technical Capabilities → Business Outcomes
|
Technical Capability |
Business Outcome |
|
Amazon Bedrock (Claude Haiku) |
Personalised cashback reminders per customer at under $0.0002 each |
|
Amazon EventBridge per-customer scheduling |
Nudges delivered at each customer's predicted optimal moment |
|
DynamoDB conditional writes |
Atomic redemptions; double-spend eliminated without locking overhead |
|
Real-time Balance Retrieval Lambda |
Sub-100ms live balances enabling one-click checkout |
|
Multi-tenant DynamoDB design |
Unlimited brand clients with full data isolation, no onboarding changes |
|
Serverless on-demand cost model |
Usage-based spend that makes SaaS unit economics viable |
|
Immutable per-transaction audit trail |
Traceable, dispute-ready record of every credit and deduction |
|
Amazon CloudWatch per-brand dashboards |
Visibility across AI nudges, transactions, and latency |
Conclusion
Service Partnership
CloudTry built a fully serverless AWS backend for the Customer's one-click cashback engine, spanning four flows: earning, AI-driven nudges, balance display, and redemption. The build delivered real-time cashback crediting, sub-100ms balance retrieval at checkout, atomic redemptions that rule out double-spend, full data isolation across brand clients, and — at the centre of the retention story — AI-generated, individually personalised cashback reminders delivered at each customer's predicted optimal engagement window.
Partner Support Services (Pre- and Post-Implementation)
Before implementation, CloudTry led discovery and scoping, producing a statement of work with commercial terms and a total cost of ownership analysis comparing the existing server-based backend against the serverless architecture. The analysis included both per-transaction and per-nudge cost estimates — establishing early that AI personalisation through Bedrock would cost under $0.0002 per message. The multi-tenant data design, particularly the partition key strategy for brand isolation, was agreed and documented before the build, since it shaped every other architectural decision and would have been expensive to change mid-engagement.
After deployment, CloudTry ran user acceptance testing that explicitly exercised concurrent redemption scenarios, confirming that the DynamoDB conditional-write approach eliminated double-spend under the kind of race conditions that surface during peak sale events. Amazon CloudWatch per-brand dashboards were delivered as part of the engagement, giving the Customer's team visibility into Lambda functions, Bedrock invocations, DynamoDB operations, and API latency from day one. The engagement ran from March 2026 to April 2026 and closed with a customer satisfaction score of 4.75 out of 5.
About CloudTry
CloudTry is a cloud and AI services company headquartered in Lucknow and with offices in Noida, and Kathmandu (Nepal), specializing in the design and deployment of cloud-native and generative AI solutions on AWS. As an AWS Advanced Tier Services Partner, CloudTry brings a team certified across the AWS stack, holding the AWS Certified Cloud Practitioner, AWS Certified AI Practitioner, AWS Certified Machine Learning – Specialty, and AWS Certified Solutions Architect credentials at both Associate and Professional levels. The company works with organizations to move from manual, staff-dependent processes to scalable, production-grade AI systems, with a focus on retrieval-augmented generation, conversational AI, and cost-efficient serverless architectures, among other ready-to-deploy AI solutions, fully built on AWS.