End workflow Conditions
# 🤝help
f
Hello all, My problem in a nutshell: My end workflow has a flow which is only necessary if the bot has been spoken to by the user. I am using two expressions. One to check if the user inputted a name. one to check if the user has not inputted a name. The reason i am doing that. This will determine if the bot has been spoken to as asking for a name is one of the first nodes. I have tried this is the main workflow. works fine. In the end workflow it does not work. I correctly added by types of variables in the end workflow. User and workflow. Both do not work. Conditions used: to check if the variable does not have a value: workflow.ClientName !== null to check if the variable has a value: !workflow.ClientName any help would be much appreciated.
f
The workflow scope means that it only works on that specific workflow unless you transfer them, but this is not possible to do to the timeout or end workflow. Can you verify that the same expression doesn't work when you change the scope to user
f
Hello decay! Yes thats correct i can confirm i have also tried with user variables. in this case... user.userName
I have just quickly created a demo bot for this. the main workflow asks for a few details, converts a workflow variable to a user variable. In the end workflow there are two flows, one where it detects a user name, and one which does not. You can test it out, it always decides there is no username.
this has been solved.
for anyone wanting to know... the card used to capture the name was a persons name card. therefore this is stored as an object. to solve this: in the condition you must specify the .first or .last. so it would be in this case: !!user.userName.first = if there is an input !user.userName.first = if there was not an input