Announcements
This site is in read only until July 22 as we migrate to a new platform; refer to this community post for more details.
Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Is Dialogflow CX Messenger "endUserMetadata" (setContext) available to be used within DF CX?

Hi,

I have noticed in the new DF CX Messenger you can set context (used for Generative Personalization) - https://cloud.google.com/dialogflow/cx/docs/concept/integration/dialogflow-messenger#setcontext

Can I access these values directly within the agent too programatically?  I would like to use it for other reasons within the chatbot conversation (as I can't send standard query parameters with this or the previous Messenger widget, this may be a neat workaround).

Thanks!

0 5 819
5 REPLIES 5

Hi!

I do not think so. You can get the Agent Gen AI information: https://cloud.google.com/dialogflow/cx/docs/reference/rest/v3beta1/GenerativeSettings

And you can specify the context in the webhook too: https://cloud.google.com/dialogflow/cx/docs/concept/generative-personalization

What you can do is to set the context as a session variable as well or store it in an external DB so you can retrieve it!

Best,

Xavi

I am setting it in the context of the webhook using the example in the docs
and I can see it getting passed in the queryParams of the POST from the
widget.

What do you mean by this part:

"set the context as a session variable"

How do I do that?

Thanks!

yeah, so you can set session parameters (variables) that you can retrieve it from the webhook and from the conversation:

https://cloud.google.com/dialogflow/cx/docs/concept/parameter#session

Apologies, I meant is there a way to get the context into the session
variables.

The new messenger widget doesn't allow session parameters to be sent then,
which is a real shame. For example I may want to pass details from a
website's session storage to DF CX. We are doing it via our own chat
widget, just a shame it's not supported in the latest messenger widget.
For example, a method called setSessionParameters we could call within the
widget to set these variables would be ideal. A bit of a missed
opportunity in the messenger widget ...

yeah, agree. At this time I would just suggest to have a separate service that stores the context so you can get it from there at anytime