Hi,
I am using the DF CX Messenger integration and noticed there is a JavaScript function to set additional query parameters (https://cloud.google.com/dialogflow/cx/docs/concept/integration/dialogflow-messenger/javascript-func...). I have used this and I can see query parameters been sent over the network, but how do I access these in Dialogflow CX? I thought I could use $session.params.<parameter_name> but this doesn't seem to work.
Can anybody advise please?
Thanks!
Solved! Go to Solution.
you will need to specify them like this:
const dfMessenger = document.querySelector('df-messenger');
const queryParameters = {
parameters: {
test: "hello"
}
};
dfMessenger.setQueryParameters(queryParameters);
then you can access it like this: $session.params.test
you will need to specify them like this:
const dfMessenger = document.querySelector('df-messenger');
const queryParameters = {
parameters: {
test: "hello"
}
};
dfMessenger.setQueryParameters(queryParameters);
then you can access it like this: $session.params.test
Ah, thank you! It seems the documentation is missing the "parameters" key in their example. This worked for me!
awesome!
User | Count |
---|---|
2 | |
2 | |
1 | |
1 | |
1 |