If Block capitalization issue

I’m new to Voiceflow and trying different blocks to better understand it. I’m currently trying to set up an “If” command based on predefined slots. However, it appears that capitalization matters in this context, which surprised me. So, for example, if I want the “if” to be the {color} = red, when I type in “red” in the prototype, it works correctly. But if I capitalize “Red” or I speak it (when it automatically capitalizes the R in red), the connections don’t work. Do I have to set parameters for slots to include capitalizations? I thought that wasn’t an issue, but it seems to be in this case. Thanks for any clarity you all can offer.

In my end, a value from a slot seems always lower-case, but it might be different based on your context and your slot type, I’m not sure…

s 197

Anyway, if you wanna make a value upper-case or lower-case, you can use code block like this.

color = color.toLowerCase();

Exactly what Kun says. Even within the same list slot type, some words might be capitalized and some might not be. It is best to convert to lowercase. Here is an example from AMAZON.Food, where I uttered “avocado” and the variable got populated with “avocado”. Then I uttered “swiss cheese” and this time the variable got populated with “Swiss cheese,” with "Swiss capitalized. As a result, I would need to convert to lowercase if I want to keep things simple for IF conditions, or if I am going to use these as parameters/filters for API calls.
: