Messenger JS SDK Context Data after Chat Deprecation - Accessing Conversation Context in Web Messaging

With the deprecation of chat and the shift to web messaging, I'm trying to understand how we'll manage conversation context data going forward. Currently, we're using the Messenger JavaScript SDK's database functions to send conversation context data, and accessing attributes like context.firstName within our scripts.

My question is: Once chat is fully deprecated, will we still be able to use these built-in context attributes (e.g., context.firstName) directly within our agent scripts? Or, will we need to start passing this information as custom variables for use in scripting?

Any clarification on how conversation context will be handled in web messaging after the chat deprecation would be greatly appreciated. Thanks in advance!

Hello,

I am a bit confused with the question.
Are you using Genesys Widgets (user interface) and its API commands? This was WebChat v2.
Or are you indeed referring to the Messenger Javascript SDK which is based on Web Messaging (and not WebChat)?

With WebChat v2 and Genesys Widgets, you could set attributes which were stored as participant data - with a "context." prefix. I mean defining "firstName" in the WebChat open/create request was creating a "context.firstName" attribute in the conversation participant data.
With Web Messaging, you can set the same participant data using the Messenger Database commands. They just don't have this "context." prefix anymore. Setting a "firstName" attribute using the Database command will result in a "firstName" attribute in the conversation's participant data.

If your question is about the Script built-in variables for Chat - like here for Chat.Customer First Name.
There are no equivalent Script built-in variables for Web Messaging.
You would have to declare a variable in your script and define it as Input (Input toggle enabled).

Defining an Input variable in your Script for Web Messaging is the same process than for Chat. As it was described here.

Regards,

I'm using the actual Messenger JavaScirpt SDK. So we don't have to use the context anymore. Great! Is still limited to just those few fields?

I am not sure I understand. Can you provide more details on what you are doing?

Do you mean that you are defining a "context.firstName" key using Database.set?
I mean something like:

Genesys("command", "Database.set", {
  messaging: {
    customAttributes: {
     "context.firstName": "Jerome"
    }
  }
});

And how are you using this in a Script? Defining a variable with Input toggle enabled and name "firstName"?
Or were you referring to the built-in variables?

Regards,

No, there are no default ones like there were in chat and there is only the participant data limits. So, firstName could be first_name if you want.

Right we're using this data to make the agent interface better. if we push the first and last name over, then the name appears in the web messaging dialog. If we don't push the information over then it just shows as participant.

This part works differently in Web Messaging. I mean the name appearing in the conversation message dialog/history. This is based on External Contact matching. But I don't have a lot of experience on this myself.

If I send the firstName & lastName it will show like it did for chat. But if I want it to appear elsewhere, then it has to be sent as an authenticated message.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.