2
votes

I'm using Dialogflow (previously API.ai) to create an Actions on Google app.

Using Dialogflow I have set up a custom Entity to highlight single words from multiple Intents.

ie. mashable, recode, bbc sport are all words picked up as Entities.

The fulfilment sends a post webhook to an api I created.

When using Dialogflow it sends off

"parameters": {
    "news-agent": "BBC Sport"
},

Which is fine, I set up API to detect the parameter and when using Actions on Google simulator

"parameters": {
    "news-agent": ""
},

The parameter is blank, I don't see anything in the documentation about why this is happening.

Could someone help?

1
just for debugging can you try to set this param to required and see the simulator asks you to insert it. and make sure that when using the simulator news-agent value is one of the possible values inserted in your entityAyoub
I'm checking out my webhook in the simulator, which does use Dialogflow as an intermediary. I'm not seeing any parameters in the simulator logs, but it still works as expected. You may need to test using the Dialogflow simulator if you're curious about the request params, or log it in the webhook.Nick Felker
Concur with @Ayoub. Can you also show some screen shots about what the test in the simulator look like and how the Intent and Entity are configured?Prisoner

1 Answers

0
votes

It's possible that Actions on Google is not picking up a value for the "news-agent" slot.

Try making the "news-agent" slot required in Dialogflow and define a re-prompt question for it.

That way, the event won't be sent to your app unless the "news-agent" slot is filled.

enter image description here