# Available conditions

> Talon.One offers the following conditions. Use them to create rules that match your specific use case.

> For the complete documentation index, see [llms.txt](https://docs.talon.one/llms.txt).

## Attribute conditions

| Condition name                           | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| ---------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Check attribute value                    | Checks the value of an attribute. For example, the total cart value is greater than $200.                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| Check if attribute exists                | Checks if a given custom attribute, such as <Attribute type="custom" name="Artist Id" />, is set.                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| <nobr>Check attribute anniversary</nobr> | Checks if the anniversary of a time attribute is within a defined period before and after the session. <Admonition type="note"> The condition checks the time attribute without taking the year into account. For example, if <Attribute type="custom" name="Birth date (Customer Profile)" /> is <code>1997-10-07</code>, the condition only checks for October 7th each year.If the value is February 29th in a leap year, the condition checks for March 1st for all non-leap years. </Admonition>  |

:::note
For attributes of type `string`, the following applies:

- The **matches RegExpr** operator allows you to match against a regular expression. The Rule Builder supports regular expressions according to the [RE2 specification](https://github.com/google/re2/wiki/Syntax).
- The **starts with**, **ends with**, and **contains** operators allow you to match against another string. Note that if you provide an empty string, the condition always passes:
  - `foo` starts and ends with an empty string.
  - `foo` contains an empty string at every position.
:::

## Audience conditions

| Condition name               | Description                                                              |
| ---------------------------- | ------------------------------------------------------------------------ |
| Is member of an audience     | Checks if the current customer is a member of the selected audience.     |
| Is not member of an audience | Checks if the current customer is not a member of the selected audience. |
| Has joined an audience       | Checks if the current customer has joined the selected audience.         |
| Has left an audience         | Checks if the current customer has left the selected audience.           |

Learn more about [audiences](/docs/product/audiences/overview).

:::important
The **Has joined an audience** and **Has left an audience** conditions only trigger when you send a
request to the [Update customer profile](/integration-api#tag/Customer-profiles/operation/updateCustomerProfileV2) endpoint.

They do **not** trigger when you do the following:

- Send a request to the [Update customer session](/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2) endpoint.
- Upload a CSV file with a list of audience members.
- Update audience information via [the API](/integration-api#tag/Audiences).
:::

## Coupon conditions

:::note
The feature must be [enabled in the campaign](/docs/product/campaigns/settings/manage-campaign-features).
:::

| Condition name                            | Description                                                                                                                                                                                                                                                                             |
| ----------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Coupon can be created                     | Checks if the budget still allows coupon creation for the current user. <Admonition type="note"> This condition is to be used in rules without a Create coupon code effect. </Admonition>  |
| Coupon code is valid                      | Checks if the coupon code is valid. If it is, the coupon code is automatically redeemed when the rule is triggered.                                                                                                                                                                     |
| Coupon code is valid (without redemption) | Checks if the coupon code is valid. If it is and the rule is triggered, the coupon code is not redeemed.                                                                                                                                                                                |

## Event conditions

| Condition name                                | Description                                                            |
| --------------------------------------------- | ---------------------------------------------------------------------- |
| Check for event types and custom event values | Checks the value of a custom event or whether a built-in event exists. |

Learn more about the event [entity](/docs/dev/concepts/entities/events.md).

## Loyalty conditions

:::note
The feature must be [enabled in the campaign](/docs/product/campaigns/settings/manage-campaign-features).
:::

| Condition name             | Description                                                                                              |
| -------------------------- | -------------------------------------------------------------------------------------------------------- |
| Check customer's tier      | Checks if the customer's tier is the selected tier.                                                      |
| Loyalty card is valid      | Checks if the [loyalty card](/docs/product/loyalty-programs/card-based/card-based-overview.md) is valid. |
| Loyalty card is registered | Checks if the loyalty card is registered by a customer.                                                  |

## Group conditions

| Condition name               | Description                                                    |
| ---------------------------- | -------------------------------------------------------------- |
| Create a group of conditions | Groups multiple conditions to create advanced condition logic. |

## Referral conditions

:::note
The feature must be [enabled in the campaign](/docs/product/campaigns/settings/manage-campaign-features).
:::

| Condition name                              | Description                                                                                                             |
| ------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| Referral code is valid                      | Checks if the referral code is valid. If it is, the referral code is automatically redeemed when the rule is triggered. |
| Referral code is valid (without redemption) | Checks if the referral code is valid. If it is and the rule is triggered, the referral code is not redeemed.            |

## Achievement conditions

:::note
The feature must be [enabled in the campaign](/docs/product/campaigns/settings/manage-campaign-features).
:::

| Condition name                            | Description                                                                                                                                                                                                                                               |
| ----------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Has completed an achievement              | Checks if the current customer has completed an achievement in the current session.                                                                                                                                                                       |
| Check customer progress in an achievement | Checks the current customer's progress status in an achievement.  The progress status can be one of the following: Not startedIn progressCompletedExpired (not shown for recurring achievements) |

Learn more about the achievement [entity](/docs/dev/concepts/entities/achievements).

## Budget conditions

| Condition name                         | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| -------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Check if budget limit has been reached | Checks if a specific budget has reached its limit.  This condition does not check the [referral redemptions](/docs/product/campaigns/settings/manage-campaign-budgets.md#referral-limits) or [coupon redemptions](/docs/product/campaigns/settings/manage-campaign-budgets.md#coupon-limits) limits. <Admonition type="note"> We recommend you enable partial discounts in your Application before using the condition. </Admonition>  |

## Related pages

- [Manage campaign features](/docs/product/campaigns/settings/manage-campaign-features.md)
- [Create a basic discount](/docs/product/tutorials/coupons/basic-discount.md)
