New to voiceflow, name variable and alexa routines

I just tried to make a skill that says random phrases to my little daughter every night.

I just have a couple of question: is there any chance to use a variable that gets the name of the person who is speaking? I have registered my and her voices and I would love that the skill should recognize the name linked to the voice (Alexa has it).

The other question is on Alexa routines: I already have a routine that turn off lights, light up some light in blue and then play some lullabies. I would love to add my voiceflow newly created skill with random phrases in the middle but when in my routine I click on add to add a skill, the voiceflow skill doesn’t show up. Do I have to do something specific, some configuration or add a particoular block?

Thanks a lot


yoiu can use voice recognition, called alexa personalization, and voiceflow supports it! you can downliad a demo for it.

for using your skill via routines, that skill must be certified and published by Amazon. regardless of creating a skill by voiceflow or by other tools or by coding.

Thanks a lot for your reply, I’m trying to make the alexa personalization and I will tell you if it works.

For the routine I tried to publish it but I get a certification error. I think I cannot do this for some reason. Any other hint on what I can do to do the routine?

what error says?

actually, publish means your skill is on the store in Amazon. There are many requirements to pass them.

here’s the check list.

Also, personalization will require more you to prepare terms and conditions, and privacy policy for your skill use, bacause it will handle user’s personal information.

The errore I see in console is this one:

[Property: multinationalPublishingInfo.isChildDirected, Message: isChildDirected must be null or falseif permission scopes that can be used to collect personal information from users are declared]

the name that I get with the alexa personalization can only be said with the tag <alexa:name type=“first” personId="{personId}"/> or I can also set the name as a variable and perform condition on it?

ohhh…I have never seen that error message, but remebered one important thing.

Currently, a skill for child cannot use Personalization…sorry…

as workarounds,

  • submit and publish as not child-directed skill. Whether your skill would pass Amazon’s certification or not, it will depend on your skill’s content and Amazon’s policy (If your skill is suitable for child-use, they might fail it and recommend re-certified as child-directed skill)
  • personalization use person_id and its name is spoken by alexa automatically, you cannot get its name directly.

As you say, you can use some conditions like if person_id is not returned, then ask name to user and remember it using a persistent variable, but its name would be linked with user_id, which is same as your Amazon account. That means, user"s" who doesn’t have voice profile will be always recognized as a single same user.

What I was trying to achieve was: get name of the user, then if it’s John do this, if it’s Mark do that, else, and something like that, but I don’t think I can

That means Alexa always ask user’s name and do something for each user differently without personalization?

  1. create a variable “Name”
  2. Speak Block: Alexa ask user’s name.
  3. Capture Block: capture user’s name as US_FIRST_NAME and put it into “Name”
  4. IF Block: depends on “Name”, branch your flow.
  5. do something for each user.

It’s ok to use personally without publishing. but you wanna use it from routine, so must be certified and published.

Thanks, I know that I can make Alexa ask for the name but as Alexa already know the name so I was wondering if I could work with that without asking as it slow the process and it’s really silly to ask for something you already have.

Anyway yesterday I was trying a different approach: my goal is to say different phrases depending on who speak to alexa, this is why I was trying to get the name as a variable, but as I can only use it on “speak” and not as a variable I was trying to work using the personId as variable.

In the userInfo block I get the personId and set it as a variable. Then I called an api that write in some log the personId so I could get my personId and my daughter personId. I made a few test and it works, the personId is always the same and it’s correctly saved.

The problem is when I try to use an if block checking if the variable is = to a specific personID.
The test I make is shown here:

2020-01-10 10_57_13-

the first strange thing is that it always show ( {personId} = NaN ) regardless on what variable I use and what value I insert, don’t know why.
The other thing is that this check always fail and goes to the else condition. I really don’t know why as the variable is correctly set. Any hint?

Thanks a lot

you don’t need to care about NaN. it just means “Not a Number”, but just “Strings”. If you set a numeric value, it will show its number.

currently I have not activated personalization, so I just tested in similar wifh user_id, which is like “amzn1.ask.account.XXXXXX” and it works. so make sure if your variable is really correctly set and also your person_id strings in If block.

Now it works, I was just making a stupid mistake. I collected the personId from another skill and tried to use the same in this skill. Each skill have a different personId. Now I add collection of personId in the correct skill and then change the code to use that correct personId and now it works flawlessly!

1 Like

Hi @wbyeats,

I’m also new to VF and I’m also searching a possibility to refer to the personId, but I always stuck on matching some values to a specific person.
Could you please explain me, how you has solved it. Maybe a little tutorial ?

Thanks a lot.