How to create a chatbot using Quickwork
Create a chatbot that sends automated replies to a customer on a web widget in integration with Quickwork. Learn the procedure of creating a chatbot with an appealing workflow using Quickwork.
Creating a chatbot using Conversation Management and Quickwork is quite simpler. Quickwork sends automated messages to a user, upon proper configuration, acting as a full-fledged chatbot eliminating the need for a human agent. Let's create a simple journey in Quickwork and understand the procedure to create a chatbot.
Before moving towards bot creation, let us know what is Quickwork. Quickwork is an integration and automation platform chosen by enterprises to build workflows, publish APIs, and manage conversations. Integrated apps using Quickwork, send and receive data seamlessly using triggers and actions to achieve the next level of automation.
"Reply to a user on the Conversation Management widget automatically whenever a new message is received from the user." According to this use case, New text message is the trigger, and Send text message is the action to be used from the Conversation Management by Quickwork adaptor supported by the journey builder.
Log in to your Conversation Management account as an admin and select an inbox that has a human-agent service configured. For simplicity, let's select the Medicare human-agent service that we edited in the previous document:
Figure 1: Medicare human-agent service
Now move to the Toolkits tab and make a note of the API Keys and Inbox ID of this inbox. Next, move to the Webhook tab. It contains the Webhook field. This input field is crucial and used only in terms of integration while creating a chatbot. If you wish to send and receive the messages through your messaging service or an integration platform such as Quickwork, specify the webhook URL as an HTTP webhook endpoint in this input field:
Figure 2: The Webhook tab
To get the webhook, switch to Quickwork where we'll be creating a basic journey that will trigger a message automatically.
- 1.In the Event section, search for Conversation Management by Quickwork app as a new trigger under the Apps list.
- 2.Select the trigger event, New text message, from the Triggers drop-down menu field.
- 3.Create a new connection by following these steps:
- 1.Click the Link Account button.
- 2.The Connect to Conversation Management by Quickwork window will pop up. Paste the API Key and Inbox ID of the Medicare human-agent service.
Figure 3: Connection an inbox of Conversation Management
4. In the Event field, enter new message as an event.
As soon as you complete specifying all the input, Journey Builder will return a Webhook URL as shown in the following figure:
Figure 4: Webhook URL generated
Now, copy this URL, return to the Medicare human-agent service inbox, and paste this webhook URL in the Webhook field. Also, checkmark the Events checkbox. Then, click the Save Changes button:
Figure 5: Pasting the webhook URL
Your Medicare human-agent service inbox has been integrated with Quickwork and the Conversation Management by Quickwork-New text message trigger has been configured successfully. It will look like this:
Figure 6: New text message trigger
To do this, follow these steps:
- 1.Click the Simple Action button and choose the Conversation Management by Quickwork app from the App drop-down menu field.
- 2.Select the Send text message action in the Actions list.
- 3.The journey builder will automatically connect the same Conversation Management Inbox as we have already done in the trigger section.
- 4.In the Message field, enter the message that the journey builder should send to a user acting as a chatbot. E.g., Hi there! We're so glad you stopped by. Chances are you are looking for something in particular. Whether it's tech support, product info, or useful resources, we've got you covered. What can we help you with today?
- 5.In the Conversation ID field, drag and drop the
Conversation Id|Triggerdata pill from the App Data-New text message trigger output:
Figure 7: Send text message action
7. In the Private field, select No as an input from the drop-down menu. This will ensure that the sent messages are visible to the customer in the chat window. Selecting Yes as an input will consider the sent messages as a private conversation among the agents and would eventually not be visible to the customers.
Save the Journey by clicking the Save changes button and start the execution by hitting the Start Journey button. You'll be redirected to the History tab automatically. Currently, it would have no entries to display.
Now, open the HTML file or the website in a web browser containing the Medicare human-agent service inbox. Send a message, Hello to the chat window. As soon as you send the message, the journey builder will send a response, which we had specified during action configuration, immediately to you on the chat window:
Figure 8: Automated responses from Quickwork
This way of chatbot configuration not only makes you understand the working of the journey builder but also lets you create numerous journeys and chatbots without any coding. Any human-agent service inbox can be converted to a chatbot using this method. You can also build smarter chatbots that send custom questions, quick replies, carousels, postback messages using Conversation Management by Quickwork actions that the journey builder supports.
As mentioned earlier, pasting the Inbox script in the HTML code embeds the chat widget on the web portal through which communication could be initiated easily. However, this analogy leads to a conversation in the support panel with a haphazardly assigned random user name and email address for a genuine visitor. Thus, it becomes difficult to recognize the actual potential customers through their genuine identification. Custom payloads help you to deal with such dilemmas.
To use these, go to the Inboxes window where the script for your inbox is generated. Scroll down and copy the messenger script that has custom payloads with keywords such as
name: The genuine name of the user you want to get reflected in the support panel. E.g., John Doe.
created_at: The accurate timestamp of the conversation being created. E.g., Mon March 23 2020 17:01:15 GMT+0530.
custom_payload: An object of payloads that you want to pass. It could be information related to sign up, log in details, or could contain a set of login credentials of a user.
Open the HTML file and paste the whole
settingsobject below the
baseURL: BASE_URLtag. Then replace the dummy input values of the above-mentioned fields with the real ones as shown in the following figure:
Figure 8: Using a custom payload script
Now run the file in the web browser. You'll see that a conversation is created in the support panel reflecting the real name of the user that you have specified and not with a lame name such as bold-grass.
Upon successful execution, you can see that the Conversation Management by Quickwork trigger passes the custom payload to the further actions configured in a journey:
Figure 9: Custom payload output
This is an add-on feature that Conversation Management has adopted to smoothen your conversations.