Is there a way to get variables from the website where I publish the bot? That is, the client is already logged in on the website and suddenly starts using the bot, so as not to have to ask him for his name again, for example, since he is already logged in, is there a way to collect that data?
How do I configure the question node? because I have already tried many ways and there is no way for me to skip the question, it always comes up.And it doesn't go to the next message until something is written.
I put screenshots of the configuration of the question node and the variable.
Thank you very much, Adilei, I'm going to try it
The question node itself will assign the value, and the user will not have to write anything - as the question is embedded in "Conversation Start". It's fine if the question isn't empty because it won't be shown. In short, try the solution I posted here, it works, I promise 🙂
For everyone on this thread, here is the complete solution:
1. Add a question node to your Conversation Start topic that will populate a global variable. Allow setting the variable from external sources.
kind: AdaptiveDialog
beginDialog:
kind: OnConversationStart
id: main
actions:
- kind: Question
id: question_ZOc4Os
interruptionPolicy:
allowInterruption: true
variable: init:Global.myParam
prompt: external variable
entity: StringPrebuiltEntity
- kind: SendActivity
id: sendActivity_Yfykys
activity: "Your value for myParam is: {Global.myParam}"
2. When embedding the copilot in your website, append a parameter with the same name as your global variable to the copilot URL.
For example:
https://web.powerva.microsoft.com/environments/env_id/bots/bot_id/webchat?__version__=2&myParam=myValue
When the conversation starts, the question will be skipped, and the variable will be populated from the URL parameter:
The question is omitted, okay. But the client will have to write something to retrieve the variable, right? And at some point I will have to make that assignment of the Clientid variable of the url with the Global Clientid variable created, right?
I have also tried what you mentioned and it won't let me create a blank question.
The question node is just a way to capture an incoming value. When the conversation starts, the question will be skipped and won't be presented to the user.
I have the same problem as you, ElenaAA. I've been researching for several days and I've looked at Microsoft's documentation twice. If at any time you manage to solve it, please share
But then if I ask it as a question, why do I send the variable through the url to the bot? What I supposedly want is that when the client opens the bot without asking anything, he directly sends a variable to the bot and with this variable, with internal processes, the bot responds one thing or another. For example, I don't want to ask the client again what his name is if he has already logged in to the website.
I guess it's not that clear in the docs - you need a question node in order to "capture" the incoming value:
Thanks for your reply. I have been testing and as I understand, in the call to the bot from the web I have to pass the parameter, for example, after the code I had, I put "&ClientID=5". Then in copilot I have to create the variable and put it with the same name as Global and that it can receive external data, but it asks me to assign a value, what should I put
Saludos y gracias
Romain The Low-Code...
66
Pablo Roldan
55
stampcoin
10