# Rules

> Rules allow you to define the logic of your campaign. They are evaluated as long as the campaign is active. You can create and manage one or more rules in your campaign's Rule Builder.

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

To open the Rule Builder, open a campaign and select <RuleBuilder className="icon"/> **Rule Builder**.

## Rule types

Talon.One offers two types of rules:

- [Promotion rules](#promotion-rules): Promotion rules allow you to create campaigns
  that offer discounts and rewards to customers.
- [Strikethrough rules](#strikethrough-rules): Strikethrough rules allow you to get the
  strikethrough pricing and label information for individual items.

### Promotion rules

Promotion rules help you build complex campaigns that help boost customer
interaction and increase sales.

Create the campaign logic by creating one or more [conditions](/docs/product/rules/conditions/overview.md)
that, when met, trigger defined [effects](/docs/product/rules/effects/overview.md).
Campaigns with promotion rules rely on [events](/docs/dev/concepts/entities/events.md) and data related to
[customer sessions](/docs/product/applications/display-customer-sessions.md#customer-session-overview)
and [customer profiles](/docs/product/applications/display-customer-profiles.md).

You can also [create advanced promotion rules](/docs/product/rules/create-and-manage-rules.md#create-a-promotion-rule)
with cart item filters, bundles, attributes, loyalty programs, additional costs,
and custom effects.

<PromotionRule className="figma" width="35%" alt="Promotion rule"/>

:::note
To learn more about how campaigns with promotion rules are evaluated, see
[evaluating campaigns with promotion rules](/docs/product/applications/evaluation-order-for-rules-and-filters.md#evaluate-campaigns-with-promotion-rules).
:::

### Strikethrough rules

Strikethrough rules enable you to use [strikethrough pricing](/docs/product/rules/strikethrough-pricing.md)
in your campaigns.

Strikethrough rules do not have any conditions. They only have [effects](/docs/product/rules/effects/available-strikethrough-effects.md).
The effects are triggered when specific [events][stpnotif]
occur in the campaign or in the [cart item catalog](/docs/product/account/dev-tools/manage-cart-item-catalogs.md)
connected to the corresponding Application.

Use [strikethrough pricing notifications][stpnotif] alongside strikethrough rules to
obtain the discounted price for individual items when running discounts and sales. In
addition, you can use [custom attributes](/docs/product/account/dev-tools/manage-attributes.md#create-a-custom-attribute)
in your strikethrough rules to build advanced campaigns and send extra information about
each cart item.

<StrikethroughRule className="figma" width="35%" alt="Strikethrough rule"/>

:::note
To learn more about how campaigns with strikethrough rules are evaluated, see [evaluating campaigns with strikethrough rules](/docs/product/applications/evaluation-order-for-rules-and-filters.md#evaluate-campaigns-with-strikethrough-rules).
:::

## Attribute selector

The Attribute Selector is a user interface element of the Rule Builder
that allows you to list and select the following items:

- <Attribute name="Built in" type="builtin" />
  and <Attribute name="Custom" type="custom" /> attributes,
  which you can [manage](/docs/product/account/dev-tools/manage-attributes.md).
- <Attribute name="Filter" type="filter" /> attributes, created automatically
  when you create a [cart item filter](/docs/product/rules/cart-item-filters/overview.md),
  [value map](/docs/product/rules/manage-value-map.md),
  or [bundle definition](/docs/product/rules/create-and-manage-bundles.md).
- <Attribute name="Placeholder" type="placeholder" /> attributes, displayed only when you
  manage [templates](/docs/product/campaigns/templates/overview.md).

To open the Attribute Selector, click an attribute or a button that allows you
to select an attribute, such as <Add className="icon"/> **Add an attribute**.

:::note
- Attributes related to **Awarded giveaway in session** and **Loyalty program** are
  available only if the corresponding
  [campaign features](/docs/product/campaigns/settings/manage-campaign-features.md)
  (giveaways and loyalty) are enabled.
- Attributes related to **Subledgers** are available only if the loyalty feature is enabled and
  at least one subledger exists.
- With some effects, such as [Add free item](/docs/product/rules/effects/use-effects.md#add-a-free-item),
  you can select an attribute from the Attribute Selector
  and also type free text before and after it.
:::

:::tip
- Hover over an attribute to see a description and sample values for it, where available.
- Sort the attributes using <Sort className="icon"/>,
  and find more filtering options under <Filter className="icon" /> **Filter**.
:::

## Filters

[Filters](/docs/product/rules/cart-item-filters/overview.md) allow you to sort cart
items in different ways, create item bundles and operate on the values of item lists. You can
then use their outcome in your conditions and effects to create different types of discounts,
product bundles, and selective rewards.

You can filter on characteristics of the cart items such as quantity, price, size or any other
relevant information.

## Related pages

- [Cart item filters](/docs/product/rules/cart-item-filters/overview.md)
- [Application cart item filters](/docs/product/applications/manage-application-cart-item-filters.md)
- Available [conditions](/docs/product/rules/conditions/overview.md) and
  [effects](/docs/product/rules/effects/overview.md)
- [Export triggered effects](/docs/product/rules/effects/export-triggered-effects.md)
- [Evaluation order for rules and cart item filters](/docs/product/applications/evaluation-order-for-rules-and-filters.md)

[stpnotif]: /docs/product/applications/application-notifications/overview.md#strikethrough-pricing-updates
