We have integrated ZD with SN but when we push Tickets to Zendesk it is losing people date like Requester/Agent and replacing it with my information in the ZD ticket

Originally asked by Champ Yarbrough on 17 November 2020 (original question)


ServiceNow Requester and Agent information is being changed when it is pushed to Zendesk. It is being replaced by the Admin User’s information ( in this case my information). This does not happen when we create a ticket in ZD and push it to SN in those cases it the information all passes correctly. Obviously this is causing major issues for us.


Answer by Juan Grases on 03 December 2020

This code should cover your case:

issue.comments += replica.addedComments.collect{ comment ->
  comment.executor = nodeHelper.getUserByEmail(comment.author?.email?.toLowerCase() ?: comment.author?.username?.toLowerCase())
  comment.body = comment.body.replaceAll("\\[code\\]", "").replaceAll("\\[/code\\]", "")

  if(comment.executor == null){
     comment.body = "Comment from servicenow by "+comment.author?.username + "\n:" + comment.body
  }
  comment
}

Comments:

Champ Yarbrough commented on 04 December 2020

Incoming Sync.docx (old community)

Outgoing Sync Copy 12.docx (old community)

Okay it appears somethings are working but not others.

Answer by Champ Yarbrough on 01 December 2020

I think I misstated what I was asking. Below is what we have in production. is this wrong? Do we need to add the script you suggested or replace this one?

issue.comments += replica.addedComments.collect{ comment ->
comment.executor = nodeHelper.getUserByEmail(comment.author?.email?.toLowerCase())
def body = comment.body
comment.body = body.replaceAll(“\\[code\\]”, “”).replaceAll(“\\[/code\\]”, “”)
comment
}

In the example, this ticket was created in SN and pushed to ZD above he 1st comment shows as being made by Gary ,

The subsequent comments that Gary makes in SN are pushed over and show in my name any assistance you can give will be appreciated.

Champ


Comments:

Juan Grases commented on 01 December 2020

Your code looks good. The problem is that the attachments comments (like the one in the screenshot) are currently created always as the proxy user.

Champ Yarbrough commented on 03 December 2020

So does this mean that after a ticket is created through the integration comments added to the ServiceNow Case by the original user or by Support Personnel working out of ServiceNow will always show up as being made by me or the proxy user?

This seems to make an ongoing collaboration on tickets impossible doesn’t it?

The way I am understanding what you are saying is that if I ask the customer a question in the body of a ticket that has been pushed over from ServiceNow, when he replies to my question his reply to me shows up in Zendesk as having been made by me answering my own question and when another person makes a comment on the ticket it shows up as being made by me as well and we have no way of knowing who made the comment so we have know way to address that user’s input.

As it stands now every ticket looks like I am posing questions to myself and I am answering my own questions so the dialogue becomes practically meaningless since we have no way to tell who is making any comments or updates to tickets. As it stand now I am getting inundated with questions about what I “meant” when I made a comment in a ticket that I know nothing about. I feel like I must be missing something very important and basic ( and I apologize for my ignorance) because if we can’t identify who is doing/saying what in the work log there really isn’t any way to use Exalate to work collaboratively between the ServiceNow and Zendesk to manage incidents/tickets.information possible.

When is the earliest time we can set up a time to discuss this because if there isn’t a way to fix this I am going to have to start looking at other options immediately.

Juan Grases commented on 03 December 2020

Hi Champ,

All comments should be properly added with the expected user (as long as it can be mapped someway). The current comments that are not impersonated are the ones exalate adds when adding a new attachments, this always contain the same text “New attachment received from remote side”. Could you confirm that this are the only attachments that are not properly impersonated by the original user?

Thanks,

Juan