Ratnakar7
Mega Sage

Traditional automation in ServiceNow relies on writing logic and checks in Flow Designer, REST APIs, scripts, and scheduled jobs. These flows generate events, assign manual tasks to teams, and wait for completion. It's essentially a predefined If‑This‑Then‑That model - rigid and static.

With Agentic Workflows, we combine specialized agents that not only execute tasks but also analyze future scenarios, self‑learn, and adapt. Instead of rewriting entire processes, we simply provide each agent with a one‑time detailed prompt, and they collaborate intelligently to deliver outcomes across systems, even those without APIs.

Most AI implementations stop at "summarization" or "answering questions." But a true Agentic Workflow goes further: it executes tasks. When a user tells a Virtual Agent, "I moved to a new house," the AI shouldn't just open a ticket; it should update the HR system, the Payroll portal, and the Active Directory - even if those systems are 20 years old and lack modern APIs.

-> Use Case - Address Update

Scenario

An employee enters "I moved to a new house."  in Now Assist enabled Virtual Agent (Employee Center or MS Teams).

The VA uses a multi‑turn catalog item skill to ask clarifying questions (new address, effective date, etc.) and generates a service request.

 

-> Agentic Workflow Architecture

Agents in ServiceNow can be thought of as specialized roles:

  • Analysis Agent (Now Assist): Extracts intent and entities.

  • Compliance Agent (KYC/BGV): Validates against government records.

  • Orchestration Agent (Flow Designer): Routes tasks to the right execution path.

  • Execution Agents (Integration Hub + RPA Hub): Perform updates across modern APIs and legacy portals.

  • Control Tower Agent: Oversees, audits, and escalates.

Agentic Workflow Architecture.png

 

->Step‑by‑Step Flow with Agent Prompts:

  1. Analysis Agent: Extracts user_sys_id and new_address.
    Prompt: Act as Analysis Agent and extract user_sys_id and new_address from the recently raised address change request. Change the status of the request to "In Progress" and assign it to yourself.

  2. Compliance Agent:
    Prompt: Act as BGV authority. Extract the email_id from the request provided by the Analysis Agent. Invoke the Digilocker API → ask the user for permission to fetch official address proof. Validate the new address against government records. If validation fails, escalate to HR

    • Calls Digilocker API → asks user permission to fetch official address proof.

    • Validates new address against government records.

    • If validation fails → escalate to HR.

  3. Orchestration Agent:
    Prompt: Act as a distributor to correctly select appropriate APIs. Route to Integration Hub subflows for Workday, Payroll, and Active Directory. If no API is available, route to RPA Hub subflow for the legacy portal.

    • Routes to Integration Hub subflows for Workday, Payroll, AD.

    • Routes to RPA Hub subflow for legacy portal.

  4. Execution Agents:

    Prompt (API Execution): Perform API calls to update modern systems (Workday, Payroll, AD) with the new address.

    Prompt (RPA Execution): Login with a service account configured in the credentials table. Navigate the legacy portal UI, update address fields, and capture the confirmation ID.

    • API calls update modern systems.

    • RPA bot logs into legacy portal, updates address fields, captures confirmation ID.

  5. Control Tower Agent: Logs all actions, ensures compliance, notifies user of completion.
    Prompt: Log all actions across agents, ensure compliance, maintain audit trails, and notify the employee of completion.

-> Why This Is Different

  • Explicit agent prompts: Each agent is guided by a clear instruction, making workflows adaptive.

  • Compliance integration: Digilocker and BGV checks ensure real‑world governance.

  • Agent collaboration: Agents hand off tasks seamlessly, unlike static flows.

  • Control Tower oversight: Enterprise‑grade audit and escalation built in.

  • Complexity.

    • Manual Effort: O(n) human hours.

    • Agentic Effort: O( 1 ) human oversight.

 

-> One more Use Case - Massive Data Reconciliation

Scenario

Imagine an HR department receiving a "large chunk" of similar requests via a CSV or a flood of Incidents regarding a department restructuring.

Solution:

  • Ingestion: A Webhook receives the data or an Incident triggers the flow.

  • Processing: Instead of a human reading 500 incidents, Now Assist parses the text to identify the User, Old Dept, and New Dept.

  • Execution: * For systems with APIs (like Workday), we use Integration Hub.

    • For the legacy "In-house Portal," we trigger an RPA Unattended Robot.

Example script that we can embed into Agentic-workflow agent :

// 1. ANALYSIS: Use Now Assist custom skill to extract data 

var incidentDetails = {
    short_description: current.short_description,
    description: current.description
};

// 2. REASONING: Determine if RPA is needed
if (current.category == 'identity_update') {
    
    // 3. EXECUTION: Trigger the Subflow that handles RPA
    // 'global.update_legacy_portal_rpa' is a Subflow created in Workflow Studio
    var inputs = {};
    inputs['user_id'] = current.caller_id.toString();
    inputs['new_data'] = current.description.toString();

    // Start the subflow asynchronously to prevent UI freeze
    sn_fd.FlowAPI.startSubflow('global.update_legacy_portal_rpa', inputs);
    
    gs.addInfoMessage("Agentic Workflow initiated: Legacy portal update queued via RPA.");
}

 

By batching these incidents and using a service account to handle "line items" in bulk via RPA, we prevent the "swivel-chair" effect. We reduce the Mean Time to Resolution (MTTR) from days to seconds while maintaining a 100% audit trail in ServiceNow.

 

->Takeaway:

Agentic AI isn’t just a new way to automate - it's a new way to think. By assigning specialized agents to analyze, orchestrate, comply, execute, and govern, we move beyond static flows and into adaptive, intelligent automation. Whether it's updating an address across legacy and modern systems or validating identity through Digilocker, Agentic Workflows allow ServiceNow to act as a true enterprise control tower.

Instead of hardcoding every step, we instruct agents with one-time prompts and let them collaborate, learn, and evolve. This shift reduces manual effort, accelerates resolution times, and future-proofs your automation strategy.

The future isn't just automated - it's agentic.

 

 

Thanks,
Ratnakar

Version history
Last update:
yesterday
Updated by:
Contributors