Integrating With Google Assistant
Last updated
Last updated
This document will help you set up a dialog flow agent (agents are equivalent to Alexa skills), connect the agent to a configured skill in the Voiceworx portal, connect the Google Agent to the VoiceWorx skill, and use the agent via voice interaction on the Google Assistant app.
Setup skill in Voiceworx.
Setup Agent in Dialog Flow.
Manage integrations in Assistant App (configure if the app uses account linking, skill. invocation, publishing on Google Play Store).
Integrate/connect agent with the Voiceworx skill.
Set up your skill in the Voiceworx platform. You can also import the following template and create an app using the given template. Please follow this document to create an app from the given template. Note: You need to make a slight change in the publishing step
Google Dialogflow allows “Lifelike conversational AI state-of-art virtual agents”. VoiceWorx users can connect their apps built in VoiceWorx to agents in Google Assistant. After setting up the skill in VoiceWorx, users need to set up an agent in Google Dialogflow. Please follow the following steps.
Sign in with your Google account
Click on “Create Agent”. Provide the Agent Name and Click on Create. The agent’s name cannot contain whitespaces. If you have an agent already, click on the drop-down and select the agent.
Create Intent. On the left menu, click on Intents. On the resulting screen, click on “Create Intent”.
Provide the following details:
IntentName: GetProductInfoIntent (same as the intent name in VoiceWorx)
TrainingPhrase: Keyword to invoke the intent (same as an utterance for the intent in VoiceWorx)
Action and Parameters: For intents that contain parameter (corresponding to Slots in VoiceWorx), Provide the parameter details. The parameter name shall be same as the slot name in VoiceWorx. Provide the entity type as @sys.any. You can select from the available entity types as per your parameter type or also create custom ones.
The user can also set the prompt message to ask the user input for the parameter value. Click on the prompts section and provide prompt messages.
Scroll down to the “Fulfilment Section” and select “Enable webhook call for this intent”.
Click on Save.
Now to set up for webhook, on the left navigation, click on Fulfillment. Enable the Webhook toggle and provide the URL to ixHello.
Depending upon where your app is located in ixHello, provide the following URLs.
Development/ Staging: https://channeltest.voiceworx.ai/api/v1/google
Production/ Live: https://channel.voiceworx.ai/api/v1/google
For testing the agent, use the try it now section.
Start with the training phrase you set up in step 6.b. i.e. find product
Provide the product name value as ‘apple watch’ after the agent asks for product name and you shall be able to get the following response.
The agent has been tested successfully.
Depending upon whether the app in VoiceWorx requires account linking or not, you can set integrations on Google DialogFlow. For the purpose of this demo, we proceed with Integration without account linking.
Click on the Integrations menu, and then on “Continue with Integrations” on the main screen.
On the resulting screen, ensure that “Sign in Required” is unchecked and click on Manage Assistant App.
Now to test the app, let’s link the assistant with ixHello agent.
Go to the Dialog Flow page, click on the gear icon as shown in the image, and copy the project ID in the resulting screen.
Go to the ixHello platform, on the left navigation, click “Custom App” -> “Manage Apps” then hit the select button for the app you set up in step 1. Then Click on the Publish tab.
If the profile for the ‘Google Assistant ’ channel is already set up, click on Edit and update the Google Project ID.
Else, Add New Publish, and on the resulting dialog, make sure the Channel is set and “Google Assistant” and paste the Google Agent ID that was copied from the Dialog Flow screen to the “Google Project ID” text box
Click “Save”.
On the integrations, click on “Continue with Integrations”, Click on Test on the resulting tab.
You will be redirected to the Google Actions Console. On the Test tab, enter Talk to Product Lookup. “Talk to Product Lookup” shall be auto-generated.
Provide the training phrase set up in step 6.b. Then continue.
The successful dialog flow looks something like the screen shown above. The assistant is deriving results from its integration into the ixHello App.
For this step, you first need to gather the ClientId and Client Secret.
On the navigation go to API & Services then select "Credentials":
Download the JSON for the OAuth2 Client (Web Client) into a secure place and copy the ClientId, Secret, Token URL, and Auth Url from the JSON file.
Note: Skip this step if you have followed the Setup without account linking step above.
Click on integrations and select “Continue with Integrations” on the main screen.
Select Google Assistant and click Integration Settings in the GA Card, if the skill requires account linking select the Sign-In Required Option on the Welcome Intent.
Select the Manage Assistant app to set up the OAuth
In the Manage Assistant APP console, select Develop -> Account Linking
In the Account linking screen use these options for the OAuth configuration
Account Creation -> Do you want to allow users to sign up for new accounts via voice? – NO
Linking type: OAuth, Authorization Code
OAuth Client Information
ClientId – From the previous step
Client Secret – From the previous step
Authorization URL- https://portal.voiceworx.ai/OAuthCode/Redirect
Token URL - https://portal.voiceworx.ai/OAuthCode/Token
Testing Instructions: Your VoiceWorx registered email.
You can now test the bot and you shall receive the following output.
Click on “Integrations” in the side menu and select “Continue Integrations” in the resulting modal.
Click on “Manage Assistant App”
In the “Quick Setup” section, click the “Decide How Your Action Is Invoked”
Set the Display name
Click on deploy.
Fill in the following fields:
Description: Short and full description
Images: 2 images but only the small Logo image is compulsory. The large banner is optional. The large banner should be 1920 x 1080 px
Privacy and consent: Privacy is compulsory but the terms and condition URL is not compulsory
Contact details the developer email and name: email should be an active email
Additional information: fill in all fields that apply
These fields are mandatory and the information provided here should reflect the assistant and your company. Missing out these fields might cause issues while trying to release the app.
Click Save
Go to Company Information and fill in the following fields
Company Contact
Developer Contact
Go to brand verification and follow these instructions from Google to verify your https://support.google.com/webmasters/answer/9008080?authuser=0&visit_id=637501983465305388-959464850&rd=1
Click on Release.
Select the Alpha Release tab in the resulting pane and click on “Manage Beta Testers”
Type in the email address of your beta testers click on the “+” sign and click save. Note: emails should be a valid Google account
Click on “Save” then click on the back arrow button in front of the “Whitelist alpha testers” label to go back to the Manage Releases page
On the Manage Release page, click the “Create a Release” button.
Note: it takes between 30 minutes to 4 hrs to get a response on the release request, if there is any issue on the release request, the necessary information will be shown on this Google Actions console page.
Click on the “More info” to see the details of what needs to be fixed
Note: the privacy policy is a very common cause of Google's declining releases. It must conform to the following
The URL must link to a valid website containing a privacy policy specific to your Action.
It must be a public document that discloses how your Action collects, uses, and shares user data, including the types of parties it is shared with.
It must be available for Google crawlers to access and scan the content of the privacy document.
It must also be written in each of the languages for which your Action is enabled.
It must contain any of the following:
Action Name:
Company Email:
Developer Email:
Please see https://developers.google.com/assistant/console/policies/general-policies#user_data for more information.
Launch Google Assistant on your mobile
Say “Hey Google talk to product lookup”