How Chatfuel and Dialogflow share data

How Chatfuel User Attributes become Parameters in Dialogflow, and Dialogflow Parameters become Chatfuel User Attributes.

Josh Barkin
Being Janis

--

Click here for the complete guide to building Dialogflow-enhanced Chatfuel bots

Chatfuel users have come to embrace Dialogflow as a source for artificial intelligence due to its power and flexibility. One of the benefits of connecting these two industry-leading systems together with Janis is an elegant exchange of data between systems.

Chatfuel → Dialogflow

You can use Chatfuel User Attributes in Dialogflow responses. In this example, the {{first name}} User Attribute value can be accessed in a Dialogflow intent by creating a parameter with the value of #janis.first_name (note that a user attribute with spaces can be accessed by Dialogflow by replacing the space with an underscore).

Here is how the response will be displayed in Messenger when the Dialogflow response is requested.

Dialogflow → Chatfuel

You may wish to use values captured or set by Dialogflow in your Chatfuel block responses. Parameters defined in Dialogflow magically become user attributes in Chatfuel when you use Janis. In this example, we are capturing the city in which the user lives and the city is saved as a parameter value in Dialogflow (geo-city).

In the Dialogflow response section, we can set the payload to let Chatfuel know what block(s) to redirect to. In this example, we are redirecting to the location block.

Now, within that location block, you can use the {{geo-city}} user attribute in your response.

And as you can see from the Messenger screenshot below, Chatfuel responds with the city captured by the Dialogflow intent!

You can see how with the Janis JSON API, you can use the values of Chatfuel’s built-in, or custom defined User Attributes in your Dialogflow intents. With Janis as your AI manager, the *parameter* names saved in Dialogflow become *user attributes* that you can re-use in your Chatfuel blocks.

Watch another example

Additional Reading

If you found this article useful, I think you’ll also benefit from this one:
📙Custom User Attributes you can use to control Dialogflow from Chatfuel blocks

Next Steps

🤖 Need an easy way to connect Dialogflow to Chatfuel?
👉 https://www.janis.ai

🤖 Training Dialogflow NLP takes time. Need a Dialogflow template?
👉 https://janis.ai/dialogflow-templates/

🤖 Learn more how to build chatbots with Chatfuel and Dialogflow
👉 https://janis.ai/chatfuel

--

--

Josh Barkin
Being Janis

Building conversational AI platforms since 2016