# Generate Event node

This action allows users to generate an event with defined parameters on a profile card. 



## Node configuration
---

1. Click the pencil icon on the node.
2. To impose a limit on the action, switch the **Action limit** toggle. Enter a number and from the dropdown list, select the time unit. You can define how many times this action can be executed for the whole automation process (**workflow**), or you can define how many times per second/minute/hour/day/week/month can be executed.
3. In the **Event name** field, enter the name of the event. Keep the name pattern used for the default event names in Synerise (such as page.visit, transaction.charge, and so on). This name functions as a key name of the event.
4. In the **Body** field, enter the parameters of the event in JSON format. 
5. Confirm by clicking **Apply**. 

## Example of use
---

<figure>
 <img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/docs/automation/_gfx/generate-event-workflow.png" alt="Example of Generate Event action" class="full">
<figcaption>Use of the Generate Event action</figcaption>
</figure>

1. Start with the **Profile Event** node. In the settings of the node, set loyalty point deactivation event (this event doesn't belong to the default Synerise events).
2. Add the **Delay** node to postpone the passage from the trigger to the next step. This way you give some time to your customers to perform necessary actions in the context of this workflow. 
3. Add the **Profile Filter**. In the settings of the node define the conditions that must be met by the customers in order to continue the workflow.
4. Those customers who meet conditions in the **Profile Filter** node will be subject to the **Generate Event** action. 
5. Add **Generate Event**.
    1. In the settings of the action define the event. This is a custom event that deducts the points. This event is available on the activity list on a profile card, when a customer is subject of the action. 
    2. In the body of the event (in JSON format), use the ID of the [expression](/docs/analytics/expressions) that contains a formula which deducts the loyalty points. For example:
        ```
        {
            "key1": "value1",
            "balance": "{% expression %} 824wtefq-1235tfs-12wdvny5s634-2578284 {% endexpression %}"
        }
        ```
    3. Set the action execution limit at `1` to avoid unwanted repetitions of the action. 
5. When the points are deducted, the customer receives a mobile push notification about the number of deactivated points.
6. The workflow is completed with the **End** node.
