Reputation: 585
When I start an action:
OK Google talk To My Assistant
It authenticates and runs the welcome intent which loads User Entities that can be used for subsequent questions to API.AI
When I try to start an action:
OK Google ask My Assistant some question
It authenticates, but there is no way for me to load the users Entities because I do not have a sessionID for the conversation.
When API.AI tries to evaluate the some question it can't because the user entities have not been loaded.
It seems the only option is SlotFilling WebHook ... but I really do not need this (or the complexity it requires) if I have an option to define the users Entities.
Any way to get the API.AI sessionID (which is defined by Google Actions) before making the first request to API.AI ? Or any other way to get some WebHook called that contains the sessionsID before API.AI tries to evaluate some question ?
Upvotes: 4
Views: 286
Reputation: 585
Well I found a solution. I placed an input context named "EntitiesLoaded" to all of my deep link questions. Then when I issue:
OK Google ask My Assistant some question
It calls the Fallback Intent. In the fallback Intent I do the following:
Upvotes: 1
Reputation: 309
Unfortunately there is no way to preemptively get a session identifier until the session has started. Additionally, deep link phrases in general should be static or rely on entities that API.AI already knows about (not User Entities).
Ok Google talk to <invocation_name> about ... <deep_link_phrase>
Any dynamic user content will likely have to be provided during the conversation.
You may want to reconsider your design a little bit here based on what experience you're trying to create.
Upvotes: 0