I have the following scenario, to get a US location details based on City name or zip code
"Get me the stores around Seattle" Or
"Get me the stores around 07014"
I've tried the following but obviously it wouldn't work. What's the best way to handle this scenarios using Built-in slots and without defining multiple intents
{
"intents": [
{
"slots": [
{
"name": "location",
"type": "AMAZON.US_CITY"
},
{
"name": "zip",
"type": "AMAZON.NUMBER"
}
],
"intent": "LocationInquiryIntent"
}
]
}
Utterance:
LocationInquiryIntent Get me the stores around {location|zip}
While you do have to use every slot you define in an utterance at least once, you don't have to use every slot in every utterance. In fact, you could provide an utterance that doesn't use any slot and have Alexa ask specifically for their zip code in response to neither a location or zip code being provided.
With that in mind, simply define multiple sample utterances:
LocationInquiryIntent Get me the stores around {location}
LocationInquiryIntent Get me the stores around {zip}
There is absolutely no harm in defining several permutations of the same intent, and it is in fact encouraged to help increase coverage of potential phrasing for your requests.