Lener Pacania1
ServiceNow Employee
ServiceNow Employee

Released in Tokyo, Task Intelligence for Customer Service brings the latest in ServiceNow’s AI innovation to our Customer Service Management applications.   Task Intelligence uses machine learning to automate task creation, triage, and investigation so that agents spend less time receiving, preparing, and gathering case data.  This results in higher CSAT scores because Task Intelligence helps agents solve customer problems faster.

 

This article will cover the best practices for moving your Task Intelligence models between different environments.  This article assumes you have already created your Task Intelligence Model in your SOURCE instance, and you are ready to move the models to the TARGET instance.  It also assumes the data between source and target are relatively the same.

 

At a high level these are the steps we will follow:

  1. Confirm existing Task Intelligence Models on your source instance.
  2. Deploy the model on the source as a background process.
  3. Export the model from the source instance.
  4. Import the XML into your target instance and confirm.
  5. Run a background script to enable flow designer Task Intelligence flows on the target instance.
  6. Change the Task Intelligence model deployment preference on the target
  7. Test Task Intelligence in CSM /FSM configurable workspace

 

Step 1: Confirm existing Task Intelligence Models on your source instance.

 

1. Log into your SOURCE instance.  This is the instance with the trained Task Intelligence models.

2. Go to All > Task Intelligence > Setup. 

3. Scroll down to Models.  On my source instance I have the below three models trained.

1a.jpg

 

Step 2: Deploy the model on the source as a background process.

 

1. Click into the model you wish to export.  In this case, K23 Case Categorization.

 

Picture1.png

 

2. On the left hand navigation bar, click set your preferencesClick the radio button and change the preference to “Or run this model in the background only.”

 

3.jpg

 

3. Click Save & continue at the bottom of the screen.  A second dialog box will appear that with the message “These changes to your deployed model will be live.” Click save.

 

4.jpg

 

4. Click Deploy at the bottom right of the screen. And click Got It on the congratulations screen.

5.jpg

 

Step 3: Export the model from the source instance.

 

1. On your source instance.  Go to all > Task Intelligence > Setup.

2. Scroll down to models and click Export Model on the model you wish to export, in this case K23 Case Categorization.6.jpg

 

3. Click Allow on the below export screen.

Picture1.jpg

 

 

 

 

4. Your browser screen will go blank.  To check that the download was ok look at the bottom left of your browser and also check your download location to see if you have the exported model on your computer.

5. Repeat this process for any other Task Intelligence models that you wish to move to the target instance, in my case I’ll also export the Case language and Case sentiment models.

 

Step 4: Import the XML into your target instance and confirm.

 

1. Log into your TARGET instance as admin.  This is the instance where you would like to move the trained Task Intelligence models from your source.

2. Go to all > Task Intelligence > Setup

3.. Scroll down to Models.  Notice on my target instance I do not have any Task Intelligence models.

1.png

 

4. Go to All > Retrieve Update Sets.

2.png

 

5. Scroll to the bottom of the list view to the Related Links Section.  Click Import Update Set from XML. Note: this is not a true update set so we don’t have to go through all the update set validation.  We are just using this as a means to get the Task Intelligence models into your TARGET instance.

 

3.png

 

6. Browse for the first Task Intelligence Model export file that you exported from your SOURCE instance.

1.jpg

 

 

1.png

 

7. Select the first file you want to import.  On my computer I’ll import the K23 Categorization task_intel_export_2023-04-08 15 05 57.xml.  On a Mac there is a bottom on the bottom right to Open the file.  On Windows look for a button to open/load the file.

 

2.jpg

 

8. Confirm that you uploaded the XML file to your TARGET instance.  You will see the file name next to the XML file.  Click Upload.  Repeat these steps for any other exported Task Intelligence models you wish to import to your TARGET instance.

3.jpg

 

9. Wait a few minutes for the screen to return to Retrieved Update Sets list view.

4.jpg

 

10. Go to all > Task Intelligence > Setup and confirm that the imported model now appears in your TARGET instance.

5.jpg

 

Step 5: Run a background script to enable flow designer Task Intelligence flows on the target instance.

 

Task Intelligence models are executed via Task Intelligence Prediction Flow Designer flows.  Some customers may find that these flows are disabled after an import.  

 

1. On your TARGET instance login as Admin and go to All > System Definition > Scripts-Background.

1.jpg

 

2. Cut and paste the below script into the Run Script (JavaScript executed on Server) section and click the Run Script button.

 

//Code to activate the prediction flows.

var modelGr = new GlideRecord("sn_ti_admin_model");

 

if(modelGr.get(/*<sys_id of the model record from sn_ti_admin_model>)*/)) {

 

    gs.eventQueue("sn_csm_ml_task.enable_categorization", modelGr); 

 

}

Collapse

 

2.jpg

 

3. Go to All > Flow Designer and click Flow Designer.

3.jpg

4.  Sort by updated on the Flows List view.    There should be four Task Intelligence flows that the script set to active = true.

 

4.jpg

 

Step 6: Change the Task Intelligence model deployment preference on the target.

1. Log into your TARGET instance.  This is the instance where you imported the Task Intelligence Models.

2. Go to All > Task Intelligence > Setup

3. Click the imported Task Intelligence model, in my instance this is K23 Case Categorization.

1.png

4. On the left-hand navigation pane click Set your preferencesSelect Choose a preference for each output field and fill out the values as below.  Click Save & Continue and Save again to deploy your model.  Click Deploy in the lower right.

2.png

5.  On the congratulations screen click Got It.

 

3.png

Step 7: Test Task Intelligence in Target CSM /FSM configurable workspace.

 

1. On your TARGET instance. Go to the CSM/FSM Configurable workspace by clicking Workspaces at the top, if you don’t see workspaces at the top click the three vertical dots.

1.png

 

2. Click the list view to create a new case.

2.png

3. Click New to create a new case.

3.png

4.  In the account field click the magnifying glass and select any account.  I chose In Focus Systems.

4.png

5. In the short description type SSO Support Email.  Notice that assignment group is empty, and priority has a default value of 4-Low.

 

Click Save on the upper right to fire the Task Intelligence model.  Notice that assignment group has been auto populated with the prediction.  IMPORTANT: you may have to wait forty seconds or more for the prediction to autofill.

 

5.png

 

6. On the upper far right of the case form click Accept, notice the values now say “predicted” in the blue box underneath the fields.

 

6.png

 

If you’re seeing the above Predicted messages on your target, you’ve successfully imported your Task Intelligence models w/o having to re-train.   I’ve attached my three exported models from my instance just in case you wanted to look at the XML generated by the Task Intelligence export.

 

PS: If you are taking my Knowledge 2023 class in May (LAB1681-K23 Process Optimization and Task Intelligence for streamlined customer service) we will use the three attached files and the code in Step 5 to configure our lab instances.

Comments
StefanoZ
Mega Sage

Is this still the valid procedure to move a Task Intelligence (trained) Model?

Version history
Last update:
‎04-18-2023 08:47 AM
Updated by:
Contributors