Skip to main content
APIs involved: Chat Widget JS API, Configuration API, Customer Data Platform API Suppose a customer starts a chat and you want your support agents to see their subscription plan, recent order history, or account tier without switching tools. There are two ways to get that data in front of agents, and they serve different purposes.
The lightweight path. The Chat Widget JS API’s set_session_variables call attaches arbitrary key-value pairs to a chat before it starts. When a customer opens the widget, your page calls:
Those values appear in the agent’s view under the customer details panel. They’re visible during the chat but not stored in Text’s customer records.Use this when the data is contextual and changes per visit.