# Create a catalog trigger

> Create a catalog trigger under Data Platform › Catalog Triggers that pairs a product change such as Became in stock with an audience action such as Viewed product, so a triggered workflow can message the right people.

A **catalog trigger** turns a change in your product catalog into an event for the people who care about that product. This guide creates a trigger for products that come back in stock, aimed at the profiles that viewed them. For what the rules mean, when Releva checks them and how a workflow uses the result, read [How catalog triggers work](https://releva.ai/documentation/learn/catalog-triggers/how-catalog-triggers-work/).

## Before you start

* Your catalog is in Releva and gets updated when prices or stock change. A trigger only sees changes that reach Releva; see [How your catalog gets into Releva](https://releva.ai/documentation/learn/catalog/how-your-catalog-gets-into-releva/).
* Your shop tracks product events such as product views, cart additions or wishlist additions. The audience is built from them.
* Your plan includes catalog triggers. If **New catalog Trigger** shows a lock, ask your account owner to unlock it.
* You know which change and which audience you want: for example products that **Became in stock**, for people who **Viewed product**.

## Steps

1. Go to **Data Platform › Catalog Triggers**.

   ![Step 1](https://releva.ai/documentation/_astro/step-1.DTkn_2W8_Zt97xl.webp)

2. Select **New catalog Trigger**.

   ![Step 2](https://releva.ai/documentation/_astro/step-2.COmxcb39_1NcmoV.webp)

3. In **Name**, replace “New catalog trigger” with a name you will recognise when you pick the trigger in a workflow.

   The name must be unique within the shop. It also becomes the name of the event the trigger produces: **Catalog trigger - \<name>**.

   ![Step 3](https://releva.ai/documentation/_astro/step-3.DFmK4rMS_cJEJc.webp)

4. Under **Catalog Rules**, select **Add Rule**.

   ![Step 4](https://releva.ai/documentation/_astro/step-4.BFFc-0PW_1VRYHq.webp)

5. Select the product change that starts the trigger, for example **Became in stock**.

   The list has five rules: **Price increase**, **Price decrease**, **Became in stock**, **Became out of stock** and **Product attributes**. Catalog rules have no **Mode** switch; you cannot invert them. If you add several, a product must match all of them.

   ![Step 5](https://releva.ai/documentation/_astro/step-5.D0G5Da_T_GYKHx.webp)

6. Under **Audience Rules**, select **Add Rule**.

   ![Step 6](https://releva.ai/documentation/_astro/step-6.kKcbCX6M_Z2wopKx.webp)

7. Search for what the profile did with the product, for example **Viewed product**, and select it.

   The list is the same as for segments: tracked actions such as **Viewed product**, **Added to cart**, **Added to wishlist** and **Purchased**, plus **Profile Attributes**, **Belongs to Segment** and one **Performed action: …** rule per custom event.

   ![Step 7](https://releva.ai/documentation/_astro/step-7.CU2DRX_Y_cPm0d.webp)

8. Leave **Mode** on **Viewed product**. A trigger needs at least one audience rule that is an action and is not set to **Not**.

   This first action rule is the one Releva matches against the changed products: a profile qualifies only for the products it viewed. Add more audience rules to narrow the audience; **Add Filters** on a rule limits it further, for example to the last few days.

   ![Step 8](https://releva.ai/documentation/_astro/step-8.Cku0LE26_1TDVGF.webp)

9. Select **Save**.

   **Save** stays disabled until the trigger has a name, at least one catalog rule and at least one audience rule.

   ![Step 9](https://releva.ai/documentation/_astro/step-9.Chp-xAFS_ZArsVo.webp)

10. You are back on **Catalog Triggers** and the new trigger has its own card with its rules.

    ![Step 10](https://releva.ai/documentation/_astro/step-10.CqAGMuOE_1SnuGe.webp)

## Check it worked

* The new trigger is the first card on the **Catalog Triggers** list, with **Rules: Became in stock** and **Viewed product** on the right and **Events dispatched** at **0**.
* In **Workflows › Triggered**, the **Event** picker of a workflow now lists **Catalog trigger - \<your name>**. The trigger does nothing until a running triggered workflow picks that event; see [How catalog triggers work](https://releva.ai/documentation/learn/catalog-triggers/how-catalog-triggers-work/#a-trigger-only-runs-for-a-running-workflow).

## Troubleshooting

**Save is disabled.** The name is empty, or one of the two rule lists is empty. A trigger needs both a catalog rule and an audience rule.

**Save fails with “Name must be unique!”.** Another catalog trigger in this shop already has that name. Change the name and save again.

**Save fails with “An internal error occurred.”** Every audience rule is either set to **Not …** or is not an action (for example only **Profile Attributes**). Releva needs at least one action rule in its normal mode to know which products each profile interacted with. Add one, for example **Viewed product**, and save again.

**I cannot set a catalog rule to Not.** Catalog rules cannot be inverted. Pick the opposite change instead, for example **Became out of stock** rather than “not in stock”.

**Events dispatched stays at 0.** The trigger is checked three times a day and only when a running triggered workflow uses its event. Until then nothing is counted.

## Next steps

* [Change a catalog trigger](https://releva.ai/documentation/guides/catalog-triggers/change-a-catalog-trigger/): Narrow a trigger’s rule, copy it or delete it.
* [How catalog triggers work](https://releva.ai/documentation/learn/catalog-triggers/how-catalog-triggers-work/): Learn when Releva checks your rules and which event each trigger produces.
* [How workflows work](https://releva.ai/documentation/learn/workflows/how-workflows-work/): Learn how a triggered workflow uses the trigger’s event to send messages.
* [How segments work](https://releva.ai/documentation/learn/segments/how-segments-work/): Learn how to build the audience a trigger targets.