Introduction
This article will show how to create a custom audit event with a custom name and dynamic/static attributes inside a flow. The audit event can later be shipped to an external source, e.g., using the DataDog connector.
The Action
Create a new action by selecting theGenerate Audit Event
under the Actions sections inside the flow builder: ![add action for audit event.](/static/image1-20564def5ebee80f76acdb98883945e6.png)
Fields overview
![custom event action fields overview](/static/image2-08fb1cafbfb663886bdd9b49f780670c.png)
- Step Name: The name that will be displayed inside the flow builder UI. Name it as informative as you can.
- Action: The machine name of the action will be the title for the whole event.
- Type: The "Level" of the audit event - information / Warning / Error.
- Data: A key-value pair of the data you would like to enter
- Keys will hold the field's name that will hold the data.
- Type (inside Data): The type of the field - choose dynamic for a field you would like to populate from the flow context.
- Value: The value for that field. Upon choosing dynamic, auto-completed can be used.
The Audit Page
When an event has been successfully created, you can also observe it here in the audit page:
![audit page custom event](/static/image3-ea291663e0ffc0089f32ae9cad9d7b70.png)
Shipping Logs
Connectors inside Descope can take those "User Defined Events" to your external source. Here is an example of how it is shown with DataDog.
![datadog custom audit events overview.](/static/image4-09870222cc64eff2d88ba9c06e516865.png)