Create a simple chatbot using Conversation Management

This section illustrated the creation of a simple chatbot in Quickwork.

Creating a chatbot with Quickwork’s Conversation Management is straightforward. Once configured, Quickwork can send automated messages, functioning as a full-fledged chatbot without needing a human agent. Let's create a simple journey in Quickwork to understand the process.

Consider a use case where a chatbot automatically sends a welcome message to new users when they initiate a conversation, asks for basic details, and stores them in a Google Sheet. This helps create a friendly and engaging first interaction.

Pre-requisites

  • An active account in Conversation Management and Quickwork.
  • An inbox in Conversation Management. For this use case, the inbox is TechDocs.
  • An HTML file or a website containing the TechDocs inbox. Alternatively, you can use a real time HTML editor for testing the chatbot.
  • Access to a Google Sheet named Customer Details from chatbot to save details received from chatbot.

Building the journey using Conversation Management

  1. Log in to your Quickwork account. Go to Folders and click + Create Journey button.

  2. Set up the trigger:

    1. In the Event section, select Conversation Management by Quickwork from the Apps drop down, and select New text message as the Trigger Event.


    1. Connect your Conversation Management account by choosing an existing connection or creating a new one. To set up a new connection, click on + Create new connection and follow the prompts to link your Conversation Management account.
    2. In the Event input field, enter a New message as Event. A webhook URL will be generated.


    1. Copy and paste this webhook URL in the Webhook field in the TechDocs inbox’s Webhook tab in Conversation Management dashboard. Click Save Changes.
  3. Configure the steps:

    1. Click the Simple Action button and choose Conversation Management by Quickwork from the Apps drop-down menu.
    2. Select Ask question from the Action list.
    3. In the Question input field, enter a question you want to ask the user. For example, Please share your name.
    4. Select the format from the Answer type list. For example, Text for name.
    5. Map the Conversation Id data pill from the trigger event in the Data Tree Output and enter Retry help text.

    1. Repeat steps i through v to ask for the phone number and email ID from the user.
    1. Add a step to record the user responses in Google Sheets.
    1. Add a step to send a confirmation message to the user through Conversation Management that the details are saved.

  4. Click Save and start to start the journey. You will be redirected to the History tab.

Testing the chatbot

To test the chatbot you have created:

  1. Go to your Conversation Management account. Then go to Inbox settings > Toolkits.
  2. Copy the code in Messenger Script.
  1. For testing, open the HTML editor. Paste the copied code inside the body tag, hit the Enter key. You will see a chat widget on the right-hand side corner of your screen.
  1. On the chatbot, type Hi.
  2. The chatbot would ask the questions as configured. Respond accordingly.
  1. Check Google Sheets to verify if the details have been saved correctly.

Troubleshooting

  • Validate user inputs: Implement validation steps within your chatbot's questioning sequence to ensure that the data collected (like phone numbers or email addresses) conforms to expected formats. This prevents data errors when saving to Google Sheets or using this information for further processing.
  • Error handling: Incorporate error-handling mechanisms to manage any interruptions or failures in the journey. For instance, if there's an error connecting to Google Sheets or sending messages, configure the chatbot to notify the user and offer guidance or an alternative action.
  • Maintain conversation context: Ensure that the chatbot maintains the context of the conversation, especially if multiple questions are asked. This helps in delivering a coherent and logical chat flow, improving user experience.
  • Security measures: Since the chatbot handles personal data, implement security measures to protect this information during transmission and storage. Use encrypted connections and secure authentication methods to safeguard data integrity and privacy.

✏️ Tips and recommendations

  • Test the chatbot extensively to ensure it handles all types of user inputs correctly, including unexpected and edge-case inputs. This helps identify any potential flaws in data handling or conversation flow.
  • Monitor the performance and responsiveness of the chatbot, especially how quickly it processes user inputs and returns responses. Slow response times can deter users from engaging further.
  • Implement a feedback mechanism within the chatbot to collect user experiences and suggestions. This feedback can be invaluable for iterative improvements to the chatbot’s functionality and user interaction.
  • If the chatbot is accessible from different platforms (like different web browsers or mobile devices), test across these platforms to ensure consistent behavior and user experience.
  • Before full deployment, consider conducting a pilot test with a small group of real users to observe interaction patterns and gather qualitative feedback.

📚 Additional resources

What is Conversation Management?
Conversation Management documentation