Action: Event log September 08, 2022 21:46 Updated Index: What is an event? Anatomy of events How to create an event using the Event Log action Logging and analyzing events programmatically The Event Log action allows important events that occurred within a bot to be logged for future analysis. It is through this action that Builder is able to generate information that will later be used by the Blip Analysis module. In practice, only events generated by this action can be used when creating reports that use customized events as a source. What is an event? An event represents something that happened inside the bot regardless of its origin, that is, the events can represent user interactions or even activities performed by the bot. Some examples of events: Number of messages containing the word help Number of HTTP requests performed by the bot Number of users who interacted with the bot on a given channel Number of images received by the bot How many times a particular bot functionality has been requested Number of times a given intention was recognized Anatomy of events Every event has the following components: Category (required) - Name for grouping the events Action (required) - Name for an event type grouped by a category Label (optional) - Additional description for the generated event Value (optional) - Number that carries an additional value for information about an event Extras (optional - accessible only through the Blip API) - Additional important information for the event. Each extra piece of information is made up of a key and a value. Example: event generated for a premium plan user may have extra information where the key is Plan and the value is Premium Imagine that there is a need to analyze the number of images received by a bot. One way to organize events for this analysis would be: Category: "Contents" Action: "Image" In other words, the grouping of events is given by the Content category and the type of image content is defined through the Image action. Following the same logic, to analyze the amount of text messages received, simply use: Category: "Contents" Action: "Text" Likewise, to represent the number of HTTP requests made by the bot for a specific API endpoint, a possible event configuration would be: Category: "HTTPRequest" Action: "/ products" Label: "HTTP requests for product search" Value: 1 Where the value 1 indicates, for example, the product ID searched for in the API. How to create an event using the Event Log action Analyze the flow of your bot and define which block corresponds to the moment when you want to generate an event. In this block, create an action (entry or exit) of type Event Log and fill in the information related to the event you want to analyze. Logging and analyzing events programmatically In addition to recording events through the Builder action, it is possible to perform the same process, programmatically, through the Blip API. For more details, access Blip documentation. For more information, access the discussion on the subject in our community or the videos on our channel. 😃 Related articles How to Create Custom Reports How to create charts in a custom report How to Use Variables in Blip Desk Canned Responses Builder variables Sending WhatsApp Active Messages on Blip Desk