Closed fitsie007 closed 5 years ago
You probably want to use session storage:
public ActionResponse simpleResponseAppData(ActionRequest request) {
ResponseBuilder responseBuilder = getResponseBuilder(request);
Map<String, Object> data = request.getConversationData();
data.put("count", 1);
return responseBuilder
.add("Hi there, what can I help you with today?")
.build();
}
I intend to do something like the following:
The conversation will flow with textual training responses until about the fourth follow-up. I would then like to access the parameter, from say the second-follow-up, using a web-hook. Are you saying I would have to convert the intent that gets the parameter to one that uses a web-hook in order to access contextual parameters? I thought since the parameter is in the context, I would be able to access it without making an additional web-hook with session storage.
Closing due to no direct issue with the client library itself. This is a general question and is better suited for Stack Overflow -- Github issues are for reporting bugs contained in Actions on Google samples or client libraries, thank you for understanding.
What is the best way to retrieve a parameter from a parent context for use in a follow-up intent in actions-on-google? The DialogFlow documentation shows how to retrieve a parameter manually (https://dialogflow.com/docs/contexts/input-output-contexts), but I would like to access a parameter at a certain depth/lifespan within a series of follow-up intents. For example, I have tried something like the following, but it doesn't work.