# Sync organization from Zendesk to Jira

**URL:** <https://community.exalate.com/t/sync-organization-from-zendesk-to-jira/4277>\
**Category:** General Questions\
**Tags:** onpremise-jira, cloud-jira, cloud-zendesk, migrated\_question\
**Created:** [November 4, 2024, 6:44am UTC](https://community.exalate.com/t/sync-organization-from-zendesk-to-jira/4277 "2024-11-04T06:44:21Z")\
**Posts on this page:** 3\
**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, 6:44am UTC](https://community.exalate.com/t/sync-organization-from-zendesk-to-jira/4277/1 "2024-11-04T06:44:21Z")

</div>

_Originally asked by Juan Grases on 09 July 2020 [(original question)](https://oldcommunity.exalate.com/questions/11340699)_

* * *

How can I sync the organization from zendesk to Jira if the names match?

* * *

---

<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, 6:44am UTC](https://community.exalate.com/t/sync-organization-from-zendesk-to-jira/4277/2 "2024-11-04T06:44:22Z")

</div>

_Answer by Juan Grases on 09 July 2020_

Outgoing Zendesk:

```auto
def orgId = issue.organization_id 
if(orgId){
  def orgName = httpClient.get("/api/v2/organizations/"+(long)orgId+".json").organization.name
  replica.customKeys."Organization" = orgName
}

```

And then in Jira Incoming:

```auto
issue.customFields."Organizations".value = replica.customKeys.Organization

```

* * *

#### Comments:

> **Andy Vander Meulen commented on 30 April 2021**
>
> > I haven’t been able to get this to work. I have a custom field in Jira called “Org.” When I replace “Organization” in the outgoing and incoming script with “Org” I get a Connection Configuration error.

> **Ariel Aguilar commented on 01 May 2021**
>
> > Hi Andy,
> 
> You say you replaced “Organization” to “Org.” in outgoing and incoming script, but it should’ve only been done in the incoming script:
> 
> ```auto
> issue.customFields."Org.".value = replica.customKeys.Organization
> 
> ```
> 
> Leave the Outgoing the same way,
> 
> ```auto
> def orgId = issue.organization_id 
> if(orgId){
> def orgName = httpClient.get("/api/v2/organizations/"+(long)orgId+".json").organization.name
> replica.customKeys."Organization" = orgName
> }
> 
> ```
> 
> Let me know if now works,
> 
> Thanks,
> 
> Ariel

> **Andy Vander Meulen commented on 03 May 2021**
>
> > I would assume when your refer to Outgoing, that I would add the script in the Zendesk Connection and Incoming would go to the Jira Connection. When I add one in either place, it shows up on the other one, so I am confused as to whether or not that is the correct place to add it. Is there a way to add a script so that it only shows up in one or the other?
> 
> This is how I have it configured in Jira.
> 
> ![](https://dub1.discourse-cdn.com/flex018/download/attachments/11340699/image2021-5-3_8-45-34.png?version=1&modificationDate=1620056735442&api=v2)

---

<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 6, 2024, 6:44am UTC](https://community.exalate.com/t/sync-organization-from-zendesk-to-jira/4277/3 "2024-11-06T06:44:27Z")

</div>

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.
