How to Sync RITM (Request Item) on ServiceNow

    This article shows how to synchronize the Requested Item(RITM) entity on ServiceNow.

    Introduction

    Exalate app allows you to synchronize different entity types on ServiceNow. You can add sync rules to synchronize each entity type separately or combine sync rules for multiple entities within one connection. List of available fields in supported entities.

    Configuration

    Source side(ServiceNow)

    Outgoing sync

    To send the Request Item data use the code below: 

    if(entityType == "sc_req_item") {
      replica.summary = requestItem.short_description
      replica.description = requestItem.description
      replica.comments = requestItem.comments
      replica.attachments = requestItem.attachments
        ///other fields supported by the Request Item entity
    }

    Destination side(ServiceNow)

    You need to map the incoming entities. For example:

    • Jira issue of type improvement to the ServiceNow Request item

    To create RITM (Requested Item) with the received information on your side add the code below:

    if (firstSync) {
    // For the first sync: Decide the entity you want to create based on the remote issue type
    entity.tableName = "“sc_req_item”"}
    if (entity.tableName == "sc_req_item") {    
       entity.short_description  = replica.summary    
       entity.description        = replica.description    
       entity.attachments        += replica.addedAttachments    
       entity.comments           += replica.addedComments
    }
    // Sync any other entity using the table name and the entity variable
    if (entity.tableName == "cmdb_ci_business_app") {    
       entity.short_description = replica.summary    
       entity.description = replica.description
    }

    To start the synchronization create a trigger for every entity type separately.

    Have more questions? Ask the community