Synchronizing the status of Zendesk tickets with the status of linked issues in Jira

<body>
<p id="docs-hc-snippet" style="display: none;">This guide describes how to use Jira automation rules to synchronize the status of tickets in Zendesk with the status of linked issues in Jira. For example, if the status of a linked issue in Jira changes to Done, then the status of the ticket in Zendesk is automatically updated to Solved.</p>
<div class="article-banners">
<div id="docs-wmp-link">
<a href="https://support.zendesk.com/hc/en-us/articles/5411234991258-plan" rel="noopener" target="_blank">What's my plan?</a>
</div>

<div class="article-banner" id="suite_all">
<table>
<tbody>
<tr>
<td>
<strong>All Suites</strong>
</td>
<td>Team, Growth, Professional, Enterprise, or Enterprise Plus</td>
</tr>
</tbody>
</table>
</div>

<div class="article-banner" id="support_all">
<table>
<tbody>
<tr>
<td>
<strong>Support</strong>
</td>
<td>Team, Professional, or Enterprise</td>
</tr>
</tbody>
</table>
</div>

</div>
<div id="docs-ai-summary">
<p id="docs-ai-summary-toggle">Verified AI summary <span id="up-triangle">◀</span><span id="down-triangle">▼</span></p>
<p id="docs-ai-summary-content">Synchronize ticket statuses with linked Jira issues using automation rules. Set triggers for status changes, add conditions for linked issues, and configure actions to update ticket statuses. This integration requires admin access to both platforms. Test and troubleshoot using audit logs to ensure seamless operation. Enhance issue tracking and resolution by automating status updates between the two systems.</p>
</div>

<div class="body">

<p class="p">This guide describes how to use Jira automation rules to synchronize the status of
tickets in Zendesk with the status of linked issues in Jira. For example, if the status
of a linked issue in Jira changes to Done, then the status of the ticket in Zendesk is
automatically updated to Solved.</p>
<p class="p">You'll need the following permissions to create this integration:</p>
<div class="p">
<ul class="ul" id="setting_up_jira_automation_rules_to_integrate_with_zendesk__ul_qpy_2jz_4hc">
<li class="li">Admin access to Zendesk to generate an API token</li>
<li class="li">Admin access to Jira to create and configure automation rules</li>
</ul>
</div>
<p class="p">Topics covered in this article:</p>
<div class="p">
<ul class="ul" id="setting_up_jira_automation_rules_to_integrate_with_zendesk__ul_xm3_gqr_4hc">
<li class="li"><a class="xref" href="#defining-your-zendesk-credentials">Getting your Zendesk credentials</a></li>
<li class="li"><a class="xref" href="#creating-a-jira-automation-rule">Creating a Jira automation rule to sync ticket statuses</a></li>
<li class="li"><a class="xref" href="#topic_rzm_kqs_4hc">Examples</a></li>
</ul>
</div>
</div>
<div aria-labelledby="ariaid-title2" class="topic nested1" id="defining-your-zendesk-credentials">
<h2 class="title topictitle2" id="ariaid-title2">Getting your Zendesk credentials</h2>
<div class="body">
<p class="p"><strong class="ph b">To get your Zendesk credentials</strong></p>
<ol class="ol">
<li class="li">Get a Zendesk API token from the Admin Center in your Zendesk account. See <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/4408889192858#topic_tbp_dfb_l2c" target="_blank">Generating API tokens</a>.</li>
<li class="li">Combine the API token with your email address by replacing the placeholders in
the following
string:<p class="p"><code class="ph codeph">{zendesk_email}/token:{copied_api_token}</code></p>
<p class="p">Example:</p>
<p class="p"><code class="ph codeph">jdoe@company.com/token:abc123def456ghi789</code></p>
</li>
<li class="li">Encode your credentials using Base64.<p class="p">Base64 is an encoding scheme. You can
search online for Base64 encoding tools. One option is to use <a class="xref" href="https://www.base64encode.org/" target="_blank">https://www.base64encode.org/</a>.</p>
<p class="p">The credentials in the example in step 2 look as follows after
being encoded using
Base64:</p>
<p class="p"><code class="ph codeph">amRvZUBjb21wYW55LmNvbS90b2tlbjphYmMxMjNkZWY0NTZnaGk3ODk=</code></p>
</li>
<li class="li">Save your encoded credentials to use later in the Jira automation rule.</li>
</ol>
</div>
</div>
<div aria-labelledby="creating-a-jira-automation-rule__title_pj1_sgz_4hc" class="topic nested1" id="creating-a-jira-automation-rule">
<h2 class="title topictitle2" id="creating-a-jira-automation-rule__title_pj1_sgz_4hc">Creating a Jira automation rule to sync ticket statuses</h2>
<div class="body">
<p class="p">Jira automation rules allow you to automate actions in Jira based on criteria that
you set. Automation rules are made up of three parts: </p>
<div class="p">
<ul class="ul" id="creating-a-jira-automation-rule__ul_xmq_4sr_4hc">
<li class="li">triggers that kick off the rule</li>
<li class="li">conditions that determine when the trigger runs</li>
<li class="li">actions that perform tasks in Jira when the trigger runs</li>
</ul>
</div>
<div class="p">
<strong class="ph b">To create an automation rule in Jira to sync ticket statuses</strong><ol class="ol" id="creating-a-jira-automation-rule__ul_ajh_kxr_4hc">
<li class="li">Refer to <a class="xref" href="https://support.atlassian.com/cloud-automation/docs/create-and-edit-jira-automation-rules/" target="_blank">Create and edit Jira automation
rules</a> in the Jira documentation for the detailed procedure.
<p class="p">Jira may change how this feature works over time. Always refer to the
official Jira documentation for the latest information.</p>
</li>
<li class="li">Select <strong class="ph b">Global automation</strong> under <strong class="ph b">System</strong> to create the rule.</li>
<li class="li">Give your rule a descriptive name such as "Sync to Zendesk -
Escalation".</li>
<li class="li">Refer to the following sections to configure the rule to create the
integration with Zendesk:<div class="p">
<ul class="ul" id="creating-a-jira-automation-rule__ul_jcj_5yr_4hc">
<li class="li"><a class="xref" href="#selecting-the-trigger">Define the trigger for the automation rule</a></li>
<li class="li"><a class="xref" href="#adding-the-conditions">Adding a condition for linked issues</a></li>
<li class="li"><a class="xref" href="#adding_the_action">Adding an action to update ticket statuses</a></li>
</ul>
</div>
</li>
<li class="li">Turn on the rule.</li>
</ol>
</div>
</div>
<div aria-labelledby="ariaid-title4" class="topic nested2" id="selecting-the-trigger">
<h3 class="title topictitle3" id="ariaid-title4">Define the trigger for the automation rule</h3>
<div class="body">
<p class="p">Define the trigger so that the automation rule runs when the status of an issue
changes, or <em class="ph i">transitions</em>, to another status.</p>
<p class="p"><strong class="ph b">To define the trigger for the automation rule</strong></p>
<ol class="ol" id="selecting-the-trigger__ol_wmp_wg1_phc">
<li class="li">Select the <strong class="ph b">Issue transitioned</strong> trigger.</li>
<li class="li">In the <strong class="ph b">From status</strong> field, enter the starting status, such as "In
Progress".</li>
<li class="li">In the <strong class="ph b">To status</strong> field, enter the new status, such as "Done".</li>
</ol>
</div>
</div>
<div aria-labelledby="ariaid-title5" class="topic nested2" id="adding-the-conditions">
<h3 class="title topictitle3" id="ariaid-title5">Adding a condition for linked issues</h3>
<div class="body">
<p class="p">You can add a condition to the trigger so that it only runs when the issue is
linked to a Zendesk ticket.</p>
<p class="p">To define this condition, you can use the <strong class="ph b">jira_escalated</strong> label that's
added automatically to an issue when the issue is linked to a Zendesk
ticket.</p>
<p class="p"><strong class="ph b">To add a condition for linked issues</strong></p>
<div class="p">
<ol class="ol" id="adding-the-conditions__ul_s2j_wls_4hc">
<li class="li">Click <strong class="ph b">Add component</strong> to add a condition.</li>
<li class="li">Select the <strong class="ph b">JQL</strong> condition.</li>
<li class="li">In the JQL field, enter <code class="ph codeph">labels = jira_escalated</code>.</li>
</ol>
</div>
</div>
</div>
<div aria-labelledby="ariaid-title6" class="topic nested2" id="adding_the_action">
<h3 class="title topictitle3" id="ariaid-title6">Adding an action to update ticket statuses</h3>
<div class="body">
<p class="p">When a linked issue transitions from one status to another in Jira, the status of
the ticket in Zendesk should be updated. To accomplish this, add an action to
the automation rule that makes an API request to Zendesk to update the ticket
status.</p>
<p class="p"><strong class="ph b">To add an action to update ticket statuses</strong></p>
<div class="p">
<ol class="ol" id="adding_the_action__ol_wkq_gms_4hc">
<li class="li">Click <strong class="ph b">Add component</strong> to add an action.</li>
<li class="li">Select the <strong class="ph b">Send Web Request</strong> action.</li>
<li class="li">Configure the Send Web Request action as outlined in the next
section.</li>
</ol>
</div>
</div>
<div aria-labelledby="ariaid-title7" class="topic nested3" id="topic_akm_vms_4hc">
<h4 class="title topictitle4" id="ariaid-title7">Configuring the Send Web Request action</h4>
<div class="body">
<p class="p">Configure the Send Web Request action as follows:</p>
<ul class="ul" id="topic_akm_vms_4hc__ul_zjb_zms_4hc">
<li class="li">
<p class="p"><strong class="ph b">Web request URL</strong>: Enter the following Zendesk API endpoint:</p>
<p class="p">https://{subdomain}.zendesk.com/api/v2/integrations/jira/{jira_external_key}/post_function </p>
<p class="p">Replace the subdomain placeholder with your Zendesk subdomain.</p>
<p class="p">To get the <code class="ph codeph">jira_external_key</code> value, go to the
Zendesk Admin Center, then select <strong class="ph b">Apps and integrations</strong> &gt;
<strong class="ph b">Integrations</strong> &gt; <strong class="ph b">Jira</strong> &gt; <strong class="ph b">Edit</strong>.</p>
</li>
<li class="li">
<p class="p"><strong class="ph b">HTTP method</strong>: Specify POST</p>
</li>
<li class="li">
<p class="p"><strong class="ph b">Web request body</strong>: Select <strong class="ph b">Custom data</strong>.</p>
</li>
<li class="li">
<p class="p"><strong class="ph b">Custom data</strong>: The custom data for the action is represented as
a JSON object with the following JSON format:</p>
<div class="p">
<table border="1" cellpadding="4" cellspacing="0" class="simpletable" id="topic_akm_vms_4hc__simpletable_ik2_wsr_4hc" summary="">
<col style="width:25%">
<col style="width:25%">
<col style="width:25%">
<col style="width:25%">
<thead>
<tr class="sthead">
<th class="stentry" id="d87e396" style="vertical-align:bottom;text-align:left;">Name</th>
<th class="stentry" id="d87e399" style="vertical-align:bottom;text-align:left;">Type</th>
<th class="stentry" id="d87e402" style="vertical-align:bottom;text-align:left;">Mandatory</th>
<th class="stentry" id="d87e405" style="vertical-align:bottom;text-align:left;">Description</th>
</tr>
</thead>
<tbody>
<tr class="strow">
<td class="stentry" headers="d87e396" style="vertical-align:top;">zendesk_status</td>
<td class="stentry" headers="d87e399" style="vertical-align:top;">string</td>
<td class="stentry" headers="d87e402" style="vertical-align:top;">false</td>
<td class="stentry" headers="d87e405" style="vertical-align:top;">The target status in Zendesk: "open", "pending", or
"solved". You can specify a custom status but make sure
the string exactly matches the string in
Zendesk</td>
</tr>
<tr class="strow">
<td class="stentry" headers="d87e396" style="vertical-align:top;">comment</td>
<td class="stentry" headers="d87e399" style="vertical-align:top;">string</td>
<td class="stentry" headers="d87e402" style="vertical-align:top;">true</td>
<td class="stentry" headers="d87e405" style="vertical-align:top;">Comment to add to the Zendesk ticket. Supports HTML
comments</td>
</tr>
<tr class="strow">
<td class="stentry" headers="d87e396" style="vertical-align:top;">is_public_comment</td>
<td class="stentry" headers="d87e399" style="vertical-align:top;">boolean</td>
<td class="stentry" headers="d87e402" style="vertical-align:top;">false</td>
<td class="stentry" headers="d87e405" style="vertical-align:top;">Whether the comment is visible to end
users</td>
</tr>
<tr class="strow">
<td class="stentry" headers="d87e396" style="vertical-align:top;">issue_id</td>
<td class="stentry" headers="d87e399" style="vertical-align:top;">string</td>
<td class="stentry" headers="d87e402" style="vertical-align:top;">true</td>
<td class="stentry" headers="d87e405" style="vertical-align:top;">Specify the Jira smart value
<code class="ph codeph">{{issue.id}}</code>, which dynamically
provides the issue id at runtime</td>
</tr>
<tr class="strow">
<td class="stentry" headers="d87e396" style="vertical-align:top;">issue_key</td>
<td class="stentry" headers="d87e399" style="vertical-align:top;">string</td>
<td class="stentry" headers="d87e402" style="vertical-align:top;">true</td>
<td class="stentry" headers="d87e405" style="vertical-align:top;">Specify the Jira smart value
<code class="ph codeph">{{issue.key}}</code>, which dynamically
provides the issue key at runtime</td>
</tr>
<tr class="strow">
<td class="stentry" headers="d87e396" style="vertical-align:top;">tags</td>
<td class="stentry" headers="d87e399" style="vertical-align:top;">array</td>
<td class="stentry" headers="d87e402" style="vertical-align:top;">false</td>
<td class="stentry" headers="d87e405" style="vertical-align:top;">Tags to add to the Zendesk ticket</td>
</tr>
</tbody>
</table>
</div>
<p class="p"><strong class="ph b">Example</strong></p>
<div class="p">
<pre class="pre codeblock json"><code>{
"zendesk_status": "solved",
"comment": "Issue has been resolved",
"is_public_comment": false,
"issue_id": "{{issue.id}}",
"issue_key": "{{issue.key}}",
"tags": ["in-assist", "resolved-jira"]
}</code></pre>
</div>
</li>
<li class="li">
<strong class="ph b">Delay execution option</strong>: Select the option: "Delay execution of
subsequent rule actions until we've received a response for this web
request".</li>
<li class="li">
<strong class="ph b">Headers</strong>: Specify the following headers.<div class="p">
<table border="1" cellpadding="4" cellspacing="0" class="simpletable" id="topic_akm_vms_4hc__simpletable_twy_mvr_4hc" summary="">
<col style="width:33.33333333333333%">
<col style="width:33.33333333333333%">
<col style="width:33.33333333333333%">
<thead>
<tr class="sthead">
<th class="stentry" id="d87e535" style="vertical-align:bottom;text-align:left;">Key</th>
<th class="stentry" id="d87e538" style="vertical-align:bottom;text-align:left;">Value</th>
<th class="stentry" id="d87e541" style="vertical-align:bottom;text-align:left;">Hidden checkbox</th>
</tr>
</thead>
<tbody>
<tr class="strow">
<td class="stentry" headers="d87e535" style="vertical-align:top;">Authorization</td>
<td class="stentry" headers="d87e538" style="vertical-align:top;">Basic {your_base64_encoded_credentials}</td>
<td class="stentry" headers="d87e541" style="vertical-align:top;">Checked</td>
</tr>
<tr class="strow">
<td class="stentry" headers="d87e535" style="vertical-align:top;">Content-Type</td>
<td class="stentry" headers="d87e538" style="vertical-align:top;">application/json</td>
<td class="stentry" headers="d87e541" style="vertical-align:top;">Unchecked</td>
</tr>
</tbody>
</table>
</div>
</li>
</ul>
<p class="p">The action should look as follows when you're done:</p>
<img class="image" id="topic_akm_vms_4hc__image_i41_2bs_4hc" src="https://zen-marketing-documentation.s3.amazonaws.com/docs/en/jira_automation_rule_example.png" width="700">
</div>
</div>
</div>
<div aria-labelledby="ariaid-title8" class="topic nested2" id="topic_lp2_jns_4hc">
<h3 class="title topictitle3" id="ariaid-title8">Testing the automation rule</h3>
<div class="body">
<p class="p">This test assumes you configured the automation rule as follows:</p>
<ul class="ul" id="topic_lp2_jns_4hc__ul_h1z_wjz_4hc">
<li class="li">the Jira issue transitions from "In progress" to "Pending"</li>
<li class="li">the issue has a <strong class="ph b">jira_escalated</strong> label</li>
</ul>
<p class="p">You can modify the test to reflect how your rule is configured.</p>
<p class="p"><strong class="ph b">To test the automation rule</strong></p>
<ol class="ol" id="topic_lp2_jns_4hc__ol_vfc_fps_4hc">
<li class="li">Create a test ticket in Zendesk. </li>
<li class="li">Use the Jira app in the ticket interface to create a Jira issue from the
ticket. <p class="p">The app automatically adds the <strong class="ph b">jira_escalated</strong> label to the
new issue in Jira.</p>
</li>
<li class="li">In Jira, change the status of the linked issue from "In Progress" to
"Pending".</li>
<li class="li">Open the linked Zendesk ticket and verify the following:<div class="p">
<ul class="ul" id="topic_lp2_jns_4hc__ul_amq_nps_4hc">
<li class="li">The status has been updated</li>
<li class="li">The comment has been added</li>
<li class="li">The tags have been applied</li>
</ul>
</div>
</li>
</ol>
<p class="p">You can also check the results in the audit logs.</p>
<p class="p"><strong class="ph b">To check the results in the audit logs</strong></p>
<div class="p">
<ol class="ol" id="topic_lp2_jns_4hc__ol_hjx_sps_4hc">
<li class="li">Go to the automation rule in Jira.</li>
<li class="li">Click <strong class="ph b">Audit log</strong> in the toolbar.</li>
<li class="li">Review the execution history.</li>
</ol>
</div>
</div>
<div aria-labelledby="ariaid-title9" class="topic nested3" id="topic_vqg_hmz_4hc">
<h4 class="title topictitle4" id="ariaid-title9">Troubleshooting</h4>
<div class="body">
<p class="p">You may encounter the following problems when testing.</p>
<p class="p"><strong class="ph b">401 Unauthorized Error</strong></p>
<ul class="ul" id="topic_vqg_hmz_4hc__ul_v2v_lmz_4hc">
<li class="li">Verify your Base64 encoded credentials are correct</li>
<li class="li">Ensure the API token is still valid in Zendesk</li>
<li class="li">Check that the <code class="ph codeph">Authorization</code> header format is as
follows: <code class="ph codeph">Basic {base64_string}</code>
</li>
</ul>
<p class="p"><strong class="ph b">404 Not Found Error</strong></p>
<ul class="ul" id="topic_vqg_hmz_4hc__ul_v5c_smz_4hc">
<li class="li">
Verify the endpoint URL is correct
</li>
<li class="li"> Check that the external ID in the URL is valid</li>
</ul>
<p class="p"><strong class="ph b">400 Bad Request Error</strong></p>
<ul class="ul" id="topic_vqg_hmz_4hc__ul_nnr_smz_4hc">
<li class="li">Validate the JSON payload structure</li>
<li class="li">Ensure all required fields are present</li>
<li class="li">Check that the <code class="ph codeph">zendesk_status</code> value is
valid</li>
</ul>
<p class="p"><strong class="ph b">Automation not triggering</strong></p>
<ul class="ul" id="topic_vqg_hmz_4hc__ul_l32_tmz_4hc">
<li class="li">
Verify the conditions match your issue's state
</li>
<li class="li">
Check that the label <strong class="ph b">jira_escalated</strong> is present
</li>
<li class="li">Review the audit log for the automation rule</li>
</ul>
</div>
</div>
</div>
</div>
<div aria-labelledby="ariaid-title10" class="topic nested1" id="topic_rzm_kqs_4hc">
<h2 class="title topictitle2" id="ariaid-title10">Examples</h2>
<div class="body">
<p class="p">The following examples show how to update the status of tickets in Zendesk when the
status of issues in Jira changes to a specific status.</p>
</div>
<div aria-labelledby="ariaid-title11" class="topic nested2" id="topic_x53_m2z_4hc">
<h3 class="title topictitle3" id="ariaid-title11">Jira issue status changes to Escalated</h3>
<div class="body">
<p class="p"><strong class="ph b">Automation rule trigger</strong></p>
<div class="p">
<ul class="ul" id="topic_x53_m2z_4hc__ul_z4y_v2z_4hc">
<li class="li">Issue transitioned to "Escalated"</li>
</ul>
<strong class="ph b">Custom data for Zendesk tickets</strong>
</div>
<div class="p">
<pre class="pre codeblock"><code>{
"zendesk_status": "open",
"comment": "Issue has been escalated",
"is_public_comment": false,
"issue_id": "{{issue.id}}",
"issue_key": "{{issue.key}}",
"tags": ["escalated"]
}</code></pre>
</div>
</div>
</div>
<div aria-labelledby="ariaid-title12" class="topic nested2" id="topic_b2x_dfz_4hc">
<h3 class="title topictitle3" id="ariaid-title12">Jira issue status changes to Done</h3>
<div class="body">
<p class="p"><strong class="ph b">Automation rule trigger</strong></p>
<div class="p">
<ul class="ul" id="topic_b2x_dfz_4hc__ul_c2x_dfz_4hc">
<li class="li">Issue transitioned to "Done"</li>
</ul>
<strong class="ph b">Custom data for Zendesk tickets</strong>
</div>
<div class="p">
<pre class="pre codeblock"><code>{
"zendesk_status": "solved",
"comment": "Issue has been resolved",
"is_public_comment": true,
"issue_id": "{{issue.id}}",
"issue_key": "{{issue.key}}",
"tags": ["resolved"]
}</code></pre>
</div>
</div>
</div>
<div aria-labelledby="ariaid-title13" class="topic nested2" id="topic_bcr_hfz_4hc">
<h3 class="title topictitle3" id="ariaid-title13">Jira issue status changes to Waiting for Customer</h3>
<div class="body">
<p class="p"><strong class="ph b">Automation rule trigger</strong></p>
<div class="p">
<ul class="ul" id="topic_bcr_hfz_4hc__ul_ccr_hfz_4hc">
<li class="li">Issue transitioned to "Waiting for Customer"</li>
</ul>
<strong class="ph b">Custom data for Zendesk tickets</strong>
</div>
<div class="p">
<pre class="pre codeblock"><code>{
"zendesk_status": "pending",
"comment": "Waiting for customer response",
"is_public_comment": false,
"issue_id": "{{issue.id}}",
"issue_key": "{{issue.key}}",
"tags": ["awaiting-response"]
}</code></pre>
</div>
</div>
</div>
</div>
<script id="ai-summary-script">
//<![CDATA[
const ai_summary_style = document.createElement('style');
ai_summary_style.innerHTML = `#styled-article-body{padding:0 0 0}#article-body #docs-ai-summary{background-color:#f3f3f3;border:1px solid #d3d3d3;padding:10px 10px 6px;margin-bottom:16px}#article-body #docs-ai-summary #docs-ai-summary-toggle{font-size:.9em;font-weight:700;margin-bottom:4px;cursor:pointer;display:flex;justify-content:space-between;align-items:center}#article-body #docs-ai-summary #docs-ai-summary-toggle #up-triangle{margin-left:auto;padding-right:10px;display:none}#article-body #docs-ai-summary #docs-ai-summary-toggle #down-triangle{margin-left:auto;padding-right:10px}#article-body #docs-ai-summary #docs-ai-summary-content{font-size:.9em;padding-left:25px;padding-right:25px;margin-bottom:12px}`;
document.head.appendChild(ai_summary_style);

const toggleAISummary = () => {
const summary = document.getElementById("docs-ai-summary-content");
const upTriangle = document.getElementById("up-triangle");
const downTriangle = document.getElementById("down-triangle");
if (summary.style.display === "none") {
summary.style.display = "block";
upTriangle.style.display = "none";
downTriangle.style.display = "inline";
} else {
summary.style.display = "none";
upTriangle.style.display = "inline";
downTriangle.style.display = "none";
}
};

document.getElementById("docs-ai-summary-toggle").addEventListener("click", toggleAISummary);
//]]>
</script>
</body>