
- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
09-19-2024 09:57 AM - edited 10-10-2024 05:28 AM
Introduction to Now Assist Skill Kit (NASK)
Now Assist can do amazing things right out of the box (fig1). Now Assist is unique because it can combine the power of Generative AI with the automation on the platform. For example, using Now Assist an agent can generate a knowledge article from multiple incidents/cases. Now Assist will take that output and and add it to the knowledge management workflow which automates the approval, governance, and creation process of knowledge articles. ServiceNow’s continues to add OOTB Now Assist skills every month across all of our workflows.
(fig1 – example of Now Assist OOTB skills)
But, what if you have a special Generative AI use case that is unique to your business or not on our near-term roadmap? Or, you have to use a particular LLM fine-tuned with data outside of ServiceNow? That’s where the Now Assist Skill Kit (NASK) comes into play. NASK lets you create your own Generative AI skills and easy integrate that skill into the platform.
The high level steps to create a new Generative AI skill using NASK are displayed in (fig2). Define input data, pre-process the data if needed using sub flows/java script, build the skill by defining the prompt, and then activate and deploy the skill into the ServiceNow platform.
(fig2 – flow to create a new skill using NASK)
The Now Assist Skill Kit (NASK) provides the fastest approach to building new Generative AI skills that can take advantage of the automation on the ServiceNow platform. Some of the NASK benefits:
- Native access to the data on the platform
- Combine the power of Generative AI and the automation on the platform
- Leverage the Now LLM or your 3rd party LLM in your skill
- Leverage the security that you’ve built into the platform
- Run your new generative ai skill on trusted ServiceNow infrastructure
- One click integration into the Service Operations/HR/CSM/FSM workspaces/classic forms (today) or the Now Assist Panel (coming soon in Q4 2024 - Safe Harbor)
- Leverage the ServiceNow Trust Guardian framework to identify bias & hallucinations(coming in Q4 2024 – Safe Harbor)
You will need some specific skills to leverage NASK. Ideal skill sets are as follows: experience creating flows in flow designer, knowledge of ServiceNow architecture, glide scripting, prompt engineering, knowledge of AI development best practices, and Generative AI evaluation techniques.
We also recommend having an AI practitioner/expert and a ServiceNow admin/developer involved in the process.
This article is one of many that will walk you through a NASK use case and in mini-lab fashion, show you the steps required to create your own custom skill using NASK in your instance. Note the mini-lab will take about 30minutes.
Let’s get started!
Using NASK for Survey Sentiment Analysis
Organizations are constantly sending out surveys, but how fast can an organization act on that data? Ideally if a survey identifies a serious problem we want to work on it as soon as possible. That’s exactly what our use case will tackle. We will use NASK to send the survey responses to the Now LLM which will predict the sentiment of a survey. If the sentiment of the survey is negative, we will automate the creation of an incident record so we can address the issue quickly (fig3).
(fig3 – survey sentiment design flow)
Below is what the finished product looks like (fig4). (1) The UI action calls the custom NASK skill, (2) Now LLM predicts the sentiment, (3) If negative we create a incident task to address the issue.
(fig4 – implemented use case)
If you don’t have the time to build this right now our NASK outbound product manager, Eliza Orchard, created an amazing 20-minute video walking through the key steps of this use case. You can watch it here.
You will need the following to implement this use case in your instance:
- Purchase any Now Assist SKU or request a Now Assist evaluation instance from your ServiceNow Account team. Or you can follow along to see how easy it is to create a new Generative AI skill using NASK and try it out later.
- Upgrade the instance to the latest version of Xanadu and install any of the Now Assist plugins.
- Configure Now Assist Skill kit by following the steps in our documentation.
- To use Now Assist Skill Kit you will need to grant yourself sn_skill_builder.admin role.
- Since we will be analyzing surveys the asmt_assessment_instance and asmt_metric_result tables will need to be populated with completed surveys and comments.
Step 1 - Review the Survey Data
1. Go to All > asmt_assessment_instance.list
Make sure you have completed survey data in your asmt_assessment_instance (fig5). The asmt_assessment_instance table stores the instances of surveys taken by the user and the state of the assessment (e.g. completed, in progress).
(fig5 – asmt_assessment_instance table)
2. Identify a completed assessment survey instance record that you will use as a test record for NASK. In my instance, I’ll use AINST0002001.
Note the relationship between asmt_assessment_instance and asmt_metric_result (fig5a). We will use survey results stored in the asmt_metric_result table. The asmt_metric_result table holds the answers to questions in a specific assessment_instance.
(fig5a – asmt_assessment_instance referenced tables)
Step 2 - Build a subflow to process the survey data
Each survey (assessment instance) stores it’s questions and responses in a related list (fig 6a).
(fig6a – each survey question and response stored in a related list)
To aggregate the survey responses, we will use a subflow to cycle through the related records of each survey and build a string of question + response which we will send to the Now LLM to predict the sentiment.
- All > Flow Designer > New Subflow
- Name your subflow “Get Survey Answers”
- Create a flow variable to store the aggregated question and responses for each survey instance. Go to more actions in the upper right (…) and create a flow variable named “Compiled Survey Answers” as a string(fig6).
(fig6 – Create a Flow Variable to store the aggregated question & answers)
4. Create the sub flow inputs and outputs. Create an input variable to capture the sys_id of the survey record with label “Assessment Instance ID” and type = string. The output variable label “Survey Answers” and type = string (see fig7). Click done.
(fig7 – define flow inputs and outputs)
5. Go to Action > Lookup Records. This creates a new action to look up the survey records. Fill out using the below screen shot (fig8). Click done.
(fig8 – Action look up survey records)
6. Go to Flow Logic > For Each. Add a For Each to process the records in the asmt_metric_results table. See below image on which variable pill to drag from the Look-Up records section (fig9). Click done.
(fig9 – For each loop to read through each survey)
7. Flow Logic > Set the flow variable for the compiled Survey Answers variable and click the script button, click the script button to replace the default code with the code below. Notice the set flow variable is nested in the For Each loop (fig10). Click done.
(fig10 – set flow variable collect question and answer for each survey answers)
Code for Script action:
var result = fd_data.flow_var.compiled_survey_answers
+ "\nQuestion: " + fd_data._2__for_each.item.metric.name
+ "\nAnswer: " + fd_data._2__for_each.item.string_value
+ "\n";
return result;
8. Outside of the For Each loop add a Flow Logic > Set flow variable. From the drop down select “Compiled Survey Answers” and set to the flow variable Compiled Survey Answers. Click done.
(fig11 – overwrite compiled survey answers variable with all the responses from the related records collect in the for each loop)
9. Go to Flow Logic > Assign Subflow Outputs. Assign output variable “Survey Answers” to flow variable “Compiled Survey Answers”. Click done.
(fig12 – set the subflow output variable to the compiled survey answers variable)
10. Your completed subflow should have 5 steps like the below.
(fig13 -completed flow).
11. Click save and publish. This subflow will gather the survey responses and send them to the Now LLM.
Step 3 – Create a new skill
Now that we have a subflow to process our assessment instance records let create a new skill that takes that as input to determine the sentiment survey.
- All > Now Assist Skill Kit > Home
- Create a new skill
- Name the skill Survey Sentiment Analysis
- Add a skill input by hitting the plus sign. Fill out the dialog as follows (fig14):
(fig14 – define new skill using asmt_assessment_instance)
5. Add a new tool by hitting the plus sign. This is where we will use the subflow that we created in the previous step. Fill out the dialog as follows:
(fig15 – Use the tool button to use the subflow we defined earlier)
6. Add a new prompt by hitting the plus sign. Fill out the dialog as follows (fig16):
(fig16 – define the prompt)
Use the following prompt:
You are an expert in understanding the underlying emotions within text.
Review the below survey answers and determine what the overall sentiment of the user is, but do not give an explanation.
Use the following categories to provide the overall sentiment:
Negative: If the sentiment is negative in nature
Positive: If the sentiment is positive in nature
Neutral: If the sentiment is neither negative nor positive
Your response should only contain the sentiment in a single word without any further explanation.
The survey questions and answers are found below:{{RetrieveSurveyAnswers.survey_answers}}
7. Click insert inputs and select “Retrieve Survey Answers”. Insert the variable after the sentence in your prompt (note - it's already in the code above)
The survey questions and answers are found below:{{RetrieveSurveyAnswers.survey_answers}}
8. Test the prompt by clicking Run Test, use the assessment instance record that you jotted down earlier. In my case it’s AINST0002001 (fig17).
(fig17 – Run a test of your new skill)
9. Notice the test shows “negative” sentiment for the survey instance (fig18).
(fig18 – note the negative response)
10. Click grounded prompt to help see what was sent to the LLM. This insight helps you tune your prompt (fig19).
(fig19 – select grounded prompt)
Step 4 – Deploy your new skill as a UI Action
NASK allows you to easily deploy your new skill into the platform as a UI action. End of Q3 2024 you will be able to deploy your skill on the Now Assist Panel (Safe Harbor).
- Click Finalize new version and publish the new skill. You should get a success message saying the skill has been published and can be activated through Now Assist Admin (fig20).
(fig 20 – finalize and publish your new skill)
2. Click skill settings > Deployment Settings. Assign workflow to other, click UI action, and confirm the table (fig21).
(fig 21 – select deployment method)
3. Click Link to UI Action and replac the try/catch in the default code with the code below. Ensure you replace var mylink with your instance name.
try {
//get the sentiment
var getSentiment = JSON.stringify(sn_one_extend.OneExtendUtil.execute(request));
//if negative, create a new CSM case/ITSM incident
if(getSentiment.includes("negative") || getSentiment.includes("Negative")){
var newTask = new GlideRecord("incident");
newTask.initialize();
newTask.assigned_to = gs.getUserID();
newTask.short_description = "Contact customer to determine source of negative survey feedback";
newTask.description = "Please refer to survey number " + current.getValue('number').toString() + " for detailed customer feedback and more information.";
var newTaskSysid = newTask.insert();
//get the link to the new case/incident
var mylink = '<a href="https://<your instance>.service-now.com/incident.do?sys_id='+newTaskSysid.toString()+'">here</a>';
//publish an info message
gs.addInfoMessage("The sentiment of the survey was deemed negative. A task was created for tracking. Click " + mylink + " to open.");
}
else{
//else it is neutral or positive, so don't create a case
gs.addInfoMessage("The sentiment of the survey was deemed neutral or postive. No action taken.");
}
} catch(e) {
gs.error(e);
gs.addErrorMessage('Something went wrong while executing the skill.');
}
action.setRedirectURL(current);
4. Click update on the UI Action form.
Step 5 – Activate the new skill
- All > Now Assist Admin > Now Assist Features > Other
- Click the Available Tab and Activate Skill (fig22)
(fig22 – activate the skill)
3. In Select Display toggle on the Core UI and click save and continue. Click Activate. You will see the splash screen showing Survey Sentiment Analysis is now active.
(fig23 – select the display)
4. To see your new skill on the assessment survey table click All > type asmt_assessment_instance.list and click on any assessment to open the form. Notice the Survey Sentiment Analysis button in the upper right.
(fig24 – see the UI action on the asmt_assessment_instance form)
5. Click the Sentiment Analysis button. Notice the predicted sentiment is negative and you can create a link to open an incident task to address the negative survey (fig25).
(fig25 – Now LLM detects negative sentiment on survey and provides a link to respond)
6. I hope you found this super cool! Right in the platform -where the agent is doing their work we can predict sentiment and then automate the response. There is no need to move the data and we can use the platform to automate the response process (fig26).
(fig26 – incident created to address negative response)
Congratulations! You’ve learned how to use the Now Assist Skill Kit to build a brand new custom skill and used the power of the ServiceNow platform automate the response to negative surveys.
- 5,330 Views
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Excellent write-up, thanks.
Do any of these features come with the base ITSM license?

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
pbusc appreciate the input. To use NASK you do need a license of Now Assist. That can be either Now Assist for Creator, Now Assist for ITSM/CSM/HR, etc. If you would like to evaluate Now Assist you can connect with you account team. We run Now Assist labs monthly at SNUGS or at other events near you. If your company is evaluating GenAI solutions you can also request a workshop/eval instance to spend more time with the technology. Just reach out to your ServiceNow account team.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Thanks for the info Lener.
Is it correct that any and all GenAI offerings are currently entitled via net-new licenses for them, and legacy licenses [e.g. base ITSM] won't have any GenAI entitlement simply added to it?

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hi pbusch, that is correct. Any GenAI capability requires a new Pro+ Sku. Your ServiceNow account team can get into the details; we changed Now Assist licensing so that customers can start small and still leverage Now Assist across the entire organization. Your account team can help more in this area.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
OK thanks!!
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
In step 5, the Look up Records, the condition should be Instance.Number is ... or else it's expecting to be tested with the sys_id of the instance, not the number (AINST...).
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Since I used the instance number in the sub flow, I also had to update the Tools configuration in Part 3 to use {{assesssment_instance.number}} and not sys_id

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hi Anna thanks for the input - those screens shots are straight from my instance. I'll try your suggestions also and compare the difference.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hello @Lener Pacania1 ,
I tried creating the Now-Assist Skill Kit but I am getting a message as "
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
This is coming from your UI Action script. Maybe double-check that your instance name is correct.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
I modified the instance link, but even after it didnt worked
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hi Lener Pacania1,
I have created this use case as per your suggestion and followed all steps, but i was facing some issue with flow input assessment_instance_id (string) type and, because of this, my sub-flow was not executing completely.
After changing the type of input field as reference(reference.assessment_instance) my flow issue was resolved,
I have added logs to my sub-flow, and it's fetching all the questions and answers.
Now new issue is coming on my custom skill set it's giving me an error, which was not coming earlier.
Getting this error after clicking on the test button from my custom skill set:
"sourceErrorResourceName": "RetrieveSurveyAnswers", "sourceErrorMessage": "Invalid GlideRecord input format found", error now assist servicenow"
Kindly guide me on the reason and proposed solution for this issue.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hello @Lener Pacania1 ,
How to implement sentiments analysis for CSM ?
Like this ?
Regards,
Jay Shah