0

Created a Custom Slot Type CURRENCIES with values

USD
JPY
CNY
SGD
HKD
CAD
NZD
AUD
CLP
GBP
DKK
SEK
ISK
CHF
BRL
EUR
RUB
PLN
THB
KRW
TWD

tested successfully with Value INR, GBP, EUR.

However during Certification got feedback

When attempting to invoke the skill using an example present in the example phrases or the skill’s description, the skill returns a non- contextualized response or error. All customer facing example phrases must function without error since these are interactions that users are most likely to try.

Steps To Reproduce: [Second Example Phrase]

User: "Alexa, ask XXX to convert bitcoin to i n. r."

Skill: "I didn't quite get that. Please provide currency to get bitcoin value?"

Please see test case 3.1 from our Submission Checklist for guidance on example phrases.

When I run test case with i n. r. it fails.

How to map i n. r. with INR? Similar examples given in certification report g b. r. , e u. r.

Amod Gokhale
  • 2,346
  • 4
  • 17
  • 32

1 Answers1

0

Here is how I fixed this. Any other solutions?

var tmp= this.event.request.intent.slots.CURRENCY_TO.value;
     if(tmp){
        var curr= tmp.toUpperCase().replace(/[\W_]/g, "");

Custom Slots validations needs to be handle in code. Reference - https://developer.amazon.com/docs/custom-skills/handle-requests-sent-by-alexa.html#input-errors

Amod Gokhale
  • 2,346
  • 4
  • 17
  • 32