Set Priority via AI

Shusovit Dutta
Tera Contributor

I have a usecase that an email will create, an incident and based on the short description and description. Based on some AI mechanism. Can someone help me understand what AI mechanism we can use to achieve the same.

1 ACCEPTED SOLUTION

SasiChanthati
Giga Guru

Please use the below Steps for the - Email-Based Incident Priority Setting Using ServiceNow Agentic Experience

This solution automatically analyzes incoming email-generated incidents and sets their priority based on the content of the short description and description fields using ServiceNow's Agentic Experience framework.

  • ServiceNow instance with Vancouver/Washington release or later
  • Agentic Experience plugin activated
  • Now LLM Hub plugin activated
  • Email integration configured for incident creation

1. Create the Agentic Use Case

  1. Navigate to All > Agentic Experience > Agentic Use Cases
  2. Click New to create a new use case
  3. Configure the following fields:

    • Name: Email Based Incident Priority Setter
    • Description: Automatically sets incident priority based on email content analysis
    • Active: Checked
    • Execution Type: Select either "Autonomous" or "Supervised" based on your requirements
    • Table: Incident [incident]
  4. In the Trigger Conditions section, set the following conditions:

    • When: Record is created
    • AND Channel EQUALS Email
    • AND Short description IS NOT EMPTY
    • AND Description IS NOT EMPTY
  5. Click Submit to save the use case

2. Create Agent 1: Incident Details Retrieval Agent

  1. From your Agentic Use Case record, scroll to the Agents related list
  2. Click New to create a new agent
  3. Configure the following fields:

    • Name: Incident Details Retrieval Agent
    • Description: Retrieves incident details for analysis
    • Order: 100 (to ensure it runs first)
    • Active: Checked
  4. In the Tools section, click Add and select Flow Action
  5. Search for and select the "Get Record" flow action
  6. Configure the flow action with these inputs:

    • Table: incident
    • Record: ${trigger.sys_id}
    • Fields to Return: short_description,description,impact,urgency
  7. Save the agent configuration

3. Create Agent 2: Incident Priority Analyzer and Updater

  1. From your Agentic Use Case record, scroll to the Agents related list
  2. Click New to create a new agent
  3. Configure the following fields:

    • Name: Incident Priority Updater
    • Description: Analyzes content and sets appropriate priority
    • Order: 200 (to run after the first agent)
    • Active: Checked
  4. In the Tools section, click Add and select LLM Prompt
  5. Configure the LLM prompt with:

    • Name: Analyze Incident Priority
    • Prompt Template: ``` You are an incident priority analyzer. Based on the incident description below, determine the appropriate priority level (1-Critical, 2-High, 3-Moderate, 4-Low).

    Consider factors like business impact, urgency, affected users, and potential financial or operational consequences.

    Short Description: ${agents.Incident Details Retrieval Agent.outputs.result.short_description}

    Full Description: ${agents.Incident Details Retrieval Agent.outputs.result.description}

    Respond with ONLY a number 1, 2, 3, or 4 representing the recommended priority.

    - Temperature: 0.2 (for more consistent outputs)
    - Max Tokens: 10
    
    
  6. Add another tool: Click Add and select Flow Action
  7. Search for and select the "Update Record" flow action
  8. Configure the flow action with:

    • Table: incident
    • Record: ${trigger.sys_id}
    • Fields to Update: priority=${agents.Incident Priority Updater.outputs.llm_response}
  9. Save the agent configuration

4. Testing and Validation

  1. Create a test email rule that forwards to your ServiceNow instance
  2. Send test emails with various scenarios (critical issues, minor issues, etc.)
  3. Monitor the created incidents to verify:

    • The incidents are created properly from emails
    • The priority is set correctly based on content
    • The agentic workflow is executing as expected
  4. Review the Agentic Experience execution logs for any errors or issues

5. Refinement and Optimization

  1. Create a feedback mechanism:

    • Add a UI Action on the incident form for users to report incorrect priority assignments
    • Use this feedback to improve your LLM prompt
  2. Implement a monitoring dashboard:

    • Create a dashboard to track priority assignment accuracy
    • Monitor metrics like "priority changes after assignment" to identify areas for improvement
  3. Refine your LLM prompt based on performance:

    • Add specific examples of your organization's priority guidelines
    • Include industry-specific terminology relevant to your business

This is Optional: Performance Monitoring Configuration

  1. Navigate to All > Agentic Experience > Administration > Properties
  2. Set appropriate logging levels for monitoring
  3. Create a scheduled job to review performance metrics weekly

This solution provides a complete, approach to automatically setting incident priorities based on email content using ServiceNow's built-in AI capabilities.

View solution in original post

2 REPLIES 2

Community Alums
Not applicable

Based on  my understanding of your use case you want to automatically set the priority of an incident based on the description and short description.

 

You can create an Agentic Use case for the same.

 

Sample Use case name :- Email Based Incident Priority Setter

Trigger Condition :- Incident created, channel is Email and Description/Short Description is not empty.

 

Add Agents.

1.Incident Details Retrieval Agent.

Tools:- Flow Action:-Fetch the Description and Short Description of the triggered incident

2. Incident Priority Updater

Tools:- Script/Flow Action(set priority based on the llm response)

 

Add both the agent to your agentic use case. You may set the execution type to Autonomous or Supervised based on the requirement.

 

If you answer is useful. kindly mark it is Correct.

SasiChanthati
Giga Guru

Please use the below Steps for the - Email-Based Incident Priority Setting Using ServiceNow Agentic Experience

This solution automatically analyzes incoming email-generated incidents and sets their priority based on the content of the short description and description fields using ServiceNow's Agentic Experience framework.

  • ServiceNow instance with Vancouver/Washington release or later
  • Agentic Experience plugin activated
  • Now LLM Hub plugin activated
  • Email integration configured for incident creation

1. Create the Agentic Use Case

  1. Navigate to All > Agentic Experience > Agentic Use Cases
  2. Click New to create a new use case
  3. Configure the following fields:

    • Name: Email Based Incident Priority Setter
    • Description: Automatically sets incident priority based on email content analysis
    • Active: Checked
    • Execution Type: Select either "Autonomous" or "Supervised" based on your requirements
    • Table: Incident [incident]
  4. In the Trigger Conditions section, set the following conditions:

    • When: Record is created
    • AND Channel EQUALS Email
    • AND Short description IS NOT EMPTY
    • AND Description IS NOT EMPTY
  5. Click Submit to save the use case

2. Create Agent 1: Incident Details Retrieval Agent

  1. From your Agentic Use Case record, scroll to the Agents related list
  2. Click New to create a new agent
  3. Configure the following fields:

    • Name: Incident Details Retrieval Agent
    • Description: Retrieves incident details for analysis
    • Order: 100 (to ensure it runs first)
    • Active: Checked
  4. In the Tools section, click Add and select Flow Action
  5. Search for and select the "Get Record" flow action
  6. Configure the flow action with these inputs:

    • Table: incident
    • Record: ${trigger.sys_id}
    • Fields to Return: short_description,description,impact,urgency
  7. Save the agent configuration

3. Create Agent 2: Incident Priority Analyzer and Updater

  1. From your Agentic Use Case record, scroll to the Agents related list
  2. Click New to create a new agent
  3. Configure the following fields:

    • Name: Incident Priority Updater
    • Description: Analyzes content and sets appropriate priority
    • Order: 200 (to run after the first agent)
    • Active: Checked
  4. In the Tools section, click Add and select LLM Prompt
  5. Configure the LLM prompt with:

    • Name: Analyze Incident Priority
    • Prompt Template: ``` You are an incident priority analyzer. Based on the incident description below, determine the appropriate priority level (1-Critical, 2-High, 3-Moderate, 4-Low).

    Consider factors like business impact, urgency, affected users, and potential financial or operational consequences.

    Short Description: ${agents.Incident Details Retrieval Agent.outputs.result.short_description}

    Full Description: ${agents.Incident Details Retrieval Agent.outputs.result.description}

    Respond with ONLY a number 1, 2, 3, or 4 representing the recommended priority.

    - Temperature: 0.2 (for more consistent outputs)
    - Max Tokens: 10
    
    
  6. Add another tool: Click Add and select Flow Action
  7. Search for and select the "Update Record" flow action
  8. Configure the flow action with:

    • Table: incident
    • Record: ${trigger.sys_id}
    • Fields to Update: priority=${agents.Incident Priority Updater.outputs.llm_response}
  9. Save the agent configuration

4. Testing and Validation

  1. Create a test email rule that forwards to your ServiceNow instance
  2. Send test emails with various scenarios (critical issues, minor issues, etc.)
  3. Monitor the created incidents to verify:

    • The incidents are created properly from emails
    • The priority is set correctly based on content
    • The agentic workflow is executing as expected
  4. Review the Agentic Experience execution logs for any errors or issues

5. Refinement and Optimization

  1. Create a feedback mechanism:

    • Add a UI Action on the incident form for users to report incorrect priority assignments
    • Use this feedback to improve your LLM prompt
  2. Implement a monitoring dashboard:

    • Create a dashboard to track priority assignment accuracy
    • Monitor metrics like "priority changes after assignment" to identify areas for improvement
  3. Refine your LLM prompt based on performance:

    • Add specific examples of your organization's priority guidelines
    • Include industry-specific terminology relevant to your business

This is Optional: Performance Monitoring Configuration

  1. Navigate to All > Agentic Experience > Administration > Properties
  2. Set appropriate logging levels for monitoring
  3. Create a scheduled job to review performance metrics weekly

This solution provides a complete, approach to automatically setting incident priorities based on email content using ServiceNow's built-in AI capabilities.