---
title: "Creating Entity Events"
slug: "hooking-entity-events-for-custom-handling-of-entities"
tags: ["Entity Events"]
updated: 2025-06-25T16:22:27Z
published: 2025-06-25T16:22:27Z
---

> ## Documentation Index
> Fetch the complete documentation index at: https://documentation.decisions.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Creating Entity Events

## Overview

Entity Events run a Flow when certain events occur to an Entity, such as the saving of an Entity. For example, an Entity event could be to insert an audit record into a database or directory when an Entity is deleted that records details such as who deleted the Entity. Entity Events require a Data Structure with a [Configuration Folder](/v9/docs/configuration-folder).

---

## Event Types

| Type of Events | Function |
| --- | --- |
| **After Delete Flow** | A Flow runs after a Delete is made to the Entity to save the changes. |
| **After Save Flow** | A Flow runs to save the changes after a flow is changed. |
| **Before Delete Flow** | A Flow runs before a Delete is made to an Entity to save the data. |
| **Before Save Flow** | A Flow runs before a save is made to an Entity to save the data. |

Entity Events will run every time an Entity of the type is saved. Please take care to not use any save or assigned steps that could cause this Entity to be saved in a cycle. 

---

## Example

1. Using an existing [Data Structure](/v9/docs/differences-between-data-structures), navigate to its Configuration Folder. Click ENTITY EVENTS and select **After Save Flow**.  
![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/2024-07-02_08h49_18.png)
2. From the **Toolbox**panel, attach a **Show Popup** step to the **Start**and **End**steps. On the **Properties**panel, enter **Constant**values for the **Subject**and **Message**fields. Click **Save**and close the Flow Designer.  
![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/2025-06-25_12h18_12.png)
3. In the Designer Project, click CREATE FLOW to [create a new Flow](/v9/docs/create-flows).
4. In the Toolbox panel, navigate to **USER DEFINED TYPES > ENTITIES > [NAME OF ENTITY STRUCTURE]**. Select the **Create**step and attach it to the Start and End steps.  
![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/2025-06-25_12h20_42.png)
5. On the Properties panel, click **Unknown**and select Constant for the **Folder Id** field. Click PICK and select a folder to store the values. Set the **Items to Create** to **Constant**mapping and set the fields for the entity. Click Save to save changes to the Flow.  
  
![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/2025-06-25_12h21_30.png)

### Debug

1. On the top action bar, click **Debug**.
2. Click START DEBUGGING.
3. After the debugger runs, the Entity Event Flow will also run and display the popup.

---

For further information on Data Structures, visit the [Decisions Forum](https://community.decisions.com/categories/Datastructures).
