Home / Help Center / pos-app-wholesale / wholesale / Schemes & Deals
🎁 wholesale

Schemes & Deals

Schemes & Deals is where you define promotional trade incentives for wholesale buyers — free-goods offers, order-value discounts and flat discounts — optionally restricted to a customer tier and a validity window. The page itself only manages the scheme definitions; nothing in the wholesale app currently calls the evaluation API automatically at order time.

📍 Menu path: Wholesale → Schemes & Deals
👤 Who uses it: All roles with the Billing feature enabled

Overview

Every scheme has one of three types: BUY_X_GET_Y (buy a minimum quantity of a trigger product, get a free quantity of another product), VOLUME_DISCOUNT (order total at or above a minimum value gets a percentage off), or FLAT_DISCOUNT (a flat percentage off, with no trigger condition).

A scheme can optionally be limited to one customer tier (STANDARD, RETAILER, DISTRIBUTOR, VIP) — leaving it blank applies the scheme to all tiers.

Valid From / Valid Until dates are optional; leaving either blank means the scheme has no start or no end boundary (shown as "∞" on the card).

Each scheme card has an Active/Off toggle that flips isActive without opening the edit modal — inactive schemes stay in the list (dimmed) rather than being deleted.

Product matching for BUY_X_GET_Y is by free-text product name typed into the form, not a product picker — there is no validation that the name matches an actual catalogue product.

Before You Start

Step-by-Step Guide

1 Create a Buy-X-Get-Y scheme

  1. Open Wholesale → Schemes & Deals and click "New Scheme".
  2. Enter a Scheme Name, leave Scheme Type as "BUY X GET Y".
  3. Fill in Buy Product (trigger) and Min Quantity, then Free Product and Free Quantity.
  4. Optionally restrict to a Customer Tier and set Valid From / Valid Until dates.
  5. Click "Create".
💡 The trigger and free product fields are plain text — type the product name exactly as it should be matched later by the evaluate API.

2 Create a volume-discount or flat-discount scheme

  1. Click "New Scheme" and change Scheme Type to "VOLUME DISCOUNT" or "FLAT DISCOUNT".
  2. For Volume Discount, set Min Order Value and Discount %; for Flat Discount, set only Discount %.
  3. Save the scheme.

3 Toggle a scheme on or off without deleting it

  1. Click the "Active"/"Off" pill on the scheme card to flip it — no confirmation is needed.
  2. An inactive scheme is shown dimmed with an "INACTIVE" tag but remains editable.

4 Edit or delete a scheme

  1. Click the pencil icon on a scheme card to reopen the form pre-filled with its values.
  2. Click the trash icon and confirm to permanently delete a scheme.

Every Field & Button, Explained

Field / ButtonWhat it does
Scheme NameRequired. Free-text label shown on the scheme card, e.g. "Buy 10 get 1 free".
Scheme TypeBUY_X_GET_Y, VOLUME_DISCOUNT or FLAT_DISCOUNT — changes which of the fields below appear in the form.
Buy Product (trigger) / Min QuantityBUY_X_GET_Y only. The product name and minimum quantity that must appear in an order to trigger the free goods.
Free Product / Free QuantityBUY_X_GET_Y only. What is given free, and how much, per one occurrence of the trigger threshold being met.
Min Order Value (₹)VOLUME_DISCOUNT only. The order subtotal threshold that unlocks the discount.
Discount %Used by both VOLUME_DISCOUNT and FLAT_DISCOUNT — the percentage discount applied when the scheme matches.
Customer TierOptional. Restricts the scheme to one tier (STANDARD/RETAILER/DISTRIBUTOR/VIP); leave as "All Tiers" to apply to everyone.
Valid From / Valid UntilOptional date range. A blank Valid From or Valid Until means no lower/upper bound.
NotesOptional free-text notes shown under the scheme summary line.
Active togglePill button on each card; flips isActive between 1 and 0 without opening the edit form.

Tips & Best Practices

Troubleshooting & FAQ

I set up a scheme but it never applies a discount or free item to an order.
This page only stores scheme definitions. The evaluation logic lives in a separate API, POST /wholesale/schemes/evaluate (evaluateSchemes in packages/pos-core/src/wholesale.js), which is not called by any order-entry or billing screen in the current build. Nothing in the wholesale app automatically checks an order against active schemes — benefits must currently be applied manually by staff, or the endpoint called directly by integrators.
A BUY_X_GET_Y scheme is not matching even though the customer bought enough of the trigger product.
Matching is done by exact (trimmed, case-insensitive) product-name string comparison between the scheme's Buy Product field and the order item's productName. If the product name in the order differs even slightly from what you typed when creating the scheme (extra spaces, a different SKU description), it will not match.
Can a scheme apply to only part of an order or stack with other schemes?
The evaluate function returns every matching scheme as a separate benefit in a flat list — there is no stacking logic, priority order, or exclusivity rule between schemes; each active scheme is evaluated independently.
I deleted a scheme by mistake.
Deletion is immediate and permanent after the confirm prompt — there is no undo, and no scheme-usage history is kept once a scheme is removed.
Does turning a scheme "Off" affect past orders?
No — schemes have no link back to WholesaleOrder rows. Activating/deactivating only changes whether the scheme would be returned by a future evaluate call; it has no effect on already-placed orders.