How can Comm100 Chatbot send data to your web application using Webhook?

June 5th, 2018 | Chatbot Management

Comm100’s Chatbot allows your customers to interact with a bot to receive information about products or services quickly and efficiently.

However, you may need to extend the capabilities of our Chatbot by connecting it to your own database for a more personalized and dedicated service.

Now, with the latest update, our Chatbot can send data to your own web application using a “Webhook”. A Webhook is a custom web callback query used to provide real-time information.

To set up these new personalized questions, you can supply Chatbot with a URL of the web application to receive the Webhook data and return the relevant information to our Chatbot service.

Step by Step Instructions

  1. Log into your Comm100 account and go to Bot module.

  2. Navigate to Intent tab, click on the Bot you want to edit from the list.

  3. Click New Intent or edit an existing Intent.

  4. Select the Live Chat channel, and add Webhooks response.

  5. Finally enter URL for your web application to received chat data.

  6. Chatbot Webhook URL

Data Sent to Your Web Application

Through the designated URL, your web application will receive the variables and its values from the chat sessions. The data that will be passed to your web application will include the “Fields” in the Pre-chat Window, Custom Variables, Variable of Visitors, Last Message from Visitors, and Matched Intents.

Your web application will then process the received data, generate and send us the result.

Below is an example of the data in JSON format that will be sent to your server:

        "browser":"Google Chrome 29.0.1547.76",
        "email":"[email protected]",
        "operating_system":"Windows 7",
        "state":"British Columbia",
        "ssoId": ""
    "FormValues": [
            "label": "account",
            "value": "sam"
            "label": "password",
            "value": "1234"

Properties Explained

Id ID of the visitor
name Name of the visitor
email Email of the visitor
status Status of the visitor (please check the Visitor Status Description at the bottom of this article)
phone Phone of the visitor
company Company of the visitor
first_visit_time Time when the visitor first visited a web page pasted with Comm100 Live Chat code
visit_time Starting time when this visitor visits your website this time
city City of the visitor
state State of the visitor
country Country of the visitor
ip IP of the visitor
language Language the visitor is using
screen_resolution Screen resolution of the visitor’s device
time_zone Time zone of the visitor
flash_version Flash version of the browser the visitor is using
operating_system Operating system of the visitor’s device
browser Browser the visitor is using

Values of custom fields entered by visitors in the pre-chat window. Agents can also update the value(s) during chat in Visitor Monitor. Custom fields contain the following properties:

id: id of the custom field
name : name of the custom field
value : value of the custom field

product_service Product/Service the visitor selected in the pre-chat window. Agents can also update the value while chatting with visitors.
department Department the visitor selected in the pre-chat window. Agents can also update the value while chatting with visitors.

Information of custom variables captured from the web page visitors viewed. Custom variables contain the following properties:

name : name of the custom variable
value : value of the custom variable

current_browsing Page the visitor is currently looking at
visits Total times of visits a visitor has made on your website from the first time to present
chats Total times of chats a visitor has made on your website from the first time to present
referrer_url URL of the page from which a visitor comes to your website
search_engine Search engine the visitor used to search for your website
keywords Keywords the visitor used to search for your website
landing_page Title and URL of the first page of your website the visitor visited
page_views Total number of web pages the visitor viewed on your website
ssoId SSO ID of the visitor, if visitor login by Single Sign-On
FormValues label : name of the Form field
value : value of the Form field

Visitor Status Description

0 Waiting for chat
1 Voice chatting
2 Chatting
3 Pre-Chat
4 Manually Invited
5 Auto invited
6 Offline message
7 Refused by agent
8 Refused by visitor
9 Chat ended
10 In site
11 Out of site

Data Received from Your Server and Chatbot Answers

We accept the data returned in JSON format. Here are examples of how the data is formatted and what Chatbot answers back with:

Customer Requests Text
 "messages": [
   {"text": "Welcome to Comm100!"},
   {"text": "How can I help you?"}
Text Messages and Chatbot Answer

Chatbot will send text message as an answer to your customers in the Chat Window.

Customer Requests Image
  "messages": [
      "attachment": {
        "type": "image",
        "payload": {
          "url": ""
Send an Image and Chatbot Displays the Image

Chatbot will show the preview of the image directly in the Chat Window.

Customer Requests File
  "messages": [
      "attachment": {
        "type": "file",
        "payload": {
          "url": " List.pdf"
Send a File Attachment and Chatbot Displays a Download Link

When your server returns a file attachment, Chatbot will provide a link for your visitors to download.

Be the 1st to vote.