Global commands and if block

Hi everyone! I am a new here. I am just trying to build a skill by iterations.
I have a few questions. Unfortunately, I didn’t find the answers in docs and tutorials.

  1. I have a custom slot variable {type}.
    When the user says the {type}, I need to figure out what type is it. I use if block: {type} = Kundalini. And it does not work. Else branch activates.
    UPDATE: I changed “expression” type to “value”, and it starts working. But I have Slot Synonyms. I have to add all of them in if block? Can I map them somehow?

  2. I added a “random flow” to commands and tried to test it. And I had no response (the flow is not empty). Why?

  3. I am capturing a user’s name with choice block. Slot type US_FIRST_NAME. I can say things like “my name”, “testing”, “asdasad” instead of name. And it will capture as a user’s name, the else branch is not activated. Why?

Thank you for you help

{user_name} slot settings

  1. you can create synonyms when adding custom slot values. remember its value is always passed as main value, not synonims.(ex. main value is tea and synonim is ‘iced ted’, if user say ‘iced tea’, value will be ‘tea’)

for 2 and 3, you should test on Amazon Developer Console, not on Voiceflow. IMO, Voiceflow test is for simple and instant logic test, that means not simulate everything Alexa does.

1 Like

Thank you for your help! Unfortunately I have all this settings and it does not work(((




Maybe I did something wrong in if block?

again, recommend you should test on ADC. voiceflow’s test is not perfect and some feature doesn’t work.

1 Like

Thank you) I’ll try))

also, recommend to use mic when you test. then you can check how alexa recognize your utterance. This is so important because Alexa’s recognition is not perfect and sometimes will be different from what we expect.

1 Like

I appreciate. It will be my next iteration of testing)

Hi Kuniaki, I’m experiencing the opposite with slot synonyms - if a user says ‘iced tea’ and it is a synonym to a slot value then the value is stored as ‘iced tea’ not the main value ‘tea’

Did something change with VF to reverse this logic from when you posted this?

In my end, seems no problems.

s 291

did you extend built-in slot type, not custom? If so, I just checked it too and found custom values and synonims added to built-in slot type are not enhanced to ADC. will report as a bug.

I used custom slot.

I found last night that it does work as expected in ADC, it captures the slot synonym and uses the main slot value – but in VF it does the opposite, so in your example, in VF it will store ‘iced tea’ as value and in ADC it’s the main slot value as you shown here

“in VF” means you tested in voiceflow’s test? I recommend to use ADC for test. Voiceflow’s test is good for simple logic testing but sometimes works differently especially for alexa-specific features.

Correct “VF” like in prototype test gives different result. Agree - always test in ADC for more accurate testing/results