Setting up ServiceNow to Work with Ticket Concierge

This topic discusses the ServiceNow setup if you plan to use ServiceNow with Aisera's Ticket Concierge

Prerequisite:

Ask your Aisera team to provide you with an .XML file that contains the Update Set (data you want to upload) to ServiceNow.

ServiceNow Setup:

  1. Log into your ServiceNow system.

  2. Navigate to System Update Sets → Retrieve Update Sets and upload the .xml file.

ServiceNow Upload of Retrieved Update Set
  1. Click Upload.

  2. After the file is uploaded, open the Update Set.

  3. Click Preview Update Set, followed by Commit Update Set.

  4. After committing the update set, verify that the following elements exist:

Verify Elements
  1. Navigate to the ServiceNow System Properties page and perform the following steps.

    1. Search for name aisera

    2. This should bring up two results: an app token and a url

ServiceNow System Properties

c. Click on the app token.

d. Insert the value of the app token given to you by your Aisera Team.

e. Click Update.

Setting ServiceNow App Token

f. Navigate back to the prior page and click on the instance url.

g. Insert the value of the app url given to you by your Aisera Team.

h. Click Update.

  1. To verify, this setup, create an incident manually.Then check the system logs by choosing the All tab and then typing system logs.

View All System Logs
  1. Then look for the phrase, Ticket Concierge Payload.

Find the Ticket Concierge Payload in the System Logs
  1. Observe the webhook response above it for numbers like 201,500.

Creating Business Rules

In your ServiceNow environment, on your uploaded Update Set, (Example: TC event trigger_04/02/25) click on the associated business rule (Event Studio TC Business Rule).

Customer Updates Lists in ServiceNow

This will take you to a sys script page like the one shown below (depends on your ServiceNow version/setup).

ServiceNow Script Editor

Click Show Related Record on the bottom right side of the page.

Show Related Record

Modify the logic that controls when the rule script will run. Specifically, you want it to ensure that your rule is set to run after both Insert AND Update are checked.

Add two filter conditions:

  1. Set Assignment Group to Tech Aisera (not the same as the screenshot, this is a test instance).

  2. Set State to New (Identical to screenshot below).

ServiceNow When to Run Tab for Business Rules

Scheduling the Job

To schedule a script execution job:

  1. In your ServiceNow instance, navigate to: System Definition → Scheduled Jobs → Scheduled Script Executions.

  2. Click New to create a new Scheduled Script Execution.

  3. Fill Out the Scheduled Script Execution Form:

    • Name: Reassign Stale App Engine Admin Tickets

    • Active: ✅

    • Run: Periodically

    • Repeat Interval: Every 5 minutes (or what suits your load)

    • Script: (see below)

Replace all group names (such as old group and new group) in the following example with your own variables.

(function() {
 var now = new GlideDateTime();


 var gr = new GlideRecord('incident');
 gr.addQuery('assignment_group.name', 'old group'); 
 gr.addQuery('state', '2'); // "In Progress"
 gr.addQuery('sys_created_on', '<=', gs.minutesAgo(15));
 gr.query();

 while (gr.next()) {
   var originalSysId = gr.getValue('sys_id');
   var number = gr.getValue('number');

   var dbGroup = new GlideRecord('sys_user_group');
   dbGroup.addQuery('name', 'new group'); replace this with your field and label

   dbGroup.query();

   if (dbGroup.next()) {
     gr.assignment_group = dbGroup.sys_id;
     gr.work_notes = 'Ticket re-routed from old group to new group due to inactivity after 15 minutes.';
     gr.update();

     gs.log('Moved incident ' + number + ' (sys_id: ' + originalSysId + ') to "new group" group.');
   } else {
     gs.logError('Could not find "Database" group. Incident ' + number + ' not updated.');
   }
 }
})();

You may have to change the field on the Assignment Group Name and you will definitely have to change the name of the old and new assignment group.

The end result should look like the screenshot below:

Business Rule Script

After you set up this business rule, test it by creating an INC ticket in the correct assignment group, with a status of In Progress . Then leave the ticket and check back 20 minutes later.

Observe how long it takes from the time the ticket gets created to the time the scheduled job updates the assignment group.

In the following screenshot, the first activity is at the bottom and the assignment group update happened roughly 18 minutes later.

Activity Window

If the assignment group never gets updated, check the system logs to see if an error occurred.

Last updated