How to automate assignment group for a ticket creation related to Hardware issue

DeepanS
Tera Contributor

Hi Everyone,

Can someone advise on how can I create a workflow in Virtual Agent designer for an incident ticket related to hardware which will be auto-assigned to Local IT based on user profile.

1 REPLY 1

Sujatha V M
Kilo Patron
Kilo Patron

@DeepanS Seems to the same post by youhttps://www.servicenow.com/community/developer-forum/auto-assigned-a-ticket-created-in-virtual-agent...

 

I tried to replicate your issue and below is the guideline for further configurations. 

 

1. Getting the inputs of Contact Number, Description and the Confirmation on location tagged to the user profile.

SujathaVM_0-1715794598613.png

 

2. If the current location is "Yes", retrieve the user location from the "User" table and the managed by group from "Location" table. So the incident is created and assigned to the "Service Desk - L1" (i.e., automatic routing to local IT)

 

Note: "Managed by group" details needs to be filled without fail else the ticket will stranded. In that case you can enhance the flow to validate before proceeding further. 

 

SujathaVM_2-1715794762137.png

 

SujathaVM_1-1715794688123.png

Create a script variable to capture the managed by details : vaVars.managed_by [used in below script]

 

SujathaVM_4-1715795278140.png

 

Script of node : Retrieve user location and managed by

 

 

 

(function execute() {
    /* Code your scripted action here. For example, you might update a
       record based on conditional logic: */
    var details;
    var user_loc = new GlideRecord('sys_user');
    user_loc.addQuery('sys_id', vaInputs.user);
    user_loc.query();
    while(user_loc.next()){
        details = user_loc.getValue('location');
    } 

     var managedByGrp = new GlideRecord('cmn_location');
    managedByGrp.addQuery('sys_id', details);
    managedByGrp.query();
    while(managedByGrp.next()){
        vaVars.managed_by = managedByGrp.getValue('managed_by_group');
        return vaVars.managed_by;
    }        
})()

 

 

 

 

Creation of the record utility: 

SujathaVM_8-1715795732419.png

Result : Use card entity to display the incident details

 

SujathaVM_7-1715795608511.png

 

3. If the current location is "No", create an incident and set it to a default group (i.e., Hardware for testing)

SujathaVM_5-1715795371803.png

 

Creation of the record utility: 

SujathaVM_9-1715795762046.png

 

Result : Use card entity to display the incident details

SujathaVM_10-1715795900138.png

 

Please mark this as helpful and "Accept" it as a solution if this resolves your query.

Thanks,

Sujatha V.M.

 

Please mark this as helpful and accept it as a solution if this resolves your query.
Sujatha V.M.