Chatbots
Dialogflow V2
As you may now know, Acquire has a couple of different chatbots to choose from, and you can even combine chatbots to suit your needs. If you want to use a third-party chatbot, Acquire provides access to a number of them through our App Store. Google’s Dialogflow is one of the most popular and works alongside the Acquire Chat Widget.
In this article:
- Setting Up a Dialogflow Account
- Creating a Service Account
- Downloading the JSON file
- Integrating Dialogflow into Acquire
- Setting the Dialogflow Business Rule
What You’ll Need:
- A Google Cloud Platform Account
Setting Up a Dialogflow Account
Log in to your Google Cloud Platform Dashboard with your Google account. *Note: Be sure you are logged into the correct Google account. You may need to agree to their terms of service before continuing.
Follow Google’s documentation to set up a Dialogflow bot.
Creating a Service Account
From the left Navigation pane on your Google Dashboard, go to IAM > Service Accounts. Note: This may also appear as IAM & Admin.
Create a service account for your bot by selecting ‘+ Create Service Account’ and then follow the steps below.
Step 1: Write your service account details
Name your service account. A Service Account ID will be created automatically. Add a description and select ‘Create’.
Step 2: Grant this service account access to the project
Select Role as ‘Dialogflow API Client’ from the dropdown menu. Then, select ‘Continue’.
Step 3: Grant users access to this service account (optional)
You may grant access to this account to others.
When you are finished making changes, select ‘Done’.
Downloading the JSON File
From the 'Service Accounts' page, select the vertical ellipses (‘⋮’) under the ‘Actions’ header and select the ‘Manage keys’. On the ‘Keys’ page, press the ‘Add Key’ button and select ‘Create new key’.
Select ‘JSON’. Then press ‘Create’.
A dialogue box will alert you that a private was saved to your computer. A JSON file will download in your browser.
Copy the JSON code. It will look something like this:
Integrating Dialogflow in Acquire
Navigate to your Acquire dashboard and select the ‘App Store’ and choose ‘Dialog Flow Bot V2’. Click on ‘Install’ and follow the ‘Authorization’ instructions.
Note: There may be two versions of Dialogflow in the App Store. Ensure you select V2.
Go to the ‘Settings’ tab and paste the JSON code in to the ‘Service JSON’ field.
The ‘Language’ field should populate automatically. If not, write the ISO language code your chatbot will be using. Then, hit ‘Save’.
Setting the Dialogflow Business Rule
After you’ve trained the agent on the Dialogflow platform, it’s time to see it in action. To start utilizing Dialogflow in the Acquire platform, you will need to create a Business Rule.
In Acquire, navigate to Settings > Workflows > Business Rules and select ‘New Rule’.
Choose the type of trigger you want to link your Dialogflow agent to. For example, you may want to have your Dialogflow agent interact with first-time visitors to your site. You can choose from a variety of options suited to your website’s or business' needs. Learn more about adding conditions to a chatbot in Configuring Chatbot Business Rules.
Congratulations! You have integrated Dialogflow into Acquire’s platform. You now have the power of Dialogflow and Acquire at your side.