Google’s Dialogflow is one of the popular development tools used by chatbot builders to craft conversations for Google Assistants and various other platforms like Alexa, Slack, Facebook Messenger, or Twillio.

Many Dialogflow users choose to go with Cloud Functions for Firebase for the fulfillment of their Agent: it is totally integrated to Dialogflow’s code editor and allows the agent to run serverless.

Integrating Dashbot into your Dialogflow Agent is quick and pain free – for beginners and code wizards alike.

Here’s how to manage a successful integration in less than 3 minutes.

Pre-requisites

Before integrating Dashbot to your Dialogflow Agent on Firebase, you must have:

Easy 2-step process

1. In your Dashbot account, add the Agent to get its API key Type in the agent name and select Google as the platform from the dropdown list.
The Category and Product Status are optional.
Click Register. This will open a new page on which you will find the API key that will be used to identify your agent when Dashbot and Firebase communicate.

2. In Dialogflow’s fulfillment menu, enable the Inline Editor

a. In the package.json tab, add Dashbot to the list of dependencies
Copy the line in blue and past it at the bottom of the dependencies list.

<font color="#ffffff">"dependencies": {<br></br>...<br></br></font><strong><font color="#00F5FF">const "dashbot": "^11.1.0"</font></strong><br></br><font color="#ffffff">}</font>

b. In the index.js tab

i. Define the Dashbot constant
Copy the following line in blue and paste below in your list of constants.
Replace the red text ‘DASHBOT_API_KEY’ with the API Key generated in Step 1 above.

<font color="#ffffff">'use strict';<br></br>const functions = require ('firebase-functions');<br></br>const {dialogflow} = require ('actions-on-google');<br></br><br></br></font><strong><font color="#00F5FF">const dashbot = require ('dashbot')(<font color="#FF0000">'DASHBOT_API_KEY</font>).google;</font></strong>

ii. After defining your Agent constant, pass the Agent object to the Dashbot handler
This will enable the data to be sent to Dashbot.
Make sure the name in brackets matches the name you gave to your agent.
By default, Dialogflow calls your Agent “agent.” If you wrote the code yourself in the Inline Editor, use the name you chose for your Agent. For example, if you called it “app,” it would look like this.

<font color="#ffffff">const app = dialogflow();</font><br></br><strong><font color="#00F5FF">dashbot.configHandler(app);</font></strong><br></br><font color="#ffffff">...<br></br>// business logic <br></br>...<br></br>exports.dialogflowFirebaseFulfillment = functions.https.onRequest(app);</font>

Hit “Deploy” and that’s it!

These 3 lines of code are also available for an easy copy-paste:

Get instant confirmation on the success of your integration

Send your Agent a test message.
You can do so in Dialogflow by typing a message into the “Try it now” console in the upper right corner of the page. Alternatively you can open the simulator for the Action and send messages there.

Go to your Dashbot’s page. Click the “Verify” button to check if data is coming through.

![](https://lh4.googleusercontent.com/vAR8yEiCxIpcocOknXFVXDbGvsRW5HFdztbzhyjjT5C-Yse2i368AIW-OQexFSE3jZFchg3A7ry3Jb-pj80h2J0au2pTIriuKwnqLchAWdk3Y5IE3zNbiNi40p85s3HJ6vH7182U)
If the integration was successful, you will see the confirmation below:
![](https://lh4.googleusercontent.com/pbFjc4r1GpyJtlnx8jqygfP__P3RYl7Fdasp3-UBM-2qiwcZv9mWWLddOqzd2-jxXQZDy2ytWvGWibC894QgS9O5-k32-kQaeyb2E4FxtDLLRJrr_x6hLqv8p5KQ-pvGmXblrP49)
If you see the message below, Dashbot is not yet receiving data from your Agent.
![](https://lh5.googleusercontent.com/hFlGbkcj2jwsEB7_VO9ZLTTw1s6VQs00vXRaqeuBZRi1xwaVGQds-9yM77m22NvWO67pHFhc4AJgULfmZplVMBO0HWbT-t_5iXaNgNIHUk_8EDkVqOGWNKATGFB30naeWCbSbaKX)
Here are the most common reasons for this:
  • Your Agent has been inactive for too long. As suggested in the error message, send a message to your Agent and try again.

  • Webhook calls are not enabled for Fullfillment at the Intent level in Dialogflow. Go back to Dialogflow, scroll down each Intent page all the way to the Fulfillment section and enable the webhook call.

page image
View your Reports

After successfully integrating Dashbot, check out your reports by clicking View Reports on the chatbot page, or by selecting the chatbot from the Bots/Skills drop down.

Click the Real Time section in the left nav. From here, select any of the real-time options to see the data coming into your chatbot.

Please note, some of the other, non-real-time reports in the dashboard are rolled up on time intervals. If you do not see data initially in those reports, check back in an hour to see them fill in.

For more information about our reports and to view samples, please check out our tour.

Insider’s tip

With Dashbot’s Unhandled Report, you can quickly see where the NLP is failing to understand the user, and use that information to retrain your bot on Dialogflow.
Make sure you configure your Fallback Intent for this report to populate correctly.
By default, Dashbot calls this Fallback Intent “NotHandled.” By default, Dialogflow calls this Intent the “Default Fallback Intent.”

Go to your account page and click the settings button for the relevant bot. Once on the bot settings page, click the Edit button.
Next to “Not Handled Intent Name”, select from the dropdown list the Intent that corresponds to your Fallback Intent. Save and check out the reports.

![](https://lh6.googleusercontent.com/0oLN-Vj0eHm9ibM189R-9Rt_xqNIn0B6LshjiK-gFNN1f0-O5F45FBcELJ87b_I3V4t7NnjdHc09QHo84Ok_TwOIDoV49C4HcscjHBvRE2R1i2iXSgkmmVm_KGkAaqx4Fb3smqGh)
Please note, if you do not see the Intent you want to use in the dropdown, wait 24 hours and check again. Our daily batch process populates the list with all of your Intents.

Have any questions?

Need help with the integration? Want to know more about Dashbot? Let us know!

Are you developing with other tools or for other platforms? Please check out our Documentation for other integrations.

About Dashbot

Dashbot is a conversational analytics platform that enables enterprises and developers to increase user engagement, acquisition, and conversions through actionable insights and tools.

In addition to traditional analytics like engagement and retention, we provide conversation specific metrics including NLP response effectiveness, sentiment analysis, conversational analytics, and the full chat session transcripts.

We also have tools to take action on the data, like our live person take over of chat sessions and push notifications for re-engagement.

We support Alexa, Google Home, Facebook Messenger, Slack, Twitter, Kik, SMS, web chat, and any other conversational interface.

Contact us for a demo