# Apply code to get gift

With this feature, you can let customers unlock gifts by entering a **discount code directly in the cart page or cart drawer**. When the code is applied and the campaign conditions are met, the gift is **automatically added to the cart**.

> Note: This option is currently supported only for stores using the **Horizon theme**. If your theme does not support discount code entry in the cart drawer, the option will be disabled and please contact us for integration

### Applicable Campaign Type

* Buy X Get Y

### How to Set It Up

#### Step 1. Create a Campaign

1. From your app dashboard, click **Create Campaign**.
2. Choose **Buy X Get Y** as the campaign type.

#### Step 2. Configure Gift Code

1. In the display settings, scroll to **Gift selection method**.
2. Select **Apply code to get gift**.
3. You’ll see a **gift trigger code** (default is `AOVAI_XXXXXX`).
4. Edit this code if you want to customize it (e.g., change to `SPRINGSALE`).

#### Step 3. Save Campaign

1. Click **Save campaign**.
2. You’ll see a success message:

   > “Campaign saved successfully. Gift code is now active.”
3. The system will display instructions showing your active gift code and how to use it.

<figure><img src="https://1289686769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMo81Ak7Ig0Z6bLRmWpSA%2Fuploads%2FZRlfgjoAQWpnNJAo6rE5%2Fimage.png?alt=media&#x26;token=d21e0131-b5e5-41c7-ab28-e5e0a3e88417" alt=""><figcaption></figcaption></figure>

***

### Customer Experience

1. Customer adds qualifying products to their cart.
2. In the cart drawer/cart page, the customer enters your gift code (e.g., `SPRINGSALE`) in the discount code field.
3. If the code is valid and the conditions are met, the gift will **automatically appear in the cart**.

***

### Theme Compatibility

* **Horizon theme**: Supported. Customers can enter codes directly in the cart drawer.
* **Other themes**: Not supported.
  * The option will be disabled in settings.
  * You will see a tooltip:

    > “This option is not supported on your current theme. Please chat with our support team to connect with technical expert team.”

***

### Best Practices

* Use simple and memorable codes (e.g., `FREESHIRT`, `WINTERGIFT`).
* Share the code clearly in your marketing campaigns so customers know how to unlock their gift.
* Test the feature on your store before going live to make sure the gift is applied correctly.

***
