---
title: "Create a trigger"
slug: "create-a-trigger"
abstract: "Overview of how to create a trigger and the settings available."
---
# Create a trigger

You can create [a new trigger](https://doc.sitecore.com/ch/en/developers/cloud-dev/triggers.html "Triggers") and then add conditions and actions using the settings grouped on three tabs (**General**, **Conditions**, and **Actions**) on the **Triggers** page.

To create a trigger:

1. On the menu bar, click **Manage** :mdiCogOutline:, and then click **Triggers**.
2. In the upper-right corner of the application window, click **New trigger**.
3. On the **General** tab, fill in the following fields:

    | Column name | Description |
    | --- | --- |
    | **Name** | A name for your trigger. |
    | **Description** | A description of what the trigger does. |
    | **Objective** | The event to which the trigger reacts. Content Hub supports three types of trigger events:<br><br><ul><li>*Entity creation* - an entity is created.</li><li>*Entity modification* - an entity is modified.</li><li>*Entity deletion* - an entity is deleted.</li></ul> |
    | **Execution type** | The method to execute the trigger's actions. Content Hub supports two execution types:<br><br><ul><li>*In Background* - trigger actions execute using an asynchronous background job. With this execution type, trigger actions can only execute during the post phase (that is, after the trigger's event takes place).</li><li>*In Process* - trigger actions execute in real time in a synchronous way. With this execution type, trigger actions can execute during any of these five phases:</li></ul> |

4. To add trigger conditions, on the **Conditions** tab, under the name of the definition, click :mdiPlus: **Condition**.
5. If you don't see the entity definition you want to evaluate, click **Add definition** and, in the drop-down list, select the entity definition. Alternatively, if you want to add a condition that observes all available entity definitions, from the drop-down list, click **Any definition**.
6. For the new entry, use the fields provided to choose the property you want to evaluate and the conditional clauses you want to check for. The available fields change depending on the selected entity definition, property, and clause. Click :mdiPlus: **Condition** to add more conditions as needed.

    For certain properties and operations (for example, the *Contains* operation), you can specify in the condition operation that case is important by selecting **Match case**.

7. If an entity definition has more than one condition:
    - You can change the logical operator on the left of those conditions to either **AND** (all conditions must be true) or **OR** (at least one condition must be true). The default is **AND** for all entity definitions.
    - You can click :mdiPlus: **Make group** to convert a single condition into a group containing one or more additional conditions. Each group has its own logical operator used to evaluate its conditions, allowing you to create advanced nesting logic. You can also create groups within groups.

    > [!important]
    > If you create a trigger with the objective **Entity deleted** set to execute **In background**, it will not execute the associated actions. This happens because the trigger is invoked after the entity is deleted, so that the necessary data is unavailable for condition evaluation.

8. To add trigger actions, on the **Actions** tab, in the desired phase (for example, **Post actions**), click **Add action** and, in the **Search** box, enter the name of the desired action and then select it.
9. To delete or edit the actions available for a trigger, click **Manage actions**.
10. When you have finished adding the actions and conditions you want, to activate the new trigger, click **Save**.

When you have configured a valid set of entity definitions and conditions, to view a JSON representation of the full conditional logic for your trigger, on the **Conditions** tab, click **Advanced mode**. You can then make any required changes to the logic by modifying the JSON.