How to create blocks in Builder Take Blip December 29, 2020 17:38 Updated A conversation flow in Builder is composed of several blocks, which represent the current state of a customer during his interaction with the chatbot. There are three types of blocks. See what they are! 1. Control Blocks (Start and Exception) Control blocks represent specific states in a bot's conversation flow. The Start control blocks mark the beginning of the conversation between the client and the bot (before the first interaction), as the Exception marks any exceptions or problems not handled by the flow. Start Your chatbot's conversation always starts through user input. Therefore, the only content in the Home control block is a User Entry. Although it is not possible to change any content in this block, the exit conditions and actions can be fully customized. Exception Any untreated condition, at any point in the bot's conversation, redirects the user to the Exception block. Any content information, exit conditions and actions can be customized in this block. Every new Builder block has a standard output condition, previously configured, for the Exception block. Despite this, it is possible to modify this behavior according to the user's needs. Important considerations: control blocks cannot be renamed or deleted; control blocks can be referenced in any other block transparently. 2. Content Blocks In addition to representing the possible states of a client in the conversation flow, the content blocks are responsible for three other functions: sending (and receiving) content, choosing exit conditions and executing actions. Content Whenever a user reaches a certain state (a block), all the content available in it is sent to the customer. These contents represent the cards supported in the main messaging applications in the market. In addition to the traditional static content - text, typing, image, audio, menu, carousel and quick reply, for example - there are two other types of special content: HTTP content In some specific situations, it may be necessary to send content that varies according to one or more conditions. Imagine, for example, that an e-commerce bot needs to send a carousel with all the product options of a certain category. To build the carousel, it is necessary to analyze various information, such as which products are available, their price and the quantity available in stock. Only after this analysis is it possible to assemble and send the content to a user. With that in mind, the Builder created the HTTP Content. Through it, it is possible to define the endpoint of an application responsible for building the content according to the specific rules of each bot. The only commitment of the application responsible for building the content is to return a JSON object for the chosen type according to the specification defined in the Blip documentation (https://docs.blip.ai/#content-types). * Currently, it is possible to create Menus, Quick Replies and Carousel through HTTP Content. User input In addition to sending content, the bot may need to request some input from the user. For this, there is the User Input content, with which it is possible to stop the execution of the state machine and wait for some information that must be sent by the customer. It is through the User Input that all messages sent by customers are received by the bot. Comments: a block can contain 0 (zero) or 1 (one) User input; if a block does not have User Input, the processing of the state machine will take the client to the block it contains. Exit Conditions In order to be able to condition the change of the user's state, the Builder provides the exit condition feature. Through this functionality, it is possible to define rules for the transition between the blocks. These rules can take into account: the value of variables, the data entry made by customers, in addition to intentions and entities analyzed in the AI model of the bot. For each rule, a target block must be defined to which the user will be sent if the condition is satisfied. Comments: the exit conditions of a Builder block are processed sequentially (one after the other) until a true condition is reached. That is, it is necessary to register the conditions ordered from the most specific to the most generic; by standard, every block has a pre-configured standard output (Fallback) condition. Although it is possible to change the standard output of any block, it is not possible to remove it. Actions The third and last function of a block is to perform input and output actions. An action represents a task that must be performed before sending the contents of a block (input action), or a task that must be performed after sending the contents and before the transition between the current state and the next one (exit action) ). The actions represent the main point of flexibility of the Blip Builder. Through an action, it is possible to use any Blip functionality - such as the various platform extensions, for example (https://docs.blip.ai/#extensions) - in addition to making requests for any public API on the web. Comments: Builder actions are processed sequentially (one after the other) until all are executed; invalid actions, such as an invalid HTTP request, can block a user's conversation flow from running. Be aware when registering an action in your block. 3. Service blocks A service block represents the state in which a user is no longer served by the bot and is now served by a human attendant. Therefore, each service block in the bot's flow represents a point at which customers are transferred to human service. As with content blocks, the service block edit screen also has three tabs: Content, Exit Conditions and Actions. However, only the Output Conditions section can be edited in this block. Through it, it is possible to configure the change of state of the customer, during the end of the service. Thus, the user who has completed his human service is redirected to a new state. Related articles Creating Your Interactive Messages Builder variables How to interact with users through WhatsApp Validating user input What types of content does the Builder support