Loyalty and promotions
Promotions and loyalty programs work when your team can run them without a developer. We build promotion rules, discount codes, private sales, points and referral schemes into the commerce engine, all managed from the back office. Reports show the effect of each campaign on sales.
Loyalty and promotions: an overview
Loyalty programs and promotions belong to the back office as much as to the storefront. The discount itself is rarely the hard part. The rules around it are: whether a code applies to items already on sale, whether it combines with free shipping, whether business customers get it, and what happens to points when an order is returned. When those rules live in a developer's head, every campaign turns into a ticket.
On Medusa v2, the promotions module already handles codes, automatic discounts, buy X get Y rules and campaigns with a budget. We configure it for your cases and add what it does not cover, such as a points ledger, referral codes and private sales limited to a customer group. Your team creates and schedules campaigns from the back office, and each campaign report shows the orders that used it and the discount given, so you judge the result yourselves.
We would not build a points program only because competitors have one. A loyalty program costs something on every order, needs rules for returns and expiry, and needs someone to answer customers about their balance. If the goal is to bring customers back, a simple code for returning customers can test the idea before a full ledger is built.
What the service covers
Promotion rules
Percentage and fixed discounts, free shipping, buy X get Y, and tiered discounts by basket value. Each rule states what it applies to and what it can be combined with.
Discount codes
Single codes, codes generated in bulk for a campaign, and codes limited per customer or per period. Usage is tracked for every code.
Campaigns and scheduling
Campaigns group promotions with a start date, an end date and an optional budget. They start and stop on schedule, and the budget caps the total discount given.
Points and tiers
A points ledger with earning rules, redemption at checkout, expiry and optional customer tiers. Returns reverse the points automatically.
Referrals and private sales
Referral codes tied to customer accounts, with the reward given once the first order is final. Private sales restricted to a customer group or a list.
Campaign reporting
For each campaign: orders, discount given, average basket and codes used. Exports are available for your accountant and your marketing team.
When it is the right call
- 01
Each new promotion needs a developer to change code or configure an app.
- 02
Discount codes get shared publicly and you cannot limit them per customer or per period.
- 03
You want a points program, and the available apps do not match your rules or your Hebrew storefront.
- 04
You run private sales for a list of customers and manage access by hand.
What you get
Programmable promotion rules
Loyalty program with points and referrals
Reports on the effect on sales
How we work on it
Step 1
Rules written down
We list the promotions you run and want to run, how they combine, and how points are earned, spent, returned and expired. Conflicts between rules, such as two discounts on the same item, are decided here.
Step 2
Engine configured
Built-in promotion features are configured first, and only the missing parts are designed as custom modules. Fewer custom modules means less to maintain later.
Step 3
Back office and storefront
Campaign screens for your team, and the display of discounts, points and referral links for customers, are built and tested on a test URL. The display of a discount in the cart is checked in Hebrew and in English, with prices including VAT.
Step 4
Edge cases tested
Returns, partial refunds, canceled orders and expired codes are tested automatically against the rules. Abuse cases, such as reusing a single-use code or referring yourself, are part of the test suite.
Step 5
Reports and first campaign
Campaign reports are checked against test orders, and the first real campaign is prepared with your team before launch. Your team creates that campaign itself, with us alongside.
Designing a points ledger for a customer loyalty program
Points are stored as a ledger, not as a single balance: each line says how many points were earned or spent, on which order, and when they expire. A return removes the points its order earned, and the balance is always the sum of the lines, so any question from a customer can be answered line by line.
Referral codes are tied to a customer account, rewarded only after the referred customer's first order has passed the return period, and checked against simple abuse, such as referring yourself with a second email address.
Shopify apps for loyalty and promotions, and where they stop
On Shopify, discount codes and automatic discounts are built in, and loyalty apps cover the common programs. If your rules match what an app does and it displays correctly in Hebrew, use it. Custom work is justified when the rules are your own, when loyalty has to work across the online store, a B2B portal and a physical shop, or when you want the customer data in your own database.
Apps have costs worth checking: a monthly fee that may grow with your order volume, a widget that adds scripts to every page, and customer data stored in a third-party account. None of these is a reason to avoid an app. They are reasons to compare it with a custom module over several years of running the store, not only at launch.
How discounts interact with VAT, returns and invoices
A discount reduces the price including VAT, and the invoice shows the discounted amount and its VAT correctly when the engine computes tax after discounts. A promotion that applies to the whole basket is spread across the lines, so a partial return refunds the right share of the discount rather than the full price of the item.
Points redeemed as payment are a different case from a discount, and your accountant may want them recorded differently on the invoice. We settle that rule before the build and apply it the same way in the checkout, on the invoice and in the reports.
Technologies
- Medusa
- Shopify
- Strapi
- Meilisearch
- Next.js
- PostgreSQL
How you can work with us
Fixed-scope project
The scope of the first version is written down, split into milestones and priced per milestone. It suits a product or a feature with a clear outline.
Dedicated team
A team works on your product over the long run, with its own planning and release cadence. It suits a product that keeps changing.
Team extension
One or more of our engineers join your team and work with your tools and routines. It suits a company that knows where it is going but lacks people or a specific skill.
Monthly support
A monthly retainer covers maintenance, updates and small changes, with an agreed response time. It suits a product in production that needs upkeep more than new features.
Questions about Loyalty and promotions
Can promotions be scheduled in advance?
Yes. Each campaign has a start and an end date, a budget if you want one, and the customer groups it applies to. It switches on and off by itself, so a weekend sale does not depend on someone sitting at a computer.
Can the loyalty program also work in our physical shop?
Yes, if your point-of-sale system can call an API or exchange data with the store. The points ledger stays in one place and both channels read from it and write to it. We check what your point-of-sale system allows before designing that part.
How do we know whether a promotion worked?
Each campaign report lists the orders that used it, the discount given and the average basket, and you can compare it with another period of your choice. Separate codes per channel, such as a newsletter or a partner site, show where the orders came from. The reports give you the numbers, and the judgment on whether the campaign paid off stays with you.
Can we limit a discount to certain customers or products?
Yes. Each promotion has conditions on the products, collections or categories it applies to, and on who can use it, such as a customer group, a list or first-time buyers. Codes can be limited to one use per customer. The conditions are set from the back office, not in code.
How do you prevent abuse of discount codes and referrals?
Codes can be single-use, limited per customer, capped in total and given an expiry date. Referral rewards wait until the referred order is final, after the return period, and accounts that share a delivery address can be flagged for review. No rule set stops every abuse, but these close the obvious ones.
What does a loyalty program cost to build?
The cost follows the rules. A simple points-per-purchase program with redemption at checkout is a contained piece of work, while tiers, expiry, referrals and a physical shop each add their own logic and tests. Using the engine's built-in promotions where possible keeps the custom part small, and we scope the work once the rules are written down.
In the same service area
Design, build and ship your project
Describe it in three lines. We reply with specific questions and a first take on how to proceed.