Bharat · Edition for Examination
Provisional Spec · 04 May 2024
Final examination edition

Don't ban
Pay-on-Delivery.
Decide it.

Sub-second decisioningPOD rejection rate > 30% blocks PODBronze → Silver → Gold>95% fraud accuracy40% fewer POD failuresDatabricks SQL WarehouseReal-time at checkoutSub-second decisioningPOD rejection rate > 30% blocks PODBronze → Silver → Gold>95% fraud accuracy40% fewer POD failuresDatabricks SQL WarehouseReal-time at checkoutSub-second decisioningPOD rejection rate > 30% blocks PODBronze → Silver → Gold>95% fraud accuracy40% fewer POD failuresDatabricks SQL WarehouseReal-time at checkout
Abstract
01
Lead

A real-time decision engine that restricts payment options at checkout — based on the user's own behavior.

Pay-on-Delivery is loved by Indian shoppers and hated by logistics teams. Rejection and return rates of POD orders can quietly exceed 30%, draining margins through redundant delivery attempts, reverse logistics, and lost trust. The conventional fix — turn POD off globally for some pin codes or some carts above a threshold — punishes good customers and barely touches the actual offenders.

The invention proposed here is a system that ingests order, return and user data into a Databricks lakehouse, computes behavioral features per user, and serves a per-checkout decision in under two seconds: which payment methods to allow, which to silently restrict, and why. A trained classifier supplements explicit rules; an A/B testing harness measures the impact on POD failure rate, fraud accuracy, and customer satisfaction.

02 · Pipeline

Bronze, silver, gold — then a verdict.

Read architecture
Fig. 1 — Real-time decision pipeline on Databricks live
SOURCESBRONZE · RAWSILVER · CLEANEDGOLD · FEATURESDECISIONOrders DBUser AcctReturns APIBRONZEraw eventsSILVERnormalizedGOLDpod_pct, fail_rateDECISIONENGINE< 2 s SLAallow / restrict PODML CLASSIFIER
The problem

Static policies, dynamic users.

Today's platforms turn POD on or off using cart value or pin code. These criteria do not see the actual user — their history of rejections, returns, prepaid track record, account age, or basket profile. The result is a system that simultaneously under-protects against repeat offenders and over-restricts loyal customers.

The approach

A per-user, per-checkout verdict.

A Databricks Delta lake holds raw events (Bronze), normalized tables (Silver), and a per-user feature table (Gold). At checkout, an API call to the decision engine evaluates rules and a trained classifier, returning the allowed payment set with a human-readable reason trail — synchronously, in well under the two-second SLA.

Walk an examiner through it

The demo runs the real decision engine against six representative shoppers.