Max Selwyn
ServiceNow Employee

Extend your custom Now Assist skills to the portal so users get AI-powered guidance directly while submitting catalog requests—without leaving the form.  

This is an example of how to utilize a NASK skill on the portal, though this method can be used in virtually any server-side script on the platform. This article will not focus on building the skill itself, but how to deploy a skill once created. In this case it will be used in a MRVS (Multi-Row Variable Set) modal on a Catalog Item in the Portal.  

In deployment settings on your skill, select UI action. Once you select a table, hit create UI Action. Once it’s created, select “Link to UI Action”. This is where you can get the baseline script from.  

MaxSelwyn_0-1783540643327.png

 

 

Once you open the UI Action, copy the script.  

MaxSelwyn_1-1783540643329.png

 

 

For this example, I created a function in a script include that the catalog item can reference. You can update the inputsPayload as needed but do not modify the capabilityId or skillConfigId as those reference your skill. Any logic you want to perform on your skill’s output before sending back to your client script/destination can be done in the try/catch section.  

 

In this case, the catalog item is using a MRVS (Multi-Row Variable Set). Within this MRVS, I created a new string variable to place the NASK Skill response and a catalog client script to invoke the script include.  

MaxSelwyn_2-1783540643332.png

 

 

The Catalog Client Script uses a GlideAjax call to call the script include which triggers the custom skill and passes the response back to the Catalog Client Script.  You can place any logic you need to from this point, in my example I am displaying that in a string variable.  

MaxSelwyn_3-1783540643333.png

 

 

 

The resulting display on portal. The trigger for my example in this OnChange client script is selecting a user.  

MaxSelwyn_4-1783540643336.png

 

 

 

After selecting a user, the script displays the wait messages so that the user on the portal will know something is happening. I put a field message and an info message for example purposes.

MaxSelwyn_5-1783540643337.png

 

 

Once the script is finished, the result is displayed in the string field.  

MaxSelwyn_6-1783540643337.png

 

 

Version history
Last update:
an hour ago
Updated by:
Contributors