Loyalty discounts
A loyalty discount is a type of order discount which allows a customer to pay part of their order using loyalty points, using a conversion rate specified on the discount.
To create a loyalty point discount:
- Go to Ecommerce > Discount & Offers
- Click on the Order discounts node
- Click New discount in the toolbar to open the edit discount view (Figure 1.1)
Fill in the details:
- In the general section enter a name and any other settings you may find relevant, e.g. a description
- In the discount section:
- Apply as: Order discount (exclusive) – since this is payment-like, you typically want to apply this before checking if other discounts apply
- Discount type: Loyalty discount
- Value of loyalty points: An appropriate value, e.g. 1 loyalty point = 1 currency unit
- Currency: The currency the value should be calculated in
- In the triggers sections you don’t need to change anything by defauly, but if you have separate currencies on the solution you should create separate loyalty point discounts each currency and then use the Product Catalog > Language section to specify which language this particular discount should be available for.
- Once you’ve configured everything to your liking you should Save.
To make it possible for a customer to apply loyalty points to an order and trigger this discount you must add a field to the checkout process with the name and id EcomOrderPointsToUse and the appropriate value in points and submit it with the other order fields:
HTML
<input class="form-control" type="text" name="EcomOrderPointsToUse" id="EcomOrderPointsToUse" value='@GetValue("Ecom:Order.PointsToUse")' />
Please note that the cart must be updated before you can see the discount order line, and that you must manually check whether the user has enough loyalty points when the order is submitted/updated.