Global variables are a great addition, but not being able to reset them is annoying.
Moreover, when I call flow with variables, I can not set these manually. This leads to multiple flow calls when one would have done, increasing solution complexity and is less manageable.
Please give the customiser the option to define the value of a variable. This would allow us to change a global variable and fill a variable.
I'm extremely shocked that PVA cannot do this today. Seems like a very basic operation to be able to set your own variable anywhere within the bot workflow without having to prompt for a question.
I'm going to have to create many duplicate flows where a simple variable and a case statement in the flow would have kept this much easier to manage.
We need a set of system variable that we can access such as those used for the handover to dynamics live chat and the ability for us to declare and set our own anywhere without the need to a user to set it via a question with the chatbot.
The ability to empty out or set a global variable without a question would be extremely helpful.
Personally I've been trying to tackle this issue all morning without much luck. I thought I had a fix, but since the global variables persist, subsequent actions take the input even if it is not desired (based on which global variable is listed on the left side of the canvas first). As Adam Hunt already mentioned, this would be great for allowing us to implement case statements.
Essentially, the ability to empty a global variable (or set it to a non used outcome) when we are done with it would be amazing.
Depending on the use-case, it may be possible to work around this by using a Flow / Power Automate call.
In my use-case, I want to have a single topic for escalation to a human agent in Omnichannel. I don't want to repeat all of our opening hours test logic in every situation that may lead to an escalation, I just want to redirect to that single topic - but I still want to be able to send details of what the customer was asking about to Omnichannel.
From the Virtual Agent canvas, I created a new Action, which opens Power Automate, I set the automation up as shown below.
All this flow does is take a single input, and mirrors that input back to its single output.
In the Virtual Agent canvas, I then call this as shown:
It looks like a drop-down with fixed options, but you can type free-text where I have "Password Reset" in the screenshot. This leaves me with the global "sda_TopicName" variable set to the value I want. I can then read this when I'm doing agent handover as part of the private message sent via Omnichannel. I make sure this is called as the first action in every topic so that the global variable is kept up-to-date.
It is however a horrible workaround, feels more like something MacGuyver would do. The ability to set variables directly would be a big help still!
(as an aside, I know we can set opening hours on the queue's in Omnichannel, but the user experience isn't great in that case - the bot would tell the customer they were being connected to a person, and then end the conversation with a "we're closed" message - by putting a bit of logic in the bot, it gives us options to let the customer log a ticket, and for us to show opening hours etc for a much better UX at the expense of a little dev time).