> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.skailama.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# How to use cart attributes to apply discounts (custom discount)

${youtube}[How to use cart attributes to setup custom discounts](m_tKEWexsMM)
This guide explains how to trigger a discount based on specific "cart attributes"—hidden data fields that are added to the cart by other apps or theme customizations (e.g., a gift message field, or an identifier from a specific app).

### 1. Identify the Cart Attribute Key and Value

Before creating the discount, you need to know the exact `key` and `value` of the attribute you want to target. This information typically comes from the app or customization that adds the attribute to the cart. For example, an attribute `key` might be `'gift message'` or `'internal GL Pro app'` with a `value` of `true`.

### 2. Set Up the Discount Rule

1. In the Kite app, start a new promotion using the **Custom Discount Builder**.
2. Navigate to the **Eligibility Rules** section of the campaign setup.
3. Under the "Cart rules" category, select the **Cart Attributes** option.
4. You will see fields to define the attribute:
    * In the first field, enter the attribute **key** (e.g., `internal GL Pro app`).
    * Choose the operator (e.g., **is**).
    * In the second field, enter the attribute **value** you want to match (e.g., `true`).

### 3. Configure and Save the Discount

1. Set up the rest of your promotion, defining which products the discount applies to and the discount amount or percentage.
2. Click **Save**.
Now, the discount will only apply to carts that contain the exact attribute key and value you specified.

### Excluding Carts with Specific Attributes

You can also use this rule to *prevent* a discount from applying. To do this, simply choose the **"is not"** operator when setting up the rule in Step 2. The discount will then be blocked for any cart containing that specific attribute.