How to create an agent and link accounts in Google Dialogflow
This document explains how to create an agent in Google dialog flow.
Creating a Dialogflow Agent
There are two agent types available in Dialogflow:
CX agent: This is an advanced agent type that is suitable for large or very complex agents. Flows and pages are the building blocks of conversation design, and state handlers are used to control conversation paths. The CX agent type is summarized in Dialogflow CX basics.
Currently, the Dialogflow CX agents are not supported by Orbita.
ES agent: This is the standard agent type that is suitable for small to medium and simple to moderately complex agents. Intents are the building blocks of conversation design, and contexts are used to control conversation paths. The ES agent type is summarized in Dialogflow ES basics.
More info at Conversational Agents and Dialogflow
If you have not configured dialog flow in your Google account, go to https://console.dialogflow.com/api-client/#/login or click Log into the Google dialog flow.
Use the Dialogflow ES (Essentials) Agent - Standard agents for small to medium and simple to moderately-complex use. Refer, Dialogflow ES documentation | Google Cloud
Sign in with your Google account.
Click Create Agent.
Enter an Agent name. (Agent name cannot contain spaces).
Select your Default Language and Default Time Zone and click Create.
The Agent’s default language should be the same as the language you choose from the linked project in Orbita.
Experience Manager > Project side navigation menu > Develop > Deployment > Google tab.
Account linking
Select Integrations from the side menu and click on the Integration link as shown in the screenshot.
In the pop-up window, enable the Sign-in required to start the account linking flow when the intent is triggered.
Click on Manage Assistant App.Select the Develop tab.
Select Invocation from the left side menu.
Here you can choose the invocation name for your project.
Click on the Save button on the top right corner of the page.In the Develop tab, select Account linking from the left side menu.
Toggle the Account linking to enable it.
Choose one of the Account creation modes. (Recommended mode is No, I only want to allow account creation on my website).
Click Next.In the Linking type section, select OAuth and Authorization code from the dropdowns and click Next
In the OAuth Client Information section, enter the Client ID, Authorization URL.
Refer to the next section for the Client ID and Client Secret
Note: You can get the Authorization URL, Access Token from the Launch node in Experience Designer.
If you want to request extra scopes for interactions with your service, you can do so in the Configure your client (optional) section at the point of authorization.
Enter a working Username and Password for Google’s testing team to test your flow, and click Save.
Click Invocation to create a custom message to invoke your actions. Enter the Display Name. (This will be the invocation message).
Click Save.
Client Id and Secret
Follow the below steps to get the Client Id and Secret of your application.
Login to Experience Manger
Click on the Profile name > Global Settings and User Profile menu > Register Application.
On the Register Application listing page, click on ChatBotClient. You can see the Client Id and Secret at the bottom of the page.
Click on the eye icon next to unhide the Client Id and Secret. Then click on the copy button to copy them to the clipboard.
Testing your Action
You can test your action in a web browser using Google Simulator, or by using Voice Assistants such as Google mini, Google Home, or even your Google Assistant app on your mobile.
With Account linking toggled on;
Type or say "Talk to <invocation name>" on any Assistant-enabled device you're logged in using the same email.
The voice assistant will prompt you to link your account to Google.
After you accept the account linking request, you will be redirected to the Orbita login page.
Enter your credentials and you can start using your action.