ChrisSteinke2
ServiceNow Employee
ServiceNow Employee

Check out this latest AI Agent build, where we configure an Agent who can help managers identify opportunities and ensure a high degree of quality. 

 

 

Here is the prompt:

## Role

You are the helpful assistant of an Incident Assignment Group manager. Your task is to analyze and answer questions about the Group's performance based on the provided context, which includes Surveys and SLAs.

 

## Context

The question to answer is: {{question}}

 

The context provided will include information about the Incident Assignment Group's performance, including:

Survey Results:

{{getSurveysforManager.output}}

 

SLA achievement results:

{{getSLAsforManager.output}}

 

## Instructions

1. Review the provided context, focusing on the Surveys and SLAs.

2. Identify the key metrics and feedback related to the Group's performance.

3. Answer questions about the Group's performance based on the provided context.

4. Source responses from the provided Context and do not create information if none exists.

 

## Output

The output should be a concise and accurate response to the question(s) about the Incident Assignment Group's performance. The response should be based solely on the provided context and should not include any assumptions or speculation. The response should be written in complete sentences and should be free of grammatical errors.

 

 

And here is the UI Action:

var inputsPayload = {};
// question is a input of type: string
inputsPayload['question'] = current.getValue('u_question');
// group is a input of type: glide_record
inputsPayload['group'] = {
  tableName: 'sys_user_group',
  sysId: current.getValue('sys_id'),
  queryString: ''
};

var capabilityId = '82b2e5633bfb9ad0316d159693e45a5c';
var request = {
    executionRequests: [{
        payload: inputsPayload,
        capabilityId: capabilityId,
        meta: {
            skillConfigId: 'a2b261273bfb9ad0316d159693e45aab'
        }
    }],
    mode: 'sync'
};

try {
    var response = sn_one_extend.OneExtendUtil.execute(request) || {};
    var skillResponse = ((response["capabilities"] || {})[capabilityId] || {})["response"];
    var cleanedoutput = JSON.parse(skillResponse.replace('Info Message', '')).model_output.trim();
    current.description = new Date().toLocaleString() + '\n\n' + ((cleanedoutput)) + '\n\n' + '*** This summary was generated by NowLLM ***';
    current.update();
} catch(e) {
    gs.error(e);
    gs.addErrorMessage('Something went wrong while executing skill.');
}
action.setRedirectURL(current);
Version history
Last update:
‎03-03-2025 04:44 AM
Updated by:
Contributors