Jose Lobo
Mega Explorer

I though you might find interesting how to exchange data from any ServiceNow entity with Exalate integration toolStarting from version 5.0.28, Exalate can sync any entity from ServiceNow.

In this article it is assumed that you have some basic knowledge of how Exalate operates

The scripts below use the field and table names from the ServiceNow database. You can find out the field and table names of any entity in ServiceNow you would like to sync by following these steps:

  1. Go to the search bar
  2. Look for Rest API Explorer
  3. In the API Explorer, scroll to tableName under "Prepare request"
  4. Search for the entity/table name you want to sync. (Example: demands)
  5. Scroll to the bottom and click "Send"

find_real_file.png

find_real_file.png

The table name will be next to the Main Name (Demand), the table name for demand is "dmn_demand"

If you scroll down to "Response Body" you will see the fields available for synchronization.

find_real_file.png

From Exalate

Outgoing Sync

You will need to change from the Exalate scripts from "Incident" to whatever table name you want to sync.

You will also need to modify the lines below so they relate to the fields of the Table.

if(entity.tableName == "incident") {
    replica.key            = entity.key
    replica.summary        = entity.short_description
    replica.description    = entity.description
    replica.attachments    = entity.attachments
    replica.comments       = entity.comments
    replica.state          = entity.state

 

 

Incoming Sync

This script shows how to set up incoming sync for ServiceNow entities. This example script shows how to sync issues between ServiceNow and Jira.

On the first synchronization, it's important to define what ServiceNow entities you want to create after receiving data from Jira. This is done with the if(firstSync) variable. In this example, Incident is used as the default entity, and it is the one that will need to be changed like you did with the outgoing sync

if(firstSync){
 if(replica.typeName == "Business Application"){
    entity.tableName = "cmdb_ci_business_app"
 }else{
    entity.tableName = "incident"
 }
}
if(entity.tableName == "incident") {
    entity.short_description = replica.summary
    entity.description = replica.description
    entity.attachments += replica.addedAttachments
    entity.comments += replica.addedComments
    
}

 

Script variables

if(firstSync)
A condition where that defines the tables used to store incoming data in ServiceNow. 
entity.tableName
A variable used to know what table you can sync. Assign the name of the ServiceNow table name to this variable. In this example, you can sync data into the incident table. You can sync any entity within the if condition.

For example, with the entity.short_description = replica.summary line, you will sync the summary field from Jira issues into the short_description from incident table. You can replace short_description with other fields, like description

 

For more information you can refer to How to sync any entity in Exalate for ServiceNow.

Version history
Last update:
‎09-14-2021 11:14 AM
Updated by: