Set up an in-store summer sale offer
    • 4 Minutes to read

      Set up an in-store summer sale offer


        Article summary

        This tutorial walks you through the process of using the Imports and Offers modules alongside Antavo’s API endpoints to establish an in-store offer, providing a 20% discount on summer sale items above a specified purchase value.


        1. Import sale product items

        When planning the campaign, begin with selecting the items you wish to include. Once you have the list, we recommend using the built-in product_type attribute of the product entity and assigning the same value to all selected items in the Product catalog module.

        Manually assigning values to each item is an option, but for larger product lists, consider using the Imports module for bulk uploads. This feature allows you to efficiently add new items with the desired product type value (e.g. summer sale item) or update the product type attribute of existing products.

        To initiate a new import, navigate to the Import module and select the Products model. Upload a CSV file containing your product data, following the instructions outlined in the Imports module manual. Ensure that the CSV file includes the product_type column, and assign the selected value to all the items accordingly.

        During the import process, existing items will be automatically recognized. Only new values provided in the import (such as the product type value) will be updated, eliminating concerns about duplicate entries.


        2. Create the offer through the Offers module

        After importing the products to include in the summer sale campaign, proceed to configure the mechanics that will govern the assignment of the offer to eligible purchases.

        Refer to the Offers module user manual for comprehensive instructions on configuring an offer.

        When specifying the offer type in the configuration interface, ensure to select the Item option from the dropdown list. This selection enables you to later define which carts are eligible for the offer and which cart items the offer should apply to.

        In the Eligible items section, select the Any match option. This setting ensures that not all the items in the cart need to be summer sale items for the offer to be available for purchase. Next, select the Category option in the Item dropdown field and input the product type value defined in the imported CSV.

        Under the Cart section, define the minimum basket value in the Min total field. For a 20% discount, select the Percentage discount option in the Type field under the Discount section, and specify the discount value in the Value field. Set the Target to All items to ensure the offer applies to all items in the summer sale category.

        If desired, you can restrict the offer to a specific store(s). Use the Store field of the configuration interface for this purpose. Choose from the dropdown menu the stores previously added in the Store management module.


        3. Implement API calls

        To apply the offer on eligible purchases, you’ll need to execute 2 API calls in your POS system.

        Query available offers

        Initiate a POST request to the /offers endpoint of Antavo’s Offers API, including all cart details in the payload. The API will evaluate the cart and return a list of the applicable offers to the current purchase. If the offer matches the configured criteria, it will be included in the list along with information regarding the discount it provides. Based on this information, manage the offer redemption, modifying the amount that the customer will pay for the purchase accordingly.

        Register offer redemption

        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 offersattribute of the checkout event. This attribute is a list type, allowing multiple offers to be applied to one purchase. If the offersattribute 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.

        Though registering offer redemption is optional, you maintain a consistent and transparent customer purchase history on the loyalty profile page in the Antavo Management UI. Additionally, this serves as a safety check; Antavo will return an error message if your POS attempts to apply an offer that shouldn’t be based on the configured redemption restrictions.


        4. Test your offer

        After successfully importing items, configuring the offer, and implementing API calls, it’s essential to test the offer redemption process before making it available to customers.

        If you’ve scheduled the offer to start later, ensure the offer during testing. Adjust related configuration fields accordingly, but remember to revert them to their original settings for the actual customer purchases

        When you send the API call with a test customer’s cart to verify offer inclusion in the response, check if all the necessary details, including the discount amount, are present.

        Your POS should be able to properly calculate the basket value with the 20% discount applied to the eligible item(s) and the discounted value should be added to the subtotalattribute of the checkout itemevent (parented by the checkoutevent).

        If the offerattribute is properly populated with the offer ID, it should appear in the checkoutevent registered in the test customer’s Events history together with an offer_redeemwith the ID of the offer.