PRD and technical documentation

The build, the CRM, and what it costs to run.

A single reference for the product, the architecture, the communication and cashback systems, and a one-time and recurring cost breakdown.

1. Overview and goals

A phygital activation system that turns every sample and every pack into a tracked purchase and a known consumer, with the reward that fits each case.

Two workflows share one back end. Offline sampling gives a coupon, redeemed on the next paid purchase. A bought pack gives cashback to UPI, validated by the pack code and the bill. Both build one consumer base, drive automated communication on WhatsApp and email, and report to one dashboard.

Goals:

2. Scope

In scope

Out of scope for phase one

3. Functional requirements

RefRequirementNotes
FR1Scan a QR on a pack, sachet, standee or tent card and open the flowDeep link carries source, city, campaign
FR2Register: name, mobile, gender, optional email, auto cityConsent captured
FR3Verify the numberAuto on WhatsApp, OTP fallback elsewhere
FR4Read the code and branch by typeSample → coupon, pack → cashback
FR5Upload and validate the billOCR reads store, date, amount, invoice, product
FR6Issue coupon or pay cashbackCashback via payout API to UPI
FR7Enforce limitsPer phone, per UPI, per code, per invoice
FR8Store first-party record in the CRMSegmentable by activation, city, campaign
FR9Run behaviour journeys on WhatsApp, email, SMSTriggered, not blast
FR10Dashboard: leads, verified, redemption, city sales, acquisition cost, repeat, ROIFilter by city and campaign
FR11Export consented segments for adsMeta and Google custom and lookalike

4. Architecture

Five layers, each replaceable, connected through one API and one database.

LayerDoes whatBuilt with
Front endLanding page, chatbot, sampling screenStatic site on a CDN, plus a chat UI
API and logicCapture, code check, coupon, payout trigger, limitsServerless functions
DataConsumers, codes, coupons, bills, redemptions, payoutsManaged SQL database
ServicesBill OCR, UPI payout, WhatsApp, email, SMSThird-party APIs
CRM and dashboardSegments, journeys, reportingSaaS CRM plus a reporting view
Data flow: scan → capture and set a first-party id → read code type → validate (code, then bill via OCR) → issue coupon or call the payout API → write the event to the database → sync to the CRM → journeys fire → dashboard updates.

5. Data model

Core tables. The phone number and UPI ID are the identity keys.

TableKey fields
consumerid, first_party_id, name, mobile, gender, email, city, consent, upi_id, created_at
codecode, type (sample or pack), batch, sku, status, consumer_id, claimed_at
couponcoupon_code, consumer_id, platform, offer, min_cart, status, expiry, redeemed_at
billid, consumer_id, invoice_no, store, platform, amount, sku, date, image_ref, check_status
payoutid, consumer_id, amount, upi_id, gateway_ref, status, paid_at
activationid, name, type, city, campaign, kiosk, cost
eventid, consumer_id, type, channel, payload, ts

Fraud keys: invoice_no unique per reward, code one-time, cashback capped per mobile and upi_id.

6. Tech stack

PartRecommendedWhy
Hosting and APIsCloudflare Pages and WorkersServerless, cheap, scales, generous free tier
DatabaseCloudflare D1 or Postgres (Supabase / RDS)Start on D1, move to Postgres at scale
Bill OCRVeryfi, Nanonets or TabscannerReads receipts to structured fields, flags duplicates
UPI payoutRazorpayX or Cashfree PayoutsInstant UPI, name check, one API
WhatsAppBSP: AiSensy, Interakt or GupshupOfficial API, templates, automation
EmailAmazon SES or MailchimpSES cheapest at scale, Mailchimp for ease
SMSMSG91Fallback channel, DLT-ready

7. CRM and communication system

Communication is the priority, so the CRM is a ready tool, not a heavy build. Two ways to set it up.

Option A · Lean, fast to launch recommended to start

A WhatsApp BSP for chat and journeys, plus an email tool, plus our own dashboard reading the database. Lower cost, quick onboarding, full control of the data.

Option B · Unified engagement platform

One platform that does WhatsApp, email, SMS, journeys, segmentation and analytics together, such as WebEngage or MoEngage. Less custom work, more cost, better for large scale.

Salesforce: DeHaat already runs it for sales. Sales and cashback data sync to it. Marketing Cloud can run the sends too, but it is heavier and costlier, so it is not the first choice for launch.

Mass communication

8. Cashback and payouts

Cashback pays to UPI through a payout API. The reward amount is a marketing budget, separate from the transaction fee.

9. Fraud and security

Compliance: WhatsApp opt-in before messaging, SMS on a DLT-registered sender, consumer data stored with consent and access control. Payouts move money out only, so no card data and no PCI scope.

10. Scale and reliability

11. Cost breakdown

Indicative India-market estimates, to confirm with vendors. Split into one-time, recurring fixed, and per-use. The cashback amount itself is a separate marketing budget.

A. One-time (build and setup)

ItemLean (Option A)Full (Option B)
Development: capture, chatbot, code engine, validation, payout, dashboard₹6,00,000 to ₹10,00,000₹15,00,000 to ₹30,00,000
WhatsApp Business API setup and templates (via BSP)Included to ₹25,000Included to ₹50,000
Payout and OCR integration and testingIn dev aboveIn dev above
DLT registration for SMS₹5,000 to ₹6,000₹5,000 to ₹6,000
Code generation and print integration (art, not packaging)₹50,000 to ₹1,50,000₹50,000 to ₹1,50,000
One-time total (excluding packaging print cost)~₹7 to 12 lakh~₹16 to 32 lakh

B. Recurring fixed (per month)

ItemLeanFull
WhatsApp BSP platform fee₹1,000 to ₹5,000Included in platform
Email tool baseSES ~₹0, or Mailchimp ₹2,000 to ₹25,000Included in platform
Engagement platform (WebEngage / MoEngage)Not used₹1,00,000 to ₹3,00,000+
Server and database₹2,000 to ₹15,000₹10,000 to ₹40,000
Maintenance and support₹30,000 to ₹75,000₹75,000 to ₹1,50,000
Recurring fixed total~₹35k to ₹1.2 lakh / mo~₹2 to 5 lakh / mo

C. Per-use (variable)

ItemRateNotes
WhatsApp utility message~₹0.11 to ₹0.16Meta per-message, via BSP
WhatsApp marketing message~₹0.78 to ₹0.88Costlier, use with care
EmailSES ~₹0.007 to ₹0.01 each~₹8.5 per 1,000 on SES
SMS~₹0.15 to ₹0.25Fallback only
Bill OCR~₹1 to ₹5 per billOnly on cashback claims
UPI payout fee~₹2 to ₹5 per payoutNegotiable at volume

D. Worked monthly example

Assume 50,000 new consumers a month, 2,00,000 active in the base, 40% of pack buyers claim cashback (~20,000 payouts and bills), 5 messages per active consumer (4 utility, 1 marketing) and 8 emails.

LineWorkingApprox / month
WhatsApp utility2,00,000 × 4 × ₹0.13₹1,04,000
WhatsApp marketing2,00,000 × 1 × ₹0.80₹1,60,000
Email2,00,000 × 8 on SES~₹14,000
Bill OCR20,000 × ₹3₹60,000
UPI payout fees20,000 × ₹3₹60,000
Platform and server (Lean)fixed~₹50,000
Running cost, excluding the cashback amount~₹4.5 lakh / mo
The cashback amount is separate. At 20,000 payouts of, say, ₹100, that is ₹20 lakh a month of reward budget, funded as a marketing spend, not a tech cost. Message mix drives most of the running cost, so tuning marketing versus utility sends is the main lever.

12. Rollout and team

Phases

Team

All figures are indicative estimates for planning, based on public India-market rates, and should be confirmed with the chosen vendors. WhatsApp per-message rates are set by Meta and change over time.