---
title: "Set up an in-store summer sale offer"
slug: "set-up-an-in-store-summer-sale-offer"
description: "The user manual provides comprehensive guidance on using the Antavo Management UI for managing loyalty programs."
updated: 2024-07-08T21:00:10Z
published: 2024-07-08T21:00:10Z
canonical: "docs.antavo.com/set-up-an-in-store-summer-sale-offer"
---

> ## Documentation Index
> Fetch the complete documentation index at: https://docs.antavo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Set up an in-store summer sale offer

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.

![](https://cdn.document360.io/08a474ca-8fb4-4c3c-9cd8-665242086cd3/Images/Documentation/Tutorials (5).jpg)

---

## 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](/v1/docs/product-catalog).

**Manually** assigning values to each item is an option, but for larger product lists, consider using the****[**Imports module**](/v1/docs/imports) 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](/v1/docs/imports). Ensure that the CSV file includes the product_type column, and assign the selected value to all the items accordingly.

![](https://cdn.document360.io/08a474ca-8fb4-4c3c-9cd8-665242086cd3/Images/Documentation/product_model.PNG)

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](/v1/docs/offers) 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.

![](https://cdn.document360.io/08a474ca-8fb4-4c3c-9cd8-665242086cd3/Images/Documentation/offer.PNG)

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](/v1/docs/stores).

---

## 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](https://developers.antavo.com/reference/post_offers) 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 `offers`attribute of the `checkout` event. This attribute is a list type, allowing multiple offers to be applied to one purchase. If the `offers`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.

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 `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`with the ID of the offer.

![](https://cdn.document360.io/08a474ca-8fb4-4c3c-9cd8-665242086cd3/Images/Documentation/events.PNG)
