Reward Points Service Tutorials
With the Emporix API Reward Points Service, you can allow your customers to gather reward points for every completed order, or grant points to customers irrespective of the orders they made. Later on, the customers can exchange the collected points for coupons, which are managed through the Coupon Service, and can be added to a cart.
How to manage the reward points settings for a site
To start using the reward points functionality, first you need to update the reward points configuration for your site.
Retrieve the current reward points configuration for a site
Check the current reward points mixin configuration for your site by calling theThe following scope is required:
site.site_manage
Update the reward points settings for a site
The reward points settings are stored in a site'smixins
, within the coupon settings.info
To learn more about mixins in the Emporix Commerce Engine, check out the Standard Practices in the Emporix API.
The parameters that need to be configured for the reward points are as follows:
enable
toggle - a boolean that indicates if the reward points feature is enabledorderValueToRewardPointsFactor
- allows to calculate the number of reward points assigned to a customer after a purchase is madevalidityInMonths
- specifies the lifespan of reward pointscouponPrefix
- used to begin the coupon code generated at the moment of the reward points redemption, where the full coupon code with prefix is presented in the following format:prefix-coupon_code
, for exampleL-232394
The following scope is required:
site.site_manage
How to manage reward points by an employee
As a merchant employee, you can manage your customers' reward points and redemption options.
Add reward points for a customer
If the reward points functionality is enabled, the reward points entry is created or updated for a customer automatically every time an order is completed.
info
The communication between reward points and site settings is cached. The cache is invalidated every 15 minutes. It has to be considered after modifying the configuration of reward points in site's mixins.
The following scope is required:
rewardspoints.rewardpoints_manage
Create reward points redemption options
As a merchant's employee, you can create a list of options for the customers to choose from when redeeming the collected reward points. For example, different types of coupons can be specified. To achieve that, you must send a request to theHow to manage the reward points by a logged-in customer
Your customers can redeem the collected reward points by paying with coupons that are generated based on the number of collected points.
Check the available reward points redemption options
If the customer wants to redeem reward points in exchange for a coupon, first they need to check the available coupon options offered by the merchant. To achieve that, they need to send a request to theRedeem reward points for a coupon code
To create a coupon based on a certain amount of reward points, the customer sends a request to theinfo
Reward points can only be exchanged for percentage and absolute coupons.
info
For more information on applying coupons to cart, check out How to apply coupons to a cart in the Coupon Service guide.
Check the reward points balance and history
Customers can view how many points they have left, and see the history of redeemed reward points.
To check the reward points balance and history, the customer sends a request to the