Loyalty points
On this page
Loyalty points are a second currency in your store. Customers earn them by buying products you have enabled for earning, and spend them on products you have enabled for spending, either instead of currency or alongside it.
Setting up a points program takes two passes, and they are separate articles because earning has to work before spending is worth configuring:
- How to allow customers to earn loyalty reward points
- How to allow customers to spend loyalty reward points
Where points are configured
Points settings cascade from the store down to the individual product price, with the most specific setting winning.
| Level | Record | Controls |
|---|---|---|
| Store | Store | Whether prices show in currency, points, or both; when earned points activate; how long they last; where they can be spent |
| Price book | Price Book | The default earn and purchase rates for every product priced in it |
| Product price | Price Book Entry | Whether this product earns or is bought with points, and the exact point values |
| Customer | Contact | Whether this person may spend their account’s points |
How points are calculated
A price book entry can name an exact figure, or leave it blank and let the price book’s rate do the work.
Earning. If Earn Points is set on the price book entry, the customer earns that many points. If it is blank, they earn the price multiplied by the price book’s Default Earn Rate. With a rate of 10, a $10 product earns 100 points. Earn Points Bonus adds a fixed number of extra points on top, which is useful for a short promotion.
Spending. If Purchase Points is set on the entry, that is the points price. If it is blank, the price is the currency price multiplied by the price book’s Default Purchase Rate. With a rate of 100, a $10 product costs 1000 points. Purchase Points Sale acts as a sale price in points, the same way a sale price works in currency.
:::note
The two rates are independent, and the gap between them is your program’s exchange rate. Earning at 10 and spending at 100 means a customer earns 100 points on a $10 purchase and needs 1000 points to claim that product, so ten purchases fund one reward.
:::
Where a customer pays with points, they earn less in return, scaled by the store’s Points Earned With Points Ratio. At the default of 100 they earn the full amount; at 0 a points purchase earns nothing.
When points become spendable
Points are not spendable the moment an order is placed. The store’s Activate Points At Order Status field lists the order statuses at which earned points activate, using order status API names separated by semicolons. Until an order reaches one of those statuses, its points sit on the account as a pending balance.
This exists so points are not spendable on an order that is later cancelled or never paid for. Choose a status that means the order is settled.
Expiry
Points Expiry Length and Points Expiry Unit on the store set how long earned points last, in weeks or months. Entering 36 months gives points a three-year life. Leave the length blank for points that never expire.
Expiry is stamped on each credit when it is created, so changing the store setting affects only points earned afterwards.
Where points can be spent
Default Points Usage on the store decides whether points earned here can be spent in this store only, across the store group, or in any store in the org. The value is copied onto each ledger entry as it is created, so a change applies to new points and leaves existing ones as they are.
The account points ledger
Every movement is an Account Points Ledger record on the account, and the account’s Account Points Balance field rolls them up.
| Field | Records |
|---|---|
| Entry Type | credit for points earned, debit for points spent |
| Points Value | How many points moved |
| Activated | Whether a credit counts toward the spendable balance yet |
| Expires At | When this credit lapses |
| Reason | Why the entry exists |
| Order Item, Payment | What the entry relates to |
| Transaction Currency, Transaction Currency Value | The currency equivalent at the time |
Because the ledger is ordinary Salesforce data, you can credit points from a flow to reward something other than a purchase, such as a review or a referral. Create a credit entry against the account, set Activated, and set an expiry if you use one.
Customers see their own balance and history on the account points page when signed in.
Was this article helpful?
Thanks for your feedback! It helps us improve our docs.