Introduction
The block library was created to facilitate the daily life of those who need to build a smart contact without having deep technical mastery and need speed to publish. With it, it will be possible to apply both basic deterministic skills such as Onboarding, LGPD, Inactivity, Validation cascade, Anything else, Completion, and CSAT as well as structures using Studio agents.
Basic concepts
To ensure proper functioning, the ready-made blocks are structured in a router architecture, with each set allocated to a specific Studio. This makes the maintenance and evolution of the flow much easier.
Is it possible to use ready-made blocks within a single Studio?
Yes, it is possible, but the high interconnection between the blocks makes maintenance complex. Editing a specific part requires understanding and reviewing the entire connected structure, creating high effort and time for configuration.
Macro view
Before using the library, it is important to define the conversational structure and the interaction between its parts. A conversation must have a beginning, middle, and end oriented toward a main objective. In the macro view, very similar to BPMN flowcharts, it is necessary to map the paths, decision triggers, and create symbols that represent each event of the conversation flow.
The library
The block library is divided into Skills, Agents, and Use Cases.
Skill is a set of standard blocks with a specific objective within the intelligent contact conversation.
Agent can be an agent block or a set of agent blocks and standard blocks, where agent blocks are fundamental for the specific objective within the intelligent contact.
Use case is a set of skills and agents for a specific objective within an intelligent contact journey.
Each option within the library has a tag and can be searched in the search bar as represented in the image below:
Ready-made blocks
Skills: | |
|
Onboarding LGPD Inactivity Opt-In/Out Something Else |
Finalization CSAT Human Handoff Personal Data Validation Cascade |
Agent: |
Use case: |
Registration |
Lead Qualification |
Skills
Onboarding
Welcomes the user with welcome or return greetings, checks the LGPD consent status, and guides on how to use the service.
|
Block | [LOGIC] A.1.0.0 Input validation The variable {isNewUser} is used in the output conditions to identify if it is the user's first contact, directing them to the corresponding block. There is an event tracking action to identify the user's origin.
Block | [MSG] A.2.0.0 Yes validation Displays the welcome message to the user and executes event tracking (origin and display), in addition to defining the variable {isNewUser}. The output condition is activated only if there is a user response.
Block | [MSG] A.3.0.0 No validation Displays a return message to the user and executes event tracking (origin and display). The output condition is activated only if there is a user response.
Block | [LOGIC] LP.1.0.0 - LGPD Validation Verifies if the user has already accepted the LGPD terms through the variable {userAceptedPrivacyPolicy}. The flow validates if the variable exists and if the value corresponds to the acceptance (Yes/No). Actions include origin event tracking and the LGPD validation status.
Block | REDIRECT SERVICE Executes the redirection to another service or skill through an output action. |
LGPD:
Explains briefly what the LGPD is and collects the user's acceptance so that the Intelligent Contact can collect sensitive data.
|
Block | [START] Manages the entry into the skill by validating the variable {input.content@redirectId} and forwarding the user to the corresponding block via ID.
Block | [INPUT] LP.2.0.0 - LGPD Presents information about the LGPD, including a link for details and an options menu for the user to accept, refuse, or request more information.
Block | [LOGIC] LP.2.0.0 - [No] LGPD Acceptance Performs validation through a script of the chosen option.
Block | GOTO LP.2.0.0 - Service Name Executes the redirection to another service or skill through the default output if the user has accepted the terms.
Block | [INPUT] LP.3.0.0 - Does not agree with LGPD If the user does not accept the terms, a message is displayed reinforcing the need for acceptance to proceed. The block represents the previous options: "Accept", "Do not accept", and "Find out more".
Block | LP.4.0.0 - Find out more A detailed explanation about the LGPD is displayed.
Block | [LOGIC] LP.3.0.0 - Does not agree with LGPD Performs validation through a script of the chosen option.
Block | GOTO LP.3.0.0 - Service Name Executes the redirection to another service or skill through the default output if the user has accepted the terms.
Block | REDIRECT SERVICE Executes the redirection to another service or skill through an output action.
Block | Inactivity Redirect Performs the redirection to the inactivity skill, ensuring the return to the user's input wait point. |
Inactivity:
Sends a message to retrieve the user's conversation with the Smart Contact after an inactive period.
|
Block | [INPUT] I.1.0.0 - Inactivity Displays a message to confirm if the user wishes to proceed with the service.
Block | [LOGIC] I.1.0.0 - Inactivity The variable {setValidation} is used to validate the user's decision and determine the continuity or the termination of the flow.
Block | [INPUT] I.1.2.0 Termination Displays the content of the completion message.
Block | REDIRECT SERVICE Executes the redirection to another service or skill through an output action. |
Opt-In/Out:
Controls the user's consent for sending communications.
|
Block | [INPUT] I.1.0.0 - optin Content of the message requesting consent for sending notifications.
Block | [LOGIC] I.1.0.0 - OPT-IN Validation of the chosen option through a script.
Block | OPT 1.0.1 - Opt-in Acceptance Confirmation content after the user's opt-in.
Block | OPT 2.0.0 - Opt out Confirmation message for removal from the recipient base.
Block | OPT.1.0.2 - Non-acceptance Content displayed after the user's refusal of notification permission.
Block | REDIRECT SERVICE Executes the redirection to another service or skill through an output action.
Block | Inactivity Redirect Performs the redirection to the inactivity skill, ensuring the return to the user's input wait point. |
Something Else:
Checks if the person wants to add information or talk about another subject.
|
Block | [INPUT] AM.1.0.0 - Anything else Message for checking pending issues or additional support.
Block | [LOGIC] AM.1.0.0 - Anything else Validation of the chosen option through a script.
Block | REDIRECT SERVICE Executes the redirection to another service or skill through an output action.
Block | Inactivity Redirect Performs the redirection to the inactivity skill, ensuring the return to the user's input wait point. |
Finalization:
Confirms the completion of the service and signals availability for new requests.
|
Block | F.1.0.0 - Termination Closing message with instructions for reopening contact.
Block | REDIRECT SERVICE Executes the redirection to another service or skill through an output action. |
CSAT:
Collects the user satisfaction evaluation after the service.
|
Block | [START] Controls access to the skill by validating the variable {{input.content@redirectId}} to direct the user to the corresponding destination block.
Block | [MSG] C.1.0.0 Resolvability Question Confirmation message sent to the user to validate if their request was resolved before closing the flow.
Block | [LOGIC] C.1.0.0 Resolvability Question The validation of the selected option is performed via script, using the variable {{userInput}} directly in the output conditions to determine the next step of the flow.
Block | [MSG] C.1.0.1 Negative resolvability Displays the content of the message asking what can be improved.
Block | [MSG] C.1.1.1 CSAT Question Displays the content of the message asking for the evaluation rating.
Block | [LOGIC] C.1.1.1 CSAT Question Validation of the evaluation rating performed via script using the variable {{userInput}} to process the received score.
Block | [MSG] C.1.1.2 Finish CSAT Displays the content of the completion message.
Block | Redirect Finish Redirects the service to the completion skill.
Block | Inactivity Redirect Performs the redirection to the inactivity skill, ensuring the return to the user's input wait point. |
Human Handoff:
Forwards the user to human service whenever the interaction requires specialized support.
|
Block | Customer service Configures availability rules to manage the flow when no agents are available or the contact occurs outside of operating hours.
Block | ATH.1.0.0 No agent available Unavailability message informing the absence of agents and asking if the user wishes to wait in the queue.
Block | ATH 1.1.0 Wait Waiting message guiding the user to wait for the service to begin.
Block | ATH 1.2.0 Farewell Closing message instructing the user on which term or action to use to restart the conversation.
Block | ATH 2.0.0 Out of hours Informative message about the end of the shift that presents the channel's operating hours.
Block | REDIRECT SERVICE Redirects the user to another service or skill using an output action configured in the block.
Block | Inactivity Redirect Performs the redirection to the inactivity skill, ensuring the return to the user's input wait point. |
Personal data:
Requests, validates, and organizes user's personal information securely. CPF - Name - Email - Phone
|
Block | [START] Manages the entry into the skill by validating the variable {{input.content@redirectId}} and forwarding the user to the corresponding block via ID.
Block | [MSG] Intro message Introductory message that informs the user about the start of data collection.
Block | [LOGIC] DC.1.0.0 Ask for CPF? In the input actions, the variable {{dadosPessoais}} defines which information will be collected and validates the need to request the CPF (tax ID).
Block | [MSG] DC.1.0.1 Ask for CPF Message requesting the user's CPF number to proceed with the registration.
Block | [MSG] DC.1.0.1 CPF Validation Validation of the format and authenticity of the CPF via script, using the variable {{isValidCpf}} to register the document in the contact parameters.
Block | [LOGIC] DC.1.1.0 Ask for Name? Verifies if name collection is enabled in the {{dadosPessoais}} variable.
Block | [MSG] DC.1.1.1 Ask for Name Message requesting the user to provide their full name.
Block | [LOGIC] DC.1.1.1 Name Validation Validation of the name format via script using the variable {{nameValidation}} to register the name in the contact parameters.
Block | [LOGIC] DC.1.2.0 Ask for E-mail? Verifies if e-mail collection is enabled in the {{dadosPessoais}} variable.
Block | [MSG] DC.1.2.1 Ask for E-mail Message requesting the user's e-mail address for contact or registration.
Block | [LOGIC] DC.1.2.1 E-mail validation Validation of the format and authenticity of the e-mail via script using the variable {{hasEmail}} to register the address in the contact parameters.
Block | [LOGIC] DC.1.3.0 Ask for Phone? Verifies if phone collection is enabled in the {{dadosPessoais}} variable.
Block | [MSG] DC.1.3.1 Ask for Phone Message requesting the user's phone number for contact.
Block | [MSG] DC.1.3.1 Phone validation Validation of the format and authenticity of the phone number via script using the variable {{phoneNumber}} to register the number in the contact parameters.
Block | [MSG] Transition message Confirmation message informing the user of the successful completion of their data collection.
Block | REDIRECT SERVICE Redirects the user to another service or skill using an output action configured in the block.
Block | Inactivity Redirect Performs the redirection to the inactivity skill, ensuring the return to the user's input wait point. |
Validation Cascade:
It is the sequential process of data verification. Each stage functions as a "filter": the information only moves to the next level if it is successfully validated in the previous one.
| Hierarchy of Validation | |
| Attributes | Description |
| customized_errors | Specific Rules: Personalized validations that do not fit global patterns (e.g., data formats exclusive to the bot). |
| api_error | System Barrier: Blocks the flow if the user comes from an integration failure (HTTP), preventing chain errors. |
| validation_media_error | Media Filter: Identifies and handles errors related to sending files and media. |
| audio_error | Audio Validation: A stage dedicated to verifying the quality or existence of audio (e.g., integration with Blip Speech-to-Text). |
| link_error | Link Filter: Identifies if the message contains only links. If so, it blocks progress; if there is accompanying text, it allows it to proceed. |
| emoji_error | Emoji Filter: Blocks messages composed exclusively of emojis, requiring text for continuity. |
| botxbot_error | Anti-Spam: Identifies if the user is another robot through repetitions or automatic patterns (Regex), requiring human action to continue. |
| non_talkables_error | Sensitive Terms Handling: The following variables must be defined: {{config.utilsApiUrl}}, {{config.utilsApiAuth}}, {{config.globalSheetsId}}, {{config.connectionTalksSheetsTabName}}, {{config.connectionTalksSheetsTabRange}}. |
| clear_text | Sanitization: Cleans the text (removes noise) before it is processed by artificial intelligence (NLP). |
| global_regex_error | Global Patterns: Security and format validation applied to bot text inputs at any point in the journey. |
| long_message_error | Size Limit: Blocks excessively long messages (currently > 100 characters) to avoid overloading the NLP. |
| connection_talks_error |
Smalltalk Management: Identifies informal conversations and defines automatic responses or block redirects. The following variables must be defined: {{config.utilsApiUrl}}, {{config.utilsApiAuth}}, {{config.globalSheetsId}}, {{config.nonTalkableSheetsTabName}}, {{config.nonTalkableSheetsTabRange}}. |
| short_message | Minimum Message: Avoids useless calls to the NLP for very short messages (fewer than 3 letters). |
| nlp_error | AI Integration: Validates the connection and processing with the Artificial Intelligence provider. Configuration variables must be defined: {{config.AuthorizationApiKeyIA}} and {{config.commandsUrl}}. |
| content_assistent | Content Assistant: Validates the final integration with the content support assistant. |
API Integrations and Configurations
The attributes non_talkables_error and connection_talks_error depend on connections with external systems. They perform dynamic searches to deliver personalized responses based on the current context and the specific stage of the conversation.
How to Configure in Studio
After adding the cascade through the library, locate the block: [REQ] set variables
Flow control is managed in the Actions tab, within the Proccess ExceptionHierarchy script. There, you can define which validations will be active in the journey:
- True: Validation active.
- False: Validation deactivated.
By default, the non_talkables_error and connection_talks_error attributes start deactivated.
To Activate: Change the value to true and save the changes.
Attention: When activating, make sure to configure the rules and variables for these validations according to the specific context of your journey.
Skills Configuration
Step by step:
Create a chatbot
Access the library
Adding a skill
Skills Instructions
Each skill imported into Studio includes an instructional block called "Start Here."
How to activate: Follow the instructions within that block and apply the requested settings so that the skill operates correctly.
Flow Cleanup: After importing and configuring, the native "Welcome" and "Standard Error" blocks (automatically generated during bot creation) can be deleted to avoid duplication.
Registration Agent
This library component was designed to automate the collection of essential data:
Collection: Records the user's name, email, and phone number.
Routing: After successful capture, the flow is automatically directed to a standard block, where the conversation proceeds.
| Image | Prompt |
|
<objective>Collect and validate user's NAME, EMAIL, and PHONE in pt-BR.</objective> <guidelines> <flow> <fields> It can be just first and last name</question> <field id="email"> <field id="phone"> <messages> Are they correct?</summary> |
Use case - Lead Qualification
For this use case, the complete set of skills is centralized in a single Studio environment, as illustrated below:
Centralizing all skills in a single Studio environment facilitates workspace management. However, the process of evolving or adding new functionalities requires extra attention to the connections between blocks to ensure the integrity of the conversational structure.
For detailed guidance and practical tips on using the block library, consult the AMA available on our YouTube channel.
For more information, visit the discussion on the subject at our community or videos on our channel. 😃