Conversational Actions Location Permission Deployment Error

google-assistant

#1

Hi,
I want to access the users location like described here:
https://developers.google.com/assistant/conversational/permissions

It is working if I do it in the browser. But it gets overwritten for each model deployment. Therefore I added a scene to in my model which looks good in the browser.

But the model deployment will always result in google sending me a “already granted” statement without adding the location in the request (like it did in the approach before). After debugging some time I found out that the only difference are two spaces added when deploying via jovo (see screenshot arrows). @AlexSwe @Max is there a issue with the jovo deployment or are these templates set by google?


#2

Hey @Andre,

can you show me an example of your Language model with which you build and deploy?


#3

yes @rubenaeg here is my scene I deploy in the custom google part of the model:
custom: {
scenes: {
GetLocationPermission: {
conditionalEvents: [
{
condition: ‘scene.slots.status == “FINAL”’,
handler: {
webhookHandler: ‘Jovo’,
},
},
],
slots: [
{
commitBehavior: {
writeSessionParam: ‘deviceLoc’,
},
name: ‘deviceLoc’,
required: true,
type: {
name: ‘actions.type.Permission’,
},
},
],
},
},
}


#4

As far as I can tell from testing this, the config is automatically generated on deployment. However, you can override this by passing a config to your slot in the language model:

  "googleAssistant": {
    "custom": {
      "scenes": {
        "GetLocationPermission": {
          "conditionalEvents": [
            {
              "condition": "scene.slots.status == 'FINAL'",
              "handler": {
                "webhookHandler": "Jovo"
              }
            }
          ],
          "slots": [
            {
              "commitBehavior": {
                "writeSessionParam": "deviceLoc"
              },
              "name": "deviceLoc",
              "required": true,
              "type": {
                "name": "actions.type.Permission"
              },
              "config": {
                "@type": "type.googleapis.com/google.actions.conversation.v3.PermissionValueSpec",
                "context": "I need your device location in order to process your request",
                "permissions": ["DEVICE_PRECISE_LOCATION"]
              }
            }
          ]
        }
      }
    }
  }


#5

@rubenaeg thanks! I posted this solution yesterday here but it seems that something went wrong there. it’s working. Thank you =)


closed #6