July 2018
Intermediate to advanced
404 pages
9h 5m
English
The GetOffset function handles GetMoreRecipesIntent by retrieving the saved user request that contains offset, foodName, and dietTypes. They way you save the request to Redis is by using user identification as the key. In Alexa, you get the userId from req.body.session.user.userId, whereas in Dialogflow you get the userId from req.body.originalDetectIntentRequest.payload.user.userId. Next, you would need to build queryObject the very first time in order to save it to Redis, so that you can handle the user requesting more recipes based on the foodName and dietTypes the user previously requested. The first-time offset will be set to 0 and on consequent requests, the offset will be incremented by 3. For the ...
Read now
Unlock full access