# Is it possible to sync Zendesk ticket related information?

**URL:** <https://community.exalate.com/t/is-it-possible-to-sync-zendesk-ticket-related-information/4737>\
**Category:** General Questions\
**Tags:** cloud-zendesk, migrated\_question\
**Created:** [November 4, 2024, 7:20am UTC](https://community.exalate.com/t/is-it-possible-to-sync-zendesk-ticket-related-information/4737 "2024-11-04T07:20:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![xl8bot](https://dub1.discourse-cdn.com/flex018/user_avatar/community.exalate.com/xl8bot/32/324_2.png) [@xl8bot](https://community.exalate.com/u/xl8bot)\
**Post date:** [November 4, 2024, 7:20am UTC](https://community.exalate.com/t/is-it-possible-to-sync-zendesk-ticket-related-information/4737/1 "2024-11-04T07:20:24Z")

</div>

_Originally asked by Jose Lobo on 16 June 2021 [(original question)](https://oldcommunity.exalate.com/questions/30048522)_

* * *

I am interested in integrating Zendesk **[Ticket related information](https://developer.zendesk.com/api-reference/ticketing/tickets/tickets/#ticket-related-information)** (not the same as common fields).

Check image of Zendesk ticket. The red field called “Incident” changes its count every time there is a new incident associated to this specific ticket

 ![](https://europe1.discourse-cdn.com/flex018/uploads/exalate1/original/1X/2c20634574309a6d88c3966e094aa9baa59c2e66.png) ![](https://europe1.discourse-cdn.com/flex018/uploads/exalate1/original/1X/5747721c19b49609af4bca4918b55992c7d772d1.png)

* * *

---

<div class="post-metadata">

**Author:** ![xl8bot](https://dub1.discourse-cdn.com/flex018/user_avatar/community.exalate.com/xl8bot/32/324_2.png) [@xl8bot](https://community.exalate.com/u/xl8bot)\
**Post date:** [November 4, 2024, 7:20am UTC](https://community.exalate.com/t/is-it-possible-to-sync-zendesk-ticket-related-information/4737/2 "2024-11-04T07:20:25Z")

</div>

_Answer by Francis Martens (Exalate) on 16 June 2021_

Yes, you can.

Whenever something is missing in the Exalate API - you can always get to the REST exposed ticket information using the httpClient.

1) First step is to understand what the REST api is returning

- Create a scripted connection
- Add to the outgoing sync following code

**ZENDESK - Outgoing**

```auto
def related = httpClient.get("/api/v2/tickets/${ticket.id}/related")
debug.error("Result = ${related}")

```

- Sync a Zendesk ticket

The debug.error will raise an error (which is intended) showing

```auto
Result = [ticket_related:[from_archive:false, url:https://d3v-francis.zendesk.com/api/v2/tickets/121/related.json, jira_issue_ids:[], incidents:3.0, followup_source_ids:[]]]

```

There you can see that the information returned by the call is a map with one entry ‘ticket\_related’  
ticket\_related is a map with a couple of fields including ‘incidents’

2) With this knowledge in your backpack, you can now extract the incident information and add it to the replica

```auto
def related = httpClient.get("/api/v2/tickets/${ticket.id}/related")
replica.incidentCount = related?.ticket_related?.incidents

```

Make sure you use the safety operator in case the get returns nothing

* * *
