Questions for Confluence license has expired.

Please purchase a new license to continue using Questions for Confluence.

Syncing Service Offering for ServiceNOW Incident

 
1
0
-1

Hi,


We are trying to sync incidents between Jira & ServiceNOW.

However, we are running into an issue where the Service Offering will only get synced during the first sync from Jira to ServiceNOW and not afterwards.


In the documentation, the Service Offering is not listed as an available field but would it still be possible to sync this field somehow (and why would it sync during the first phase but not afterwards?) because it is vital for our solution.

    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1

      Can you provide more details

      • What is 'service offering'
      • What is the outgoing sync script on the servicenow side
      • What is the incoming sync script on the Jira side


      1. Aleksi-Mikael Kivelä

        Service Offering is a reference field in ServiceNOW (similar to Business Service).


        Outgoing script:

        if(entity.tableName == "incident") {
            replica.key            = entity.key
            replica.reporter       = entity.caller_id.name
            replica.summary        = entity.short_description
            replica.description    = entity.description
            replica.attachments    = entity.attachments
            replica.comments       = entity.comments
            replica.state          = entity.state
            replica.priority       = entity.priority
            replica.substate       = entity.u_on_hold_reason
            replica.issue_key      = entity.correlation_id
            replica.close_code     = entity.close_code
            replica.close_notes    = entity.close_notes
            replica.department     = entity.company
        
            if(entity.business_service){
                replica.business_service = entity.business_service.display_value
            }
            if(entity.service_offering){
                replica.service_offering = entity.service_offering.display_value
            }
            
            
            /*
            Use a field"s internal name to send its value
            Example: Resolution Notes -> resolution_notes
            This works for all other entity types as well
            
            replica.resolution_notes = entity.resolution_notes
            */
        }


        Incoming script:

        if(firstSync){
            //Decide on the first sync, which entity you want to create based on the remote issue type
            entity.tableName = "incident"
            entity.state = 1
            entity.caller_id = "No contact"
            entity.short_description = replica.summary
            entity.description = replica.description
        }
        
        if(entity.tableName == "incident") { 
            entity.attachments += replica.addedAttachments
            entity.comments += replica.addedComments
        
            if(replica.customFields."division-exalate") {
                entity.company = replica.customFields."division-exalate".value
            }
            
            
            if(replica.business_service) {
                entity.business_service = replica.business_service.value
            }
            
            if(replica.service_offering) {
                entity.service_offering = replica.service_offering.value
            }
            switch(replica.priority) {
                case "P1":
                    entity.impact = 1
                    entity.urgency = 1
                    break
                case "P2":
                    entity.impact = 2
                    entity.urgency = 1
                    break
                case "P3":
                    entity.impact = 1
                    entity.urgency = 3
                    break
                case "P4":
                    entity.impact = 3
                    entity.urgency = 1
            }


        The problem is, that the Service Offering -field will get populated correctly when the incident is created from Jira but the field gets completely ignored by Exalate in subsequent updates.

      2. Aleksi-Mikael Kivelä

        Addendum:

        We don't have access to the Jira side script, since we aren't actually developing that end of the integration.

      CommentAdd your comment...