Virtual Agent - Rate their experience topic
Hi there,
To provide the Virtual Agent with a "rate their experience" option, I've worked on a Chat Satisfaction topic. The idea coming from Surveys, etc. that we are using, as well as the ServiceNow Support video "Virtual Agent Overview" which briefly mentions a "rate their experience" option.The topic is not 100% there yet, though enough to share!
In short:
At the end of the conversation, the consumer is being presented with a nice carousel. The option selected is written to a new "Chat Satisfaction" table and the conversation is now definitely finished.
A preview of the end result for the Consumer:
You might at some point not want the Chat Satisfaction to appear any more or just randomly. To fulfill this, two Script Variables have been set up.1) chat_satisfaction_level: always / random / none.2) chat_satisfaction_number: integer which is used in the randomizer.
These Script Variables are easy to edit and a bit like how they are used in out-of-the-box Virtual Agent Topics. Though, you could easily tie these to System Properties and add those System Properties to the Virtual Agent System Properties pages.
At this moment, the follow-up on the Chat Satisfaction is up to you. For example, if the rating is poor, you could add a redirect to a Live Agent, generate an e-mail notification, generate an incident, etc.. Incorporating the results into the - Madrid - dashboard would also be a possibility.
So what has actually been set up?
The big picture:
The details:
1) Setting up Script Variables. chat_satisfaction_level in this case "always", topic your topic sys_id, chat_satisfaction_number in this case "5".
You could also use System Properties for this. Script to be used in that case would be something like:
(function execute() {
return gs.getProperty('qt_va.chat_satisfaction_level');
})()
2) The transitions after the first Decision Utility are scripted. In case of "always":
(function execute() {
return vaVars.chat_satisfaction_level == 'always';
})()
3) The Script Action Utility script is made of:
(function execute() {
vaVars.randomInt = Math.floor(Math.random() * vaVars.chat_satisfaction_number) + 1;
})()
4) On the Text Bot Response "Thank you", the Response Message is:
Thank you for having a chat with me!
5) On the Text Bot Response "Chat opinion", the Response Message is:
My colleagues and I are interested in your opinion about our chat.
6) The Carousel User Input consists of a bit more work.
Prompt would be:
Could you express how you feel about our chat?
Scripted Acknowledge Message would be:
(function execute() {
return gs.getMessage('qt_va_cs_' + vaInputs.chat_satisfaction_survey.getValue());
})()
Scripted Carousel Item Setting would be:
(function execute() {
var options = [];
var grChoices = new GlideRecord('sys_choice');
grChoices.addEncodedQuery('inactive=false^name=qt_va_core_chat_satisfaction');
grChoices._query();
while(grChoices._next()) {
options.push(
{
'Name': gs.getMessage(grChoices.getValue('label')),
'Value': grChoices.getValue('value'),
'Body': 'qt_satisfaction_smile_' + grChoices.getValue('value') + '.jpg'
}
);
}
return options;
})()
7) As you can see, in the previous step the sys_choices table is being referenced as well as some JPG images and gs.getMessage.
The images are available here: positive / neutral / negative / opinionless.
The sys_choices are on a new custom table. The custom table contains fields:
Topic [Reference, sys_cs_topic]
Rating [Choice]
Consumer [Reference, sys_user]
The choices on Rating being:
Stoked [positive]
Mwah [neutral]
Crook [negative]
**** off [opinionless]
To fulfill the gs.getMessage and Internationalization, add records to the sys_ui_message table for every choice. For example:
Field Values for the Action Utility:
9) On the End Segment Properties, the Confirmation Message is:
Hope to see you soon again.
So why did I mention the topic is not 100% there yet?
1) You have to incorporate the whole Chat Satisfaction in every topic you got! At this moment it's not possible to tie topics to each other, having child topics, etc.. I've opened an enhancement request for this.2) You can't exit the carousel. As a workaround, I added an extra option (value "opinionless"). I've opened an enhancement request for this.
3) I added a Script Variable "topic" containing the sys_id op the current topic. Somehow the name of the topic should be known, though there is not a vaSystem, vaContext, vaVars, vaInputs, etc. variable that we can use for this. I've opened a Hi ticket for this.
---
Hope that this helps some of you! Questions or ideas? Let me know!
| If this post helped you in any way, I would appreciate it if you hit bookmark or mark it as helpful.Interested in more articles, blogs, videos, and Share projects on Virtual Agent I published?- Virtual Agent |
|---|
Kind regards,
Mark
---
https://www.servicenow.com/community/virtual-agent-nlu-articles/virtual-agent-rate-their-experience-topic/ta-p/2322687
