- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hello,
I’m currently exploring the OOB Now Assist skill “Resolution Notes Generation” by cloning it. This skill contains a tool named “ShouldTriggerRecordAndKBLookup”, and I’m currently stuck at this point.
As far as I understand, this tool checks the Now Assist Skill Config record and the Now Assist Skill Config Var Set record on the backend to determine whether the checkbox “Add data from similar records and KB articles” is set to true or false. [Please correct me if I’m wrong]
Below is the script used in the tool:
(function runScript(context) {
/* @param {Object} context - Execution context, which may include:*/
/* - Previous tool outputs/inputs (e.g., context['ToolName.attributeName'] or context.getValue('ToolName.attributeName')).*/
/* - Additional context information (e.g., context.getAllValues()).*/
/* @returns {Object} - The computed value for the attribute.*/
// the Script wil check for Checkbox and Activity Stream Data to see if we want to use
// Relevant Record or not
var inputs = {
table: context.getValue('tablename'),
record_sys_id: context.getValue('sysid'),
resolution_notes_field: null,
resolution_choice_field: null,
input_fields: "",
caller: "",
skill_config_id: null, // context._meta.skillConfigId || null, // we get skillConfigId if we run test for skill-configs via skill-kit
capability_id: "c5870faa20e22110f877d3d1bc36dd87", // capability ID
isFromPreprocessor: "true"
};
var inputPayload = new sn_uxc_gen_ai.RecordResolutionGenAIUtils().getInputs(inputs)['inputPayload'];
var includeKbAndRecords = inputPayload.meta['include_resolution_information_from_similar_record'];
var journalEnteries = inputPayload['activities'].length === 0;
return includeKbAndRecords && journalEnteries;
})(context);
In this script, within the inputs object, skill_config_id is currently being passed as null. I’m unable to modify it to pass context._meta.skillConfigId since this is an OOB skill clone and the tool script is not editable.
Because of this, when I test the skill, I notice that the backend uses the OOB Skill Config record instead of my cloned Skill Config record. In the OOB record, the checkbox “Add data from similar records and KB articles” is set to false. I do not want to modify the OOB Skill Config record, and I also cannot modify the tool script.
How can I resolve this and make the cloned skill work as expected?
Please let me know if I’m missing something, as I haven’t found much documentation explaining how these skill configurations work.
Thanks.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
My bad. I was not paying attention to the journalEntries condition. When I run the tool code on the background script with some logs, I found correct skill config record is being picked up. My test incidents has some journal entries and this is making the tool to return False which further is making the skill to not to check the relevant records. Hence the issue.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Resolution Notes Generation is part of multiple skill family like ITSM,HRSD etc, which skill your referrinng in specific?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
My bad. I was not paying attention to the journalEntries condition. When I run the tool code on the background script with some logs, I found correct skill config record is being picked up. My test incidents has some journal entries and this is making the tool to return False which further is making the skill to not to check the relevant records. Hence the issue.
Thanks
