validating if variable already exist/ has a value
# 🤝help
m
Hi, My bot asks the user for the users information before opening a zendesk session. but there are senerios where the bot already has the information. and when it already does it would ask it unnecessary for a second time. How do i make a check for this? aka, when the bot already has the user.name it doesn't ask for the user information again but skips that step to open the zendesk session
a
You could use an expression card to tell your bot what to do when variable is filled
In my bots I create an expression card with the condition "workflow.variablename === '' so the bot will know if the variable is empty, it should ask the question you want, and if it's not, the conversation will go to a different path
e
In your Capture card settings you can enable the "Skip if variable is already filled" option, that way the bot won't try to capture the variable again
2 Views