Promotions & Coupons¶
Vectis promotions let you create discount rules that apply automatically or via coupon codes. Promotions are evaluated during checkout and allocated per line item on the resulting order.
Discount Rules¶
Every promotion is a discount rule composed of two parts:
- Conditions — criteria that must be met for the rule to activate.
- Actions — the discount applied when conditions are satisfied.
Conditions¶
Conditions can be combined. Common condition types:
| Condition | Example |
|---|---|
| Cart minimum | Order subtotal ≥ $500 |
| Customer group | Buyer belongs to "Gold Distributors" |
| Product category | Cart contains items from "Safety Equipment" |
| Specific products | Cart contains SKU WIDGET-100 |
| Date range | Between Jan 1 and Jan 31 |
| Minimum quantity | At least 20 units of qualifying items |
Actions¶
| Action | Behavior |
|---|---|
| Percentage off | Reduce qualifying line items by X% |
| Fixed amount off | Reduce qualifying line items by a flat amount |
| BOGO | Buy X, get Y free (or at reduced price) |
| Free shipping | Waive the shipping cost for the order |
Coupon Codes vs Automatic Promotions¶
| Type | How it activates | Use case |
|---|---|---|
| Coupon code | Buyer enters the code at checkout | One-time offers, partner deals, targeted campaigns |
| Automatic | Evaluated on every cart that meets conditions | Site-wide sales, volume discounts, loyalty rewards |
Coupon codes can have a usage limit (total redemptions) and a per-customer limit.
Stacking and Priority¶
When multiple promotions match a cart, stacking rules determine which apply:
- Exclusive — only this promotion applies; all others are ignored. Use for "best deal wins" scenarios.
- Stackable — combines with other stackable promotions.
Promotions are evaluated in priority order (lower number = higher priority). If an exclusive promotion matches, the system stops and applies only that one.
Tip
Set your best blanket discount (e.g., "20% off everything") as exclusive with high priority. Stackable promotions work well for layered discounts like "free shipping + 5% category discount."
Cart Integration (GraphQL)¶
Storefront code applies and removes coupons with these mutations:
mutation {
applyCoupon(cartId: "...", code: "SUMMER20") {
cart {
applied_coupons { code discount_amount }
grand_total
}
}
}
mutation {
removeCoupon(cartId: "...", code: "SUMMER20") {
cart { grand_total }
}
}
The cart.applied_coupons field shows all active coupon codes and their computed discount amounts. Automatic promotions appear in cart.applied_promotions.
Checkout Allocation¶
When checkout completes, each matching promotion writes allocations to individual order lines:
- Every line item records which promotions contributed and how much was discounted.
- The order's
discount_totalis the sum of all allocations. - This per-line granularity supports accurate tax calculation (tax is computed on the discounted price).
Note
Promotion allocations are immutable after order creation. Editing a discount rule does not retroactively change existing orders.
Admin Panel¶
From Marketing → Promotions in the admin:
- Create / edit discount rules — set name, priority, date range, and exclusive/stackable flag.
- Configure conditions — add one or more condition types with their parameters.
- Configure actions — choose the discount type and amount.
- Manage coupon codes — generate single codes or bulk batches. Set usage limits.
- View performance — see how many times a promotion has been used and total discount given.
Warning
Deleting a promotion does not affect existing orders, but it immediately stops applying to new carts. Use the date range or disable toggle to end a promotion gracefully.