Discount fraud prevention and CRM pipeline automation for a multi-brand product company
A four-store Shopify operation had no controls on manual discounting and no visibility into the sales pipeline. We built two systems that closed both gaps automatically.
No guardrails on discounts. No pipeline visibility. Four stores, zero automation.
The company operated four Shopify stores under different brands. Two systemic problems were eroding margins and making it impossible to forecast revenue accurately.
Uncontrolled manual discounting
Any staff member with draft order access could apply arbitrary discounts. 50% off, $200 off, with no approval and no audit trail. There was no way to know it was happening until margin reports came in.
Invisible sales pipeline
Abandoned checkouts, draft orders, and paid orders existed only in Shopify. The sales team had no CRM visibility into where deals stood, who to follow up with, or what was about to close.
Four stores, all siloed
Each store operated independently with no shared tooling. Any solution had to work identically across all four brands from a single codebase, with per-store configuration.
Two systems, one shared codebase
Both systems run as a single Node.js application deployed independently per store. Shopify webhooks trigger the logic in real time; a background poller catches abandoned checkouts every 15 minutes.
When a staff member saves a draft order with a manual discount, the system detects it within seconds, removes the unauthorized discount via the Shopify API, appends an audit note, and sends an alert. Legitimate coupon codes entered in the discount field are always preserved.
- Manual order-level discounts (“Add custom order discount”), blocked and removed
- Manual line-item price edits, blocked and removed
- Coupon / discount codes entered in the codes field, always preserved
- B2B portal orders automatically exempted. wholesale pricing is never touched
- Audit note added to the order explaining what was removed and why
- Alert notification sent to management on every removal
• Manual order discount: -$200.00
Preserved 1 approved discount:
• Code SUMMER15: -15%
Every significant Shopify event creates or updates a Deal in Zoho CRM. The system finds or creates a Contact by email, links them to a Deal, and progresses the deal stage automatically as the order moves through its lifecycle.
- Abandoned checkouts detected via polling every 15 minutes (value threshold: $1,000+)
- Draft orders synced instantly via webhook. deal created or updated
- Paid orders automatically advance the deal to “Paid” stage
- Fulfilled orders advance to “Shipped” with tracking number written to the deal
- Per-store pipeline routing. retail vs. B2B based on order tags
- Sales rep assignment from order notes. automatic deal owner mapping
- Three-step deal search fallback ensures no duplicates are ever created
From checkout to CRM, fully automated
Both systems share a single deployment per store. Shopify webhooks trigger the discount guard and CRM sync in parallel. The abandoned checkout poller runs independently in the background.
Customer starts a checkout
If the checkout is abandoned and meets the value threshold, the 15-minute poller picks it up and creates a Prospect deal in Zoho CRM.
Every 15 minStaff creates a draft order
Two things happen simultaneously: the Discount Guard inspects and removes any unauthorized manual discounts, while the CRM sync creates or updates the deal at “Draft Order” stage.
Within secondsOrder is paid
The CRM sync advances the deal to “Paid” stage. Amount, description, and store department are updated.
InstantOrder is fulfilled and shipped
The deal advances to “Shipped” and the tracking number is written directly to the CRM record. The sales team sees the full lifecycle without ever leaving Zoho.
AutomaticWhat changed after deployment
Measurable improvements across margin protection, pipeline visibility, and operational efficiency.
100% unauthorized discount enforcement
Every manual discount is caught and removed within seconds. Staff can only apply pre-approved coupon codes. Management receives an alert on every removal.
Full deal lifecycle in Zoho CRM
Every significant order event is automatically reflected in the CRM. The sales team sees abandoned checkouts, draft orders, payments, and shipments without manual data entry.
High-value checkouts surfaced in 15 min
Abandoned checkouts above the value threshold appear as Prospect deals in the CRM within 15 minutes, giving the sales team a follow-up queue that previously did not exist.
4 stores, 1 codebase, 0 per-store code
The same application runs identically across all four brands. Store-specific configuration (pipelines, departments, thresholds) is handled entirely through environment variables.
Every removal documented on the order
An audit note is appended to the Shopify order detailing exactly which discounts were removed and which were preserved. Full accountability with zero manual effort.
Independent per-store deployments
Each store runs its own isolated instance. A code change is deployed across all four stores in under two minutes with a single command per store.
What powers it
Backend
Node.js · Express · HMAC-SHA256 webhook verification · OAuth2 token management
Integrations
Shopify Admin REST API · Zoho CRM API (COQL queries, Deal/Contact CRUD) · Abandoned Checkout Poller
Infrastructure
One codebase · Per-store deployments via environment variables · Cloud-hosted with zero-downtime deploys
Need similar controls for your Shopify operation?
Whether it is discount policy enforcement, CRM automation, or multi-store tooling. we build systems that protect margins and give your team visibility.
Book a Free Discovery Call →