I'm newbie to Alexa skill development, implementing a skill which collects analytic data from external web service. The scenario is that the web service api expects 3 parameter that is required and few optional parameters used to fetch more precise data. Below are required parameters with short notes.
1. Dimension - this is a string value
2. Metric - this is a string value
3. timeRange - This is the format fromDate ~ toDate. Example : 22/01/2017 22:33 ~ 28/01/2017 31:19.
Skill is designed in such a way that it should collect all the above three parameters. Have configured slot type Dimension and Metric (as required) , and timeRange data is collected dynamically based on user say from FaaS using :elicitSlot. We are clear collecting first two parameters but collecting timeRange is bit challenging since we are not really sure how user can ask for data. User can ask data for any of the duration type like for last 5 days/ last 2 hours/ from date to till date / between two any date and will server data one out of all.
To understand the user need, i have created a custom slottype which contains days,hours,months , betweentodate as value and related synonyms that helps us to know duration type. Based on this data a mapping has been taken care which :elicitSlot specific slottype dynamically.
For example: If user is interested in data for last 7days, he will choose days and related slotType is elicited to collect Number of days in this case.
At present , i'm using :elicitSlot in helping function and i to want ask intent confirmation once collecting all this 3 values. My question here is, is it right to keep :elicitSlot in helping function that takes care of dialog delegation rather than keeping it in handler.
Also, want to know how to achieve intent confirmation using nodejs.
Appreciate you help.