In the AWA queue, is it possible to put a variable in the initial agent response?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-09-2023 02:39 PM - edited ‎01-09-2023 02:40 PM
Hi,
In the AWA queue, is it possible to put a variable in the initial agent response?
I would like to put the Agent's name and the Customer's name, like this:
"Hi {CustomerName}! My name is {AgentName}, how can I help you?"
If not, is there any other way to include this custom phrase in the chat service after distributing the AWA in the queue?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-02-2023 10:08 PM
Hi @Dalto Roberto ,
Can you please try with replacing below code in 'Greeting response' script in "Start Segment Properties" of Live Agent Support topic(as mentioned above screenshot);
(function execute() {
var originalUser = gs.getSession().impersonate("system");
var agentName = sn_connect.Conversation.getAgentName(originalUser);
var msg1=gs.getMessageLang("Hi {0}!",[vaInputs.user.first_name]); //{CustomerName}
var msg2=gs.getMessageLang("My name is {0}, how can I help you?",[agentName]); //{AgentName}
return msg1+' '+msg2; //"Hi {CustomerName}! My name is {AgentName}, how can I help you?"
})()
I hope this solves your issue.
Mark this as Helpful / Accept the Solution if this clears your issue.
Thanks,
Ratnakar