The Now Platform® Washington DC release is live. Watch now!
on 05-29-2020 10:32 AM
When you purchase ServiceNow’s Cloud Call Center combined with Amazon Connect, you receive a powerful, out-of-the-box solution that delivers ServiceNow workflows to your employees through a simple spoken telephone conversation. Cloud Call Center for ITSM makes it easy to deflect your most common IT helpdesk issues automatically, and that’s great for ITSM.
But what if you want to solve customer issues as well? Luckily, there’s a simple way to extend the solution that allows you to deflect calls from customers. In this article, we will teach you how to add a simple Customer Service Management (CSM) feature that identifies callers who are customers, rather than employees, and allows them to create a new CSM case verbally. You’ll also learn about Operation Handlers and Amazon Lex Bots.
Before we start, there are several prerequisites to adding a CSM feature to Cloud Call Center for ITSM:
Now that your instance is working with the base Amazon Connect integration for ITSM, employees can start calling your helpdesk on the phone to work with ITSM employee workflows such as unlocking accounts, managing incidents, etc. Next, we’ll add some new code to handle a simple CSM Case-creation workflow.
Step 1: Determine who the caller is by looking up their phone number
How you determine the caller is one difference between ITSM and CSM. For ITSM, the caller can be found in the sys_user table, but CSM keeps this information in the customer_contact table. We’ll make a change to the base system’s lookup, so it searches customer_contact instead.
userGr = new GlideRecord('customer_contact');
Now, when callers dial in, ServiceNow will find their phone number in CSM’s customer_contact table.
Step 2: Create an Operation Handler that creates a Case record
Operation Handlers ‘listen’ for commands from Amazon Connect Lex Bots. We’ll create the ServiceNow side first. Then in the next step, we’ll move over to Amazon to create the Lex Bot. Our goal is to create a new case in sn_customerservice_case. Most of this code is borrowed from ITSM’s createIncident Operation Handler.
(function(/*CTIOperationRequest*/ request, /*CTIOperationResponse*/ response, /*context*/ ctx) {
var lang = request.getLanguage();
try {
var interactionGr = request.getInteractionRecord();
var short_description = request.getParameter('case_short_description');
var gr = new GlideRecord('sn_customerservice_case');
if(interactionGr) {
gr.setValue("contact", interactionGr.opened_for.toString());
}
gr.setValue("contact_type", "phone");
gr.setValue("short_description", short_description);
gr.insert();
var notes = gs.getMessageLang("Case {0} has been created.", lang, [gr.getValue("number")]);
response.setStatusCode(200);
response.setMessage(notes);
if(interactionGr) {
interactionGr.work_notes = notes;
interactionGr.update();
var grRelated = new GlideRecordSecure('interaction_related_record');
grRelated.initialize();
grRelated.document_id = gr.sys_id;
grRelated.document_table = gr.getTableName();
grRelated.interaction = interactionGr.sys_id;
grRelated.insert();
}
} catch(e) {
ctx.setError(e);
}
})(request, response, ctx);
Step 3: Create an Amazon Lex Bot that sends createCase command to ServiceNow
Next, we’ll build a slot that captures the caller’s response. Leave your Lex Bot screen open.
Step 4: create a slot type that elicits a verbal response from the caller
Here’s a screenshot showing the Lex Bot we just made:
Here’s a screenshot showing the slot type we created for the Lex Bot prompt:
All done! Now, try it out!
Conclusion:
You have learned how to make a small addition to Cloud Call Center Operation Handlers to work with CSM, and how to write a simple Amazon Lex Bot that connects to that Operation Hander. Now your CSM customers can phone in to create new cases in Customer Service Management.
Authors:
Grant Hulbert, Director, Office of Innnovation
Zach Dubin, Thought Leadership Researcher & Writer
Is there any easy way to pass the Amazon Connect Queue name to the interaction and/or the case record?