Chatbot de Agendamento com IA no WhatsApp + Integração Cal.com com Recursos Exclusivos!
Introduction to the Live Session
Welcome and Context
- The session begins with a casual greeting, indicating a focus on behavioral topics for the day.
- The host acknowledges the audience's diverse locations, noting it's morning in Brazil and afternoon in Portugal, setting a friendly tone for engagement.
- Participants are encouraged to introduce themselves, fostering community interaction as they prepare for an informative live session.
Overview of Today's Topic
- The host introduces significant updates regarding the platform being discussed, emphasizing its relevance and importance.
- A brief overview of what will be covered is provided: a step-by-step logic behind bot creation and data collection within conversations.
Platform Features and Differentiators
Key Features of the Platform
- The platform offers total control over client accounts, allowing users to create their own agencies with full oversight.
- It supports multi-channel communication (WhatsApp, Instagram, Facebook, etc.), enabling seamless integration across various platforms.
Unique Selling Points
- Users can implement dual branding—customizing both their agency's identity and that of their clients', enhancing personalization options.
- New features include collecting conversation data and saving it into custom fields for later use in applications like Google Sheets or databases.
Productivity Enhancements
Efficiency Gains
- The platform integrates automated processes that significantly reduce time spent on bot creation compared to traditional methods.
- Users can leverage advanced functionalities such as audio understanding and image processing without extensive manual input.
Upcoming Features and Bot Development
Introduction to New Features
- The scheduling feature is now available, with an upcoming app for iOS and Android called "Zapp" currently in development.
- Zapp will soon allow smartphone sharing and native integration with Google Sheets.
Platform Overview
- The platform "Reply" is a no-code solution designed for productivity, enabling users to create bots quickly for sales purposes.
- The speaker mentions feeling unwell but continues to present the bot's logic and functionality.
Bot Logic Presentation
- A discussion on presenting the bot's flow, emphasizing its importance in understanding how it operates.
- The bot has five key stages: checking availability, scheduling appointments, consulting existing bookings, canceling appointments, and rescheduling.
Complexity of Scheduling Bots
- Creating a scheduling chatbot can be complex; it requires handling multiple functionalities beyond just appointment setting.
- Each stage of the bot can be managed within a single module of their bot builder tool.
User Interface Adjustments
- Instructions are provided on changing display settings for better visibility during the presentation.
- Emphasis on the importance of prompts in scheduling bots as they drive functionality.
Conclusion and Next Steps
- Clarification that while some team members have left, support remains available through direct contact.
Course Overview for Professional Bot Development
Introduction to the Course
- The speaker introduces a course aimed at teaching participants how to create a professional and fluid bot, emphasizing that it will be 100% functional.
Features of the Upcoming Functionality
- Discussion on upcoming features, including the ability to copy pre-existing workflows, expected to be available soon.
- The importance of defining a persona for the bot is highlighted; in this case, it's an assistant named Bia responsible for scheduling medical appointments.
Setting Objectives for Bots
- Establishing clear objectives for bots is crucial. The primary goal here is to schedule consultations effectively.
- The initial step in scheduling involves showing availability before proceeding with appointment booking.
Data Collection Process
- Emphasis on collecting user data such as email and WhatsApp number during the scheduling process.
- Clarification that WhatsApp numbers are automatically collected by the platform when using it; manual collection is only necessary for other platforms like Instagram or Telegram.
Formatting Requirements
- Importance of including country codes when collecting phone numbers, especially relevant in Brazil.
- Highlighting that date formatting must comply with ISO 801 standards when integrating with Cal.com for scheduling purposes.
Integration and Data Handling
- Explanation of how AI handles data formatting automatically, eliminating the need for external tools previously required.
Phase 2: Presenting User Data
Collecting and Displaying Information
- Phase 2 involves presenting the data collected from the user, including their name, email, WhatsApp number, desired service, and chosen date.
- The assistant should display this information clearly and humanely, asking for confirmation of accuracy regarding the provided details.
- When showing the appointment date and time, it is essential to use a format that aligns with local preferences rather than ISO standards.
Importance of Providing Examples
- Giving examples to the AI is crucial; without them, it may present information in an undesired format. Users can specify how they want data displayed.
Phase 3: Confirmation Process
Requesting User Confirmation
- After displaying the collected data, phase three requires politely asking users to confirm that all information is correct before proceeding with scheduling.
- It’s emphasized that no scheduling should occur until all details are confirmed by the user; this step is critical for ensuring accuracy.
Handling User Responses
- The assistant must only proceed when receiving a clear "yes" from the user. If other affirmations are given (like "okay"), insist on a direct "yes" for clarity.
Finalizing Appointment Details
Post-confirmation Actions
- Once confirmation is received, the assistant should utilize functions to finalize and save all relevant information accurately.
- It’s vital to ensure that no incorrect data is saved; thus, confirmation must precede any saving actions.
Communicating Next Steps
- After confirming an appointment has been created successfully, inform users that their details will be processed shortly while managing API calls in the background.
Real-life Example of Scheduling Challenges
Anecdote on Communication Issues
Agendamento e Reagendamento: Processos e Estruturas
Introdução ao Agendamento
- O agendamento é dividido em três fases: coletar informações, apresentar as informações e confirmar o agendamento.
- O processo de reagendamento é similar ao do agendamento, focando principalmente na troca da data do compromisso.
Processo de Reagendamento
- Para iniciar o reagendamento, é necessário coletar apenas a nova data, formatada no padrão ISO 8601.
- Após coletar a nova data, o próximo passo é apresentar as informações de forma clara e humanizada para o usuário.
Confirmação no Reagendamento
- A confirmação das informações deve ser solicitada após apresentá-las ao usuário. Se confirmado, o reagendamento será realizado.
- O fluxo de reagendamento pode ser mais complexo em termos de estrutura, mas a execução final é mais simples.
Perguntas Frequentes sobre Agendamentos
- A gravação da sessão estará disponível posteriormente para consulta. Os usuários poderão acessar um modelo completo em inglês e português.
- O sistema reconhece automaticamente os nomes dos usuários se estiverem salvos no campo correspondente.
Eficiência do Sistema
- Não é necessário adicionar um código específico para que o sistema reconheça momentos anteriores na conversa; ele mantém um histórico automático.
- O sistema pode coletar dados personalizados automaticamente durante interações com os usuários.
Funcionalidades Avançadas
- É possível programar lembretes automáticos para confirmações antes da consulta ou agendar fluxos específicos para cancelamentos.
Understanding the Role of Prompts in AI Scheduling
Importance of Prompts
- The effectiveness of an AI system, likened to a car's speed, heavily relies on the quality of prompts provided by the user. The prompt is described as the "heart" of the interaction.
- A sidebar feature exists for searching contacts quickly, enhancing user experience and efficiency in scheduling.
Handling Scheduling Conflicts
- Conditional logic can be implemented to manage scheduling conflicts; if an appointment already exists, it prevents double booking through fallback mechanisms.
- Users can schedule appointments for others by confirming their contact details, ensuring clarity in communication.
User Interaction and Confirmation
- The bot can ask users to input another person's WhatsApp number when scheduling on their behalf, streamlining the process.
- Integration with Google Calendar and other platforms allows for seamless management of appointments across different systems.
Re-scheduling Logic
- If a user wants to reschedule via different channels (e.g., Messenger), specific flows must be created to handle these requests without conflict.
- The scheduling function is versatile and works across multiple messaging platforms like Telegram and Instagram.
Managing Multiple Appointments
- Users are encouraged to think creatively about how they utilize the scheduling tool; it's designed as a flexible starting point rather than a rigid framework.
- Implementing checks for existing appointments helps prevent confusion when users attempt to book multiple appointments for themselves or others.
Finalizing Appointments
- Users can specify who an appointment is for during the booking process, allowing flexibility in managing family or group schedules.
Agendamento e Coleta de Dados
Processos de Agendamento
- Discussão sobre a necessidade de coletar dados de agendamentos anteriores, enfatizando que é possível realizar múltiplos agendamentos com a mesma pessoa na RIA.
- Comparação entre o sistema atual e outros sistemas, destacando a eficiência do uso de 30 blocos em vez de um fluxo muito mais extenso.
- Importância de lidar com respostas negativas dos usuários, garantindo que o agendamento permaneça inalterado se necessário.
Funções e Campos Personalizados
- Demonstração da função para salvar dados em campos personalizados, ressaltando a necessidade de instruir corretamente qual campo deve ser preenchido.
- Explicação sobre como coletar dados através da API, incluindo a criação e edição da API para coleta específica dos dados do agendamento.
Coleta Automática de Dados
- Descrição do processo simplificado para coletar dados sem criar fluxos extensivos; tudo é feito automaticamente pelo sistema.
- Enfatiza que todos os dados coletados devem ser em formato texto (string), pois isso é essencial para o funcionamento da inteligência artificial.
Instruções Claras para IA
- A importância das descrições claras dos atributos ao configurar funções; cada atributo deve ser bem definido para garantir uma coleta precisa.
- Alerta sobre a falta de instruções adequadas pode levar à falha na coleta correta dos dados pela IA durante as interações.
Aplicações Práticas e Lógica do Fluxo
- Discussão sobre como estruturar as variáveis e garantir que a IA entenda onde salvar os dados coletados durante as conversas.
Understanding the Logic of Scheduling in Bots
Overview of Project Implementation
- The speaker emphasizes the importance of reviewing the entire prompt when a bot encounters issues, suggesting that understanding the overall logic is crucial before deploying a project.
- An example flow for scheduling appointments is introduced, highlighting three main actions: scheduling, rescheduling, and canceling appointments. The need to show users available time slots before scheduling is stressed.
Flow Logic and User Interaction
- When a user initiates an appointment request, the first action taken is to check availability rather than directly proceeding with scheduling.
- The speaker outlines various functions involved in managing appointments: checking availability, creating schedules, editing them, finding existing bookings, and canceling them. Availability can be either fixed or dynamic.
Dynamic Scheduling Features
- Dynamic availability allows multiple calendars to be managed within one block by using event codes instead of creating separate modules for each doctor.
- This feature significantly reduces development time for bots catering to multiple doctors by allowing streamlined management through a single function.
Enhancements in Bot Functionality
- The speaker compares this new capability to having a "Ferrari," emphasizing the potential for complex bot creation using just one tool. Users are encouraged to invest time in learning how to utilize these features effectively.
Practical Application of Scheduling Logic
- A practical demonstration shows how fixed availability is set up for an agenda that pulls data two days ahead from the current date.
- Data formatting is discussed; ISO 8601 format will be used for date representation while ensuring user-friendly output formats are maintained.
Integration with AI Tools
- After gathering available timeslots, data will be formatted appropriately before being presented back to users via an AI assistant designed to enhance user experience.
Understanding AI Loops and User Confirmation
The Importance of User Confirmation in AI Interactions
- The AI enters a confirmation loop, only exiting when the user confirms their details. It collects information such as name, WhatsApp number, email, service type, and chosen date until the user responds affirmatively.
- The speaker emphasizes the need for the AI to collect a "yes" response from users to ensure accuracy in data entry. This is crucial as users may input incorrect information during data collection.
- Testing was conducted with both official and unofficial APIs while building the bot. The speaker highlights that they opted for using the official API for reliability.
Opt-in Requirements for Scheduling Reminders
- Before scheduling reminders through WhatsApp, an opt-in process must be completed to comply with API requirements; otherwise, messages will not be sent.
- The necessity of obtaining user consent (opt-in) is reiterated as essential for sending reminders via the official API.
Scheduling Appointments: Required Information
- When creating an appointment, three mandatory fields are required: user's name, email address, and appointment date. Other collected information can be used later in reminders or confirmations.
- Although additional details like service type and phone number are collected initially, they are not necessary for scheduling but can enhance reminder messages.
Saving Appointment Data Efficiently
- The system allows saving appointment data in a designated text area field along with an ID returned from the API upon successful creation of an appointment.
- Storing the appointment ID is crucial as it facilitates future actions such as rescheduling or canceling appointments based on this identifier.
Simplifying Reminder Creation within Bot Framework
- Users can create reminders directly within the bot framework without needing external automation tools like Google Sheets or other platforms to manage scheduling notifications.
- A simple interface allows users to enable reminders by selecting how far in advance they wish to receive notifications (e.g., 24 hours before).
- Users have options to customize reminder settings further by specifying channels (like WhatsApp), ensuring personalized communication regarding appointments.
Customizing Reminder Messages
How to Create Reminder Models in WhatsApp
Creating Reminder Models
- A question from Patrick about creating reminder models for the CNAP and WhatsApp Office is addressed. The speaker emphasizes the ease of selecting pre-approved models for reminders.
- The process of creating a reminder has been simplified significantly, now achievable in just three clicks instead of hours or days. Reminders can serve utility purposes rather than marketing.
- Emphasizes that reminders are purely functional and do not need to be marketing-oriented, which also reduces costs associated with messaging.
Utilizing Assistant Tools
- The speaker discusses using an assistant tool (referred to as "consult A") to format data and create a more humanized conversation flow, enhancing user interaction.
- Instructions on how to provide concise guidance to the assistant tool are given, stressing clarity over length when formatting data outputs.
Managing User Confirmations
- After scheduling an appointment, it’s crucial to remove the user's confirmation field immediately. This prevents confusion if the user returns shortly after wanting another appointment.
- If the confirmation remains, it could disrupt the flow of interactions by causing loops in responses based on previous confirmations.
Scheduling Logic
- Discusses logic for rescheduling appointments; before rescheduling, it's essential first to check availability. This step ensures users have clear options presented before proceeding.
- Clarifies that showing availability should be done prior to any rescheduling actions. It’s important for users to know their options clearly formatted.
Separation of Functions
API Functions for Scheduling and Rescheduling
Overview of API Functions
- The speaker introduces two distinct API functions: one for scheduling and another for rescheduling appointments to avoid confusion.
- The rescheduling function collects two key pieces of data: the new date and user confirmation, storing them in separate fields.
Importance of Data Separation
- By maintaining both original and rescheduled appointment data, the system allows users to view their complete appointment history, enhancing user experience.
- The separation of scheduling and rescheduling functions is crucial to prevent confusion during interactions with the assistant.
Handling Rescheduling Logic
- At the start of a reschedule request, it’s necessary to remove any existing confirmation field since users may have already made changes.
- A condition checks if an appointment ID exists; if not found, a message indicates that no appointment was located.
User Interaction During Rescheduling
- The assistant presents current appointment details before searching for available time slots, ensuring clarity in communication.
- Emojis are suggested as a way to display available times visually, making the interaction more engaging.
Finalizing Rescheduling Process
- The essence of rescheduling is simply changing the date; however, users can also opt to cancel their current appointment entirely if they prefer.
- Users must provide their original appointment ID along with new details (date, title, description), which are then saved in a personalized format.
Cancellation Process Explained
Initiating Cancellation Requests
- When a user requests cancellation, the first step is confirming whether they have an existing appointment linked to their email address.
Verification Steps
- If confirmed by the user that they used the correct email for booking, further verification checks if an active appointment exists under that email.
Retrieving Appointment Details
- Upon finding an existing appointment using its ID and user's email, relevant details are retrieved and presented back to the user in a friendly manner.
Confirmation of Cancellation
How to Demonstrate a Bot's Functionality?
Overview of the Bot's Features
- The speaker emphasizes the importance of demonstrating the bot's functionality live, showing how it handles user cancellations and responses.
- The bot is currently operating in a test account, which required some adjustments to its features before demonstration.
- The speaker prepares to showcase the scheduling feature through WhatsApp, indicating that users will see buttons for appointment scheduling.
Technical Insights on API Calls
- A question arises about "curl," defined as an API call used to retrieve data from external platforms, such as checking CPF status.
- The speaker highlights that curl can perform numerous functions and mentions a comprehensive course available in their community for those interested in learning more about it.
Scheduling Process with the Bot
- The bot initiates an appointment scheduling process by verifying availability through an API call.
- There’s a discussion about date selection; the bot retrieves available dates based on user input but requires additional API calls for accurate day recognition.
User Interaction and Data Collection
- As part of the scheduling process, users are prompted to provide their name and service details. This showcases how the bot collects necessary information iteratively rather than all at once.
- The speaker explains that while traditional chatbots may require multiple blocks for data collection, this bot operates efficiently within a single flow.
Error Handling and Flexibility
Understanding the Functionality of a Chatbot
Initial Setup and Requirements
- The chatbot is functioning well without needing any additional blocks; it operates on a 7-in-1 basis.
- A requirement for WhatsApp numbers is established, specifically that they must start with the country code 351. This detail was included in the instructions given to the chatbot.
Testing and Corrections
- During live testing, an audio message was sent to correct an error regarding the WhatsApp number format, indicating that it should include "351."
- The chatbot confirmed understanding by providing updated information based on previous prompts, demonstrating its ability to process corrections effectively.
Looping and Confirmation Process
- The chatbot encountered issues with understanding specific email formats due to potential looping errors; it requires confirmation before proceeding.
- Until confirmation is provided, the chatbot remains in a loop, unable to finalize or correct details without user input.
Scheduling and Data Handling
- Once confirmed, data from the scheduling process is saved into memory rather than being stored permanently until explicitly confirmed by the user.
- The system successfully sends out confirmation emails once appointments are scheduled, showcasing effective communication capabilities.
Rescheduling Features
- Users can easily reschedule appointments without starting over; this feature significantly enhances user experience as most systems require cancellation before rebooking.
- To facilitate rescheduling accurately, users must specify dates clearly since the system does not automatically infer them.
Reminder System Integration
- If reminders are set for original appointments, they will automatically update when changes are made to ensure users remain informed about their schedules.
Cancellation Process Overview
- The cancellation process retrieves appointment details seamlessly; users can confirm cancellations directly through the interface.
Dashboard Management
Scheduling Features in Reply
Overview of Scheduling Capabilities
- The speaker discusses the scheduling feature available in the application, highlighting that team members with permission can view and manage appointments directly from the interface.
- Emphasizes that this functionality allows for manual scheduling, rescheduling, and cancellations without relying on a bot, which is particularly useful in settings like clinics.
Real-Time Appointment Management
- A scenario is presented where a client walks into a clinic to schedule an appointment. Unlike other platforms requiring clients to use bots or external communication channels, the receptionist can handle everything live through the app.
- The speaker demonstrates creating a new appointment within the system, showcasing how easy it is to select dates and times.
Reminder Functionality
- Discusses setting up traditional reminders for appointments, including options for timing (e.g., 24 hours before) and communication channels (e.g., WhatsApp).
- Clarifies that during testing phases, certain functionalities like rescheduling may not work as expected due to using a test account rather than a production account.
Testing Environment Insights
- The speaker explains that they utilize a mirrored version of their main system for testing purposes. This environment allows them to identify bugs and ensure stability before deploying updates.
Upcoming Educational Content
- An announcement about an upcoming mini-course focused on scheduling features is made. It will cover building chatbots for scheduling with fluid AI capabilities.