Set up an in-store summer sale offer

This tutorial guides you through the steps of using the Imports and Offers modules along with Antavo’s API endpoints to set up an in-store offer, giving a 20% discount on summer sale items above a specific purchase value.


1. Import sale product items

When planning the campaign, first you need to select the items that you’d like to include in your campaign. When you have the list, we recommend you employ the built-in ‘product type’ attribute of the product entity, and add the same value to all these items in the Product catalog module. You can do it manually one by one, but if you have a wide range of products on your list, the Import module helps bulk upload any new item with the selected ‘product type’ value (eg. ‘summer sale item’) or update the ‘product type’ attribute of previously added products.

When creating the new import, select the ‘Products’ model and upload a CSV file. The Imports module manual gives you instructions on how to create the CSV file. Please make sure to add the ‘product_type’ column and insert the selected value to all the items.

 

The import process automatically recognizes the existing items and will only update the new values of the import (the ‘product type’ value in this case), you don’t need to worry about duplicates created.


2. Create the offer through the Offers module

After you have imported the product you’d like to include in the summer sale campaign, you need to set up the mechanics that will control the assignment of the offer to eligible purchases.

Find detailed instructions on how to configure an offer in the Offers module user manual here.

When defining the type of the offer on the configuration interface, you need to select the ‘Item’ option from the dropdown list so that later on in the configuration process you can set what carts should be eligible for the offer and to what cart item(s) you want the offer to apply.

 

Under the ‘Eligible items' section, select the ‘Any’ match option, this way not all the items in the cart should be summer sale items to make the offer available for purchase. Choose the ‘Category’ option in the ‘Item’ dropdown field and enter the ‘product type’ value you defined in the imported CSV.
Define the minimum basket value in the ‘Min total’ field under the ‘Cart’ section.
To hand out a 20% discount select the ‘Percentage discount’ in the ‘Type’ field in the ‘Discount’ section and fill in the ‘Value’ field. The ‘Target’ should be 'All items’ to make sure the offer is applied to all items of the summer sale category.

 

You can choose to restrict the offer to a specific store(s). The ‘Store’ field of the configuration interface provides you with this capability. From the dropdown menu, you can select the stores previously added in the Store Management module.


3. Implement API calls

To apply the offer on eligible purchases you will need to implement 2 API calls in your POS system.

The first one is a call that queries the available offers based on cart attributes. A POST request should be sent to the /offers endpoint of Antavo’s Offers API that includes all the cart details in the payload. The API will evaluate the cart and provide the list of the offers applicable to the current purchase.
In case the offer matches the configured criteria, the above-configured offer will appear on the list with all the information regarding the discount the offer provides. Based on this information, you need to take care of the offer redemption, the actual modification of the amount that the customer will pay for the purchase.

To register the offer redemption in Antavo, send the checkout event with checkout item(s) under the "items" array field of the main checkout event to the /events endpoint of the Events API. Make sure you include the ID of the redeemed offer in the offers attribute of the checkout event. This attribute is a list type of field so that you can apply multiple offers to one purchase. In case the offer attribute of the checkout event is populated with a value, an offer_redeem event will automatically be registered in the customer’s events history with the ID of the offer.
This step is skippable, but we recommend not to. This way you can keep the customer's purchase history consistent and transparent on the loyalty profile page in the Antavo Backoffice. Furthermore, this gives you a safety check as Antavo will return an error message in case your POS would apply an offer, but it should not be based on the configured redemption restrictions.


4. Test your offer

After your items have been imported successfully, your offer is configured and the API calls are implemented, we suggest testing the offer redemption process before activating it for customers.

In case you have scheduled the offer to start later, you might want to modify the related configuration fields to make sure the offer is active at the time of the test, but please remember to reconfigure them to the date of the time period while the offer should be applicable to actual customer purchases.

When you send the API call with the cart of a test customer that should be eligible for the offer, please check if the offer is included in the response with all the necessary details.

Your POS should be able to use these details to properly calculate the basket value with the 20% discount applied on the item(s) and this value should be added to the subtotal attribute of the checkout item event (parented by the checkout event).

If the offer attribute is properly populated with the offer ID, it should appear in the Checkout event registered in the test customer’s Events history together with an Offer redeem event with the ID of the offer.

 

© Copyright 2022 Antavo Ltd.