Verint Community exposes a rich set of events throughout the In-process API. These events are exposed to Plugins and Automations to build business logic.
Available Events
Events are specific to each entity type within the Verint Community platform. In general, events are named related to the type of change and the time at which it occurs:
- BeforeCreate. This type of event occurs before a new item is created in the API. While the final identifier of newly created items may not be available during the BeforeCreate event, the BeforeCreate event provides editable properties in event arguments to support adjusting the data associated with the entity before it is created.
- AfterCreate. This type of event occurs after a new item is created in the API. The event arguments are read-only since the data associated with the item has already been committed. Identifiers for newly created items are available in AfterCreate.
- BeforeUpdate. Similar to BeforeCreate, this type of event occurs before an existing item is edited int he API. This event can be used to modify data associated with the item being updated before its changes are committed.
- AfterUpdate. This type of event occurs after an edit of an item is committed.
- BeforeDelete. This type of event occurs before an item is deleted.
- AfterDelete. This type of event occurs after an item has been deleted.
In addition to these standard event types, there are special event types which can be used to interact with specific areas of the API. The full list of events exposed to automations can be reviewed in API Documentation.
Triggering Automations using Events
Automations can be triggered to execute logic when an API event occurs. To enable an automation to be triggered by one or more events,
- On the automation's Overview, locate Triggers, and check API Event Occurs.
- Within the API Events field, you can use type-ahead search to locate one or more events to handle. Events are named using the format ENTITY_TYPE.EVENT_NAME. To handle the AfterCreate event on Media, the full event name is "Media.AfterCreate"
- As events are selected, they are listed below the API Events field and links to view documentation or remove the event from the automation are provided.
Using Event Triggers in Automation Implementations
When any automation trigger occurs, including API events, the automation's implementation script is executed. Details about the trigger are provided to the implementation script through the context_v2_automationTrigger
API. This API defines a few members that make interacting with events possible:
- Entity. For API event triggers, Entity identifies the entity type of the API Event. For the "Media.AfterCreate" API event, Entity would be set to "Media"
- Event. For API event triggers, Event identifies the event name. For the "Media.AfterCreate" API event, Event would be set to "AfterCreate"
- Arguments. Arguments provides access to the arguments provided by the event that triggered the automation and is specific to the entity and event that occurred. Review the documentation link on the API Events list on the automations Overview to get details about the arguments available with specific events. Generally, "Before" events expose editable arguments and "After" events expose read-only arguments.