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 https://cloud.google.com/dialogflow#all-features

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, https://cloud.google.com/dialogflow/es/docs

  1. Sign in with your Google account.

  2. Click Create Agent.

  3. Enter an Agent name. (Agent name cannot contain spaces).

  4. 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

  1. Select Integrations from the side menu and click on the Integration link as shown in the screenshot.

     

  2. 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.

     

  3. 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.

     

  4. 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.

     

  5. In the Linking type section, select OAuth and Authorization code from the dropdowns and click Next

     

  6. 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.

     

  7. 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.

  8. Enter a working Username and Password for Google’s testing team to test your flow, and click Save.

  9. Click Invocation to create a custom message to invoke your actions. Enter the Display Name. (This will be the invocation message).

  10. Click Save.

Client Id and Secret

Follow the below steps to get the Client Id and Secret of your application.

  1. Login to Experience Manger

  2. Click on the Profile name > Global Settings and User Profile menu > Register Application.

  3. On the Register Application listing page, click on ChatBotClient. You can see the Client Id and Secret at the bottom of the page.

     

  4. 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;

  1. Type or say "Talk to <invocation name>" on any Assistant-enabled device you're logged in using the same email.

  2. The voice assistant will prompt you to link your account to Google.

  3. After you accept the account linking request, you will be redirected to the Orbita login page.

  4. Enter your credentials and you can start using your action.

Related Articles