I have used the Alexa dialog model to build my skill in which I have some slots that are not required.
I use the intent confirmation to summarize the information captured before saving it to my system. In the intent confirmation I have built the reply to gracefully support the fact that some slot may not be present.
<speak> You want me to schedule a monthly task <s>{TaskName}{TaskSpecific}</s> <s>assigned to {TaskAssignee}</s> <s>to be done {MonthlyTaskFrequency}</s> <s>on the {DayOfTheMonth}{DayOfTheWeek}?</s> </speak> Examples: {MonthlyTaskFrequency}: Every X months {DayOfTheMonth}: On the [ordinal number] {DayOfTheWeek}: Optionally specify a day of the week So we get: Every 2 months on the 23rd, Every month on the 2nd Monday, etc...
From experiment I have found that if the {DayOfTheWeek} is not provided then testing the skill in the console would return at intent confirmation a generic non-descriptive error.
I have since then found that either if the DayOfWeek is null or an empty string that would trigger the error.
I have work around the issue by initializing the slot value to a whitespace which is of course less than ideal.
The minimal solution would be that at least Alexa successfully builds the response and tolerate null values for non-required slots (or at least return a more descriptive error).
Over time as people invest in the dialog model I think it would be great to support minimal conditional response template formatting.
Example something like:
<speak>
You want me to schedule a monthlytask <s>{TaskName}{TaskSpecific}</s> <s>assigned to {TaskAssignee}</s> <s>to be done {MonthlyTaskFrequency}</s> <%if DayOfTheWeek is null%> <s>on the {DayOfTheMonth}?</s> <%else%> <s>on the {DayOfTheMonth}{DayOfTheWeek}?</s> <%endif%> </speak>