how to configure live agent chat context variables to link with survey response?

Rudranarayan P2
Tera Contributor

can we link pre-chat survey questions/options to live agent chat context variables? How? Note that we are not using virtual agent. We want to pass the pre-chat survey responses(choices) to chat context variables and then eventually route the customer to respective group/queue, based on his selection. 

1 REPLY 1

abdulrehmanArif
Tera Expert

Hi,

Yes, this is possible, but the routing should be done through Agent Chat / AWA configuration, not by trying to manually link the survey response directly to an assignment group.

The supported pattern is:

Pre-chat survey question → Chat context variable → AWA queue routing condition → Eligible agent group

You can do it like this:

  1. Create the chat context variable

Go to:

Conversational Interfaces > Settings > Context variables > View All

Create a new context variable for the value you want to capture from the pre-chat survey, for example:

  • Category

  • Product

  • Department

  • Support Area

  • Request Type

This context variable will hold the user’s selected pre-chat survey answer.

  1. Map the pre-chat survey question to that context variable

Go to:

Survey > Survey Designer

Open your pre-chat survey and make sure the survey is configured as a Chat Survey.

Then open the question properties for the choice question you want to use for routing. In the question properties, use the Context field to map that question to the chat context variable you created.

For example:

Question: What do you need help with?
Choices: Billing, Product, Order
Context: your chat context variable

Once the user selects an option, that response is stored in the chat context.

  1. Configure the pre-chat survey configuration

Go to:

Conversational Interfaces > Settings > Pre-chat surveys

or configure it from the Conversational Interfaces settings area, depending on your version/UI.

Make sure your pre-chat survey is active and is the survey being presented before the live agent chat starts.

This part is important because the pre-chat survey must run before AWA evaluates the routing condition.

  1. Configure AWA queue routing based on the context variable

Go to:

Advanced Work Assignment > Queues

Open or create the queue for the Chat service channel.

In the queue routing condition, use the condition builder and dot-walk to the chat context fields:

Context > Interaction Context fields

Then select your context variable and configure the value.

Example:

Context.Category is Billing → route to Billing Support queue
Context.Category is Product → route to Product Support queue
Context.Category is Order → route to Order Support queue

After that, configure the Eligibility Assignment related list on each queue so the correct agent group is eligible to receive work from that queue.

So in simple terms:

If the customer selects “Billing” in the pre-chat survey, the response is stored in a chat context variable. AWA reads that context variable in the queue routing condition and sends the chat to the Billing queue/group.

One thing to be careful about: validate the actual stored value of the choice, not only the display label. Your routing condition must match the value that is stored in the context.

Also, since you mentioned that you are not using Virtual Agent, that is fine. This does not require a Virtual Agent topic. Pre-chat surveys and chat context variables can still be used with Agent Chat / live agent routing through AWA.

Abdul Rehman
XAAS Solutions LLC