Promotions & Marketing
Discounts, promo codes, customer segments and campaigns — everything Storefront offers to win and keep customers.
Promotions & Marketing
Storefront's marketing tools live under Storefront → Promotions in the console. They fall into two groups that work together:
| Tool | What it does |
|---|---|
| Promotions | Discounts applied at checkout: percentage off, amount off, free delivery, or buy X get Y. They can apply automatically or only with a promo code, and can be targeted, scheduled, limited and stacked. |
| Promo Codes | Codes that unlock a promotion — generated in bulk or created one at a time, single-use or reusable. |
| Segments | Saved groups of customers defined by rules such as order count, recent or lapsed ordering, spend, or push reachability. |
| Campaigns | Notifications sent by push and/or to the in-app inbox, to a segment or to all customers, right away or at a scheduled time. |
| Push Notifications | A quick form to message selected customers (or everyone) now. Sends a campaign behind the scenes. |
How they fit together
- Create a promotion — for example, 20% off mains on weekdays.
- Optionally make it code-based and generate codes to share.
- Build a segment of the customers you want to reach — for example, customers who haven't ordered in 30 days.
- Announce the promotion to that segment. Storefront creates a campaign that goes out when the promotion starts and deep links into it in the app.
- Customers see the discount automatically in their cart (or enter the code), and it is applied at checkout.
Customer experience
- Discounts at checkout — automatic promotions are applied to every eligible cart, and codes are entered in the cart. The discount is part of the amount charged, whichever payment gateway is used (cash, Stripe or QPay). See Cart and Checkout.
- Deals in the app — the app can list your live, public promotions with
GET /storefront/v1/promotions. - Notifications — campaigns arrive as push notifications and in the customer's notifications inbox. Customers can turn promotional notifications off in their preferences; campaigns skip them.
Requirements
Promotions work out of the box. Campaigns need two background processes that every production Fleetbase install should already be running:
- The scheduler — sends scheduled campaigns (checked every minute) and releases promotion uses held by abandoned checkouts (every 15 minutes).
- A queue worker — campaigns are delivered to customers in queued batches.
To reach customers by push, configure a notification channel and make sure your app registers device tokens.
Permissions
The Storefront permission schema includes promotion (with the generate-codes and announce actions), promotion-code, customer-segment (with preview) and campaign (with send and cancel). The PromotionsManager policy grants all of them.