/
How do I use Google's Helpers?

How do I use Google's Helpers?

Helpers tell the voice assistant to momentarily take over the conversation to obtain common data, such as a user's full name, date and time, or a delivery address. See also Actions on Google Helpers for the JSON of helpers.

You can configure a helper to trigger an intent without users having to invoke the intent.

To add a helper intent to Dialogflow console:

  1. In the Dialogflow console, add the intent for which you need helpers.

  2. Add a respective event to that intent.

  3. Click Save.

  4. In the Experience Designer, select a flow.

  5. Drag a function node to the canvas.

  6. Copy the JSON code (see sample code below) and paste it into the function node.

  7. Connect the function node to wherever applicable. The following image shows a sample flow.

  8. Deploy the flow.

The following code creates a helper intent that creates a list, from which users can select an option, for smart display devices such as in the following image.

Sample JSON Code

var json = { "payload": {    "google": {      "expectUserResponse": true,       "richResponse": {        "items": [{          "simpleResponse": {            "textToSpeech": "Choose a item" }           }] },       "systemIntent": {        "intent": "actions.intent.OPTION",         "data": { "@type": "type.googleapis.com/google.actions.v2.OptionValueSpec",           "listSelect": {            "title": "Hello",             "items": [{ "optionInfo": { "key": "first title key" }, "description": "first description", "image": { "url": "https://developers.google.com/actions/images/badges/XPM_BADGING_GoogleAssistant_VER.png", "accessibilityText": "first alt" }, "title": "first title" }, { "optionInfo": { "key": "second" }, "description": "second description", "image": { "url": "https://lh3.googleusercontent.com/Nu3a6F80WfixUqf_ec_vgXy_c0-0r4VLJRXjVFF_X_CIilEu8B9fT35qyTEj_PEsKw", "accessibilityText": "second alt" }, "title": "second title" }] } } } } } } msg.alexaResponse.response.payload.google.systemIntent = json.payload.google.systemIntent; return msg;

If you get the value in payload.orginalRequest.source as google, then inject the JSON code into the response object.

Related Articles

Related content

Create a Dialogflow Agent
Create a Dialogflow Agent
More like this
How to create an agent and link accounts in Google Dialogflow
How to create an agent and link accounts in Google Dialogflow
More like this
List Mapping
List Mapping
More like this
Bot Provider V2 node
Bot Provider V2 node
More like this
3.2.1 Launch Node
3.2.1 Launch Node
More like this
3.2.4 Bot Manager
3.2.4 Bot Manager
More like this