Has anyone used side conversation?, Zendesk has limitations on how the status can be changed from the parent ticket to the side conversation, wondering if anyone has any advised to get the linked child ticket working, for example:
Requester (support) adds a comment to side conversation status on child ticket moves to open?
Hey @Ellesh_Miyangar
Welcome to the Exalate Community!
Can you please describe this in more detail? or provide some screenshots to understand the issue?
Thanks,
Sonal
It is hard to screenshot but essentially:
Jira - Ticket > Pending customer > (Via exalate)Zendesk side conversation status Open >, if side conversation > Status Pending > Zendesk Parent Ticket - Status to Open
In Reverse:
Zendesk - Parent ticket > Updates Side conversation > Side Conversation Status to Open
Zendesk has a parent ticket, and you can create a child ticket, limitations on how the status acts between one and another wondering if the exalate sync can apply this?
Hi @Ellesh_Miyangar,
I hope you are doing well.
There are a few different ways to accomplish this, and it also depends on the use case. I do have a few questions:
- Is the Jira issue linked to the Zendesk parent ticket or the child ticket?
- If it is linked to the parent ticket, you can make an API call to fetch the side conversations from it and check if the value has changed in the comment body. If this value has changed, we can set the status of the parent ticket to “open.”
- Also, if you want to change the status of the child issue(s), this can also be done via another API call. you will fetch the ticket ID through the API call used to fetch the side conversation and then update the status.
- If it is linked to a child issue, we will need to find the parent ticket and check for the side conversation there or check the updated comments to change the status.
Kind regards,
@Christophe_De_Beule
Hi Christophe, I want to simplify this further, so we have Jira working with Zendesk.
If possible, I need help or if you have a code
Parent ticket > side conversation and reverse
Example> Custom status ID which I have is (dev escalation) > put side conversation status to open.
Reverse > Side conversation Status is pending or solved > Put parent ticket linked to open.
I assume I need to make a separate connection Zendesk URL just to allow the status work between parent and linked side conversation. Any pointers would be appreciated.
Hi @Ellesh_Miyangar,
Thank you for providing me this information, I think I got it and have a script for you below to set the status of the side conversation to open when your Zendesk ticket is set to the `dev escalation` status.
I have added notes in the script what each part of the script does.
Please note that you will have to apply changes to the statuses in the mapping and also your custom status ID.
The following script will set your Zendesk status and custom status.
When the Zendesk status is set to ‘dev escalation‘ it will check if the ticket has child issues with side conversations.
'when it found the ID’s of the child issues it will set the child issues status to ‘open’.
Add this script in your Zendesk incoming script.
// Declare the status you want to map to the right ID
String defaultStatus = "open"
// Map the status from the default state to the custom status ID
Map customStatusMap = [
(defaultStatus):"39466478821275" // dev escalation
]
// Map the Jira status to the status category of your custom status.
Map statusMap = [
// Jira Status: Zendesk status ("open")
"In Progress":(defaultStatus) // Mapping "In Progress" Jira status to "open" Zendesk status
]
// When mapped, we will add the custom status ID in the body for the API call to set the custom status.
String mappedState = statusMap[replica.status.name] ?: debug.error("State ${replica.status.name} not found in statusMap")
// Ensure the custom status is mapped to the correct custom status ID using `customStatusMap`.
Map body = [
"ticket":[
"custom_status_id": customStatusMap[mappedState] // Add the custom status ID to the ticket
]
]
// Set the custom status in Zendesk
if(!firstSync){
// Set the custom state only on the 2nd sync, so we have the ticket number where we can do an API call on.
httpClient.put("/api/v2/tickets/${issue.key}", JsonOutput.toJson(body)) // Make API call to update the ticket status
}
// To keep the status in the right status type, we need to change the status type as well.
issue.setStatus(mappedState) // Update Jira status based on the mapped state
// Now check if the status is set to 'dev escalation' (39466478821275)
// And it's not the ticket's first sync. (This is so we have a ticket number to do the API call on)
if(customStatusMap[mappedState] == "39466478821275" && !firstSync){
// Fetch the side conversation ID
def sideConvoRes = httpClient.get("/api/v2/tickets/${issue.key}/side_conversations.json")?.side_conversations?.external_ids?.targetTicketId
Map statusBody = [
"ticket":[
"status":"open" // Set the side conversation status to 'open'
]
]
if(sideConvoRes.size() < 2 && !sideConvoRes.isEmpty(){
// Set side conversation ticket state to open if only one side conversation is found
httpClient.put("/api/v2/tickets/${sideConvoRes[0]}.json", JsonOutput.toJson(statusBody))
}else if(sideConvoRes.size() >= 2){
// Iterate over all found side conversations and set their state to open
sideConvoRes.each{
httpClient.put("/api/v2/tickets/${it}.json", JsonOutput.toJson(statusBody))
}
}
}
I hope this helps.
Kind regards,
Christophe De Beule