Capture Block Error - works in VF Prototype, but returns 0 in ADC and Echo

A simple capture block to get the name.

  • Works in VF prototype.
  • But returns 0 in ADC and Device.

What seems to be going wrong here?

Here is the VF project link.

because you use custom slot type with no values, which help Alexa to recognize which slot type matches with. 0 means Alexa does not understand it as the value of “name” slot.

Capture Block does not return any values if it does not match with slot type. You should:

  • use Choice Block. Choice Block goes to else path if it does not match with any intents (and utterances and slot type.)
  • If you still wanna go with capture block, after capture block, check if the variable has any value other than 0, which means Alexa recognize what user said as a slot value.

Basically, you should use built-in slot type if available for your use-case. If not, use custom slot type WITH some values for hints to alexa recognize.

Hello Kun,

Thanks for the quick response.
Based on your suggestion, I used a combination of Capture and Choice Blocks and am able to successfully capture user input, using Custom Slot.

Works on VF Prototype perfectly.

However, I was surprised to see that Alexa (both in ADC and Device), converts the case to Lower Case…

Here is the Project Link.

Please see if you have a comment to fix this problem.

Works on VF Prototype perfectly.

Basically, in ADC or Echo device environment, capturing what user said as natural language understanding and convert it into texts are by Amazon’s cloud. I guess VF Prototype uses different method for natural language understanding (because this is not opened by Amazon). So, IMO, if VF prototype works, then it should work on ADC? Sometimes no, unfortunately. So, I recommend you should always use ADC test simulator. (In my end, I don’t use VF prototype because of the reason above and VF prototype does not work well in my language,JP.)

Also,

However, I was surprised to see that Alexa (both in ADC and Device), converts the case to Lower Case…

We don’t know how alexa converts it as texts. This is anotther reason that you should test on ADC and know how alexa converts before publishing. Tests in the real world are very important.

In your case, you seems custom slot types for “name”. I am not sure if this is human name or not, but Alexa does not understand that this is a name and the first letter should be capitalized. Custom slot types is just the collection of values, and does not have any meanings as name, I guess.

You can capitalize it using Code Block if you need. I have not tried but like this.

name = name.charAt(0).toUpperCase() + name.slice(1);