Workspaces and Interactions

Integrating with Workspace Interactions must be done on the Studio script level.  This will require an API User to be created in ServiceNow that the Studio script will use to communicate with ServiceNow.  The Interaction will be created with a New status prior to the Request Agent action to queue the call.

The SNOW_Create_Interaction script also creates a GLOBAL:screenpopurl variable that can be used in either the Request Agent or a Run App to pop the new Interaction.

Next, in the On Answer branch, the Interaction will be updated to a Work In Progress status with the agent that is being routed the call.  This will require a way to link the CXone user to the ServiceNow user.  Usually this can be done by using the email address stored in CXone if the usernames do not match in both systems.  If that is not possible either, there would need to be a mapping set up of CXone id to ServiceNow sys_id.

Finally, in the On Release branch, the Interaction will be updated with a Closed status.

You can download our sample Studio scripts to help get you started: SNOW_Integration_Package.

1

Create an new user in ServiceNow

A new user needs to be created in ServiceNow for use of API interactions with the Studio script.  The username and password will be used in the next step.

Depending on the extent of your integration, you will be required to give the following access:

sys_user - READ
incident and/or sn_customerservice_case - READ
interaction - CREATE,UPDATE
interaction_related_record - CREATE

2

SNOW_Interaction_CORE and Integration_Log_Error

The SNOW_Interaction_CORE script is the script that will be communicating directly with ServiceNow.  Use the user created in step 1.

The only snippet that you will need to modify is the Set GlobalVars Based on Env.  This holds the integration user's login credentials to communicate with ServiceNow.  It supports both basic auth and oauth with a key and secret.  It will be up to your ServiceNow admins on how they want to authenticate the integration user.

3

SNOW_Create_Interaction

A runsub to this script can be placed anywhere in your queue script where you want to create the initial Interaction in ServiceNow.  This base script searches the User table using the ANI and assuming USA formated numbers ( 10 digits ).  If you are international or if you need to search other objects in ServiceNow, this script will need to be modified.

3

SNOW_Update_Interaction

A runsub to this script will be placed in the On Answer branch of the queue script.  The purpose is to update the Interaction with the Work In Progress state and the Agent's username.  If the usernames in CXone and ServiceNow are quite different, you may need to modify this script to add your custom mapping from CXone user to ServiceNow user.

4

SNOW_Close_Interaction

A runsub to this script will be placed in the On Release branch of the queue script.  The purpose is to close the Interaction with the Close state after the call is complete.  This is not necessary if you want to keep the Interaction open and have it manually closed by the agent.

TOP