Explore recipe: Reporting on refunds and cancellations with the Shopify integration

<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_pee">
<table>
<tbody>
<tr>
<td>
<strong>All Suites</strong>
</td>
<td>Professional, Enterprise, or Enterprise Plus</td>
</tr>
</tbody>
</table>
</div>
<div class="article-banner" id="support_with_explore_pe">
<table>
<tbody>
<tr>
<td>
<strong>Support with</strong>
</td>
<td>Explore Professional or Enterprise</td>
</tr>
</tbody>
</table>
</div>
</div><p><span>
</span></p>
<p><span></span></p>
<p><span>The <a href="https://www.zendesk.com/apps/support/shopify-for-zendesk/" rel="undefined" target="_self">Shopify</a> integration for Support and Chat includes an app so agents can view Shopify order information, reducing context switching and serving customers faster. They can also process Shopify order refunds and cancellations in the Support app without leaving the context of their ticket.</span></p>
<p><span>When an order is refunded or cancelled, the Shopify integration adds the following tags to a ticket:</span></p>
<ul>
<li><span>For refunded orders, the integration adds the tag "shopify_refunded"</span></li>
<li><span>For cancelled orders, the integration adds the tag "shopify_cancelled"</span></li>
</ul>
<p><span> In this recipe, you'll learn how you can use these tags to produce Explore reports for your refunded or cancelled Shopify orders. This can help you to detect trends like products or regions with the highest number of cancelled or refunded orders, so you can optimize your operations.</span></p>
<p><span>For more information about the Shopify integration, see </span><a href="https://support.zendesk.com/hc/en-us/articles/4408820093850" target="_self">Setting up the Shopify integration for Support and Chat</a>.</p>
<div aria-labelledby="ariaid-title2" class="topic nested1" id="topic_esh_j1f_thb">
<h2 class="title topictitle2" id="ariaid-title2">What you'll need</h2>
<div class="body">
<p class="p">Skill level:<em> Intermediate</em></p>
<p class="p">Time required:<span> </span><em class="ph i">15 minutes</em></p>
<ul class="ul" id="topic_esh_j1f_thb__ul_ztf_4nk_xgb">
<li class="li" dir="ltr">Zendesk Explore Professional or Enterprise</li>
<li class="li" dir="ltr">Editor or Admin permissions (see<span> </span><a class="xref" href="https://support.zendesk.com/hc/en-us/articles/4408836002970-Adding-users-to-Explore" rel="noopener" target="_blank">Giving agents access to Explore</a>)</li>
<li class="li" dir="ltr">Ticket data in Zendesk Support</li>
<li class="li" dir="ltr">The <a href="https://support.zendesk.com/hc/en-us/articles/4408820093850" target="_self">Shopify integration</a> for Zendesk Support together with some refunded and cancelled orders</li>
</ul>
</div>
</div>
<div aria-labelledby="ariaid-title3" class="topic nested1" id="topic_izp_j1f_thb">
<h2 class="title topictitle2" id="ariaid-title3">Creating the report</h2>
<p>In this section, you'll create a report displaying all tickets for refunded or cancelled Shopify orders.</p>
<p><strong>To create the report</strong></p>
<ol>
<li>
<span><span>In </span>Explore, click the reports (<img alt="" src="https://lh3.googleusercontent.com/Aavxgn53gfH5D5rmJ1Ag2oAut1-aAg10HHpO3WtuI3AKs0C00IcoTFvVZ7S-lzvsArUBIEbiFwAyTRIfglI4vN-YVTDTkf9deaRSlWKOOak5Nl9xQ_J6HXUxB0Ee_mmr6R4KY-ni"></span><span>) icon.</span>
</li>
<li>
<span>In the Reports library, click<span> </span></span><strong>New report</strong><span>.</span>
</li>
<li>
<span>On the<span> </span><strong>Select a dataset</strong><span> </span>page, click<span> </span><strong>Support</strong><span> </span>&gt;<span><strong> Support -</strong> </span><strong>Tickets</strong></span><span>, then click<span> <strong>Start report</strong></span>.</span>
</li>
<li>Next, create a standard calculated metric that returns tickets that have either of the tags that Shopify adds to indicate returns or cancellations. <span>In the calculations menu.</span><span>(</span><img alt="" class="image" id="topic_jrx_ybg_bhb__image_h4g_y24_3fb" src="https://zen-marketing-documentation.s3.amazonaws.com/docs/en/Explore_calculations.png"><span>), click <strong>Standard calculated metric</strong>.</span>
</li>
<li>
<span><span>On the <strong>Standard calculated metric</strong> panel, enter <strong>Refunds and cancellations</strong> as your metric name, then enter or paste the following formula:<br></span></span>
<pre class="pre codeblock">IF (INCLUDES_ANY([Ticket tags], "shopify_refunded", "shopify_cancelled")) <br>THEN [Ticket ID] ENDIF</pre>
</li>
<li><span>When you are finished, click <strong>Save</strong>.<br><img alt="mceclip0.png" height="323" src="https://support.zendesk.com/hc/article_attachments/4408851812378" width="379"><br></span></li>
<li><span>In the <strong>Metrics</strong> panel of the report builder, click <strong>Add</strong>.</span></li>
<li><span>From the list of metrics, choose <strong>Calculated metrics</strong> &gt; <strong>Refund and cancellation tickets</strong>, then click <strong>Apply</strong>.</span></li>
<li>
<span><span>Click the metric you just added and set the metric aggregator to COUNT. Explore displays the number of tickets that have either the <strong>shopify_refunded </strong></span></span><span><span>or <strong>shopify_cancelled</strong> tags</span></span><span>.</span>
</li>
<li>
<span>Now, you'll create a standard calculated attribute that gives you more information about which orders were cancelled or refunded. </span><span>In the calculations menu.</span><span>(</span><img alt="" class="image" id="topic_jrx_ybg_bhb__image_h4g_y24_3fb" src="https://zen-marketing-documentation.s3.amazonaws.com/docs/en/Explore_calculations.png"><span>), click <strong>Standard calculated attribute</strong>.</span>
</li>
<li>
<span><span>On the <strong>Standard calculated attribute</strong> panel, enter <strong>Refunded and cancelled Shopify tickets</strong> as your attribute name, then enter or paste the following formula:<br></span></span>
<pre class="pre codeblock">IF INCLUDES_ANY([Ticket tags], "shopify_cancelled") THEN "Order cancelled"<br>ELIF INCLUDES_ANY([Ticket tags], "shopify_refunded") THEN "Order refunded"<br>ENDIF</pre>
</li>
<li><span>When you are finished, click <strong>Save</strong>.<br><img alt="mceclip0.png" height="349" src="https://support.zendesk.com/hc/article_attachments/4408850713242" width="370"><br></span></li>
<li><span>In the <strong>Rows</strong> panel, click <strong>Add</strong>.</span></li>
<li>
<span>From the list of attributes, choose the following:</span>
<ul>
<li><span><strong>Calculated attributes</strong> &gt; <strong>Refunded and cancelled Shopify tickets</strong></span></li>
<li><span><strong>Ticket</strong> &gt; <strong>Ticket ID</strong></span></li>
<li><span><strong>Ticket</strong> &gt; <strong>Ticket subject</strong></span></li>
</ul>
</li>
<li>
<span>When you are finished, click <strong>Apply</strong>. Explore displays a list of all tickets and their Shopify refund or cancellation status.</span><span></span>
</li>
<li><span>If you want to remove tickets that don't contain the refund or cancellation tags, click the <strong>Refunded and cancelled Shopify tickets</strong> attribute and on the <strong>Excluded</strong> tab of the attribute panel, exclude NULL values.</span></li>
</ol>
<p><span>You'll end up with a report that looks something like the following example:</span></p>
<p><span><img alt="mceclip1.png" src="https://support.zendesk.com/hc/article_attachments/4408851811994"></span></p>
<p><span>If you want to make the ticket IDs into clickable hyperlinks to the ticket, see </span><a href="https://support.zendesk.com/hc/en-us/articles/4408839123226" target="_self">Configuring clickable links to tickets</a> for help.</p>
</div><script id="docs-schema-markup" type="application/ld+json">{
"@context": "https://schema.org",
"@type": "TechArticle",
"@id": "https://support.zendesk.com/hc/en-us/articles/4408835492634",
"url": "https://support.zendesk.com/hc/en-us/articles/4408835492634-Explore-recipe-Reporting-on-refunds-and-cancellations-with-the-Shopify-integration",
"headline": "Explore recipe: Reporting on refunds and cancellations with the Shopify integration",
"description": "You can create reports to track refunded and cancelled Shopify orders by using specific tags in your ticket data to analyze trends and optimize operations.",
"articleSection": "Ticket reporting recipes",
"datePublished": "2021-10-16T04:05:19+00:00",
"dateModified": "2025-09-06T00:04:13+00:00",
"inLanguage": "en-US",
"mainEntityOfPage": {
"@type": "WebPage",
"@id": "https://support.zendesk.com/hc/en-us/articles/4408835492634"
},
"author": {
"@type": "Organization",
"name": "Zendesk",
"@id": "https://www.zendesk.com"
},
"publisher": {
"@type": "Organization",
"name": "Zendesk",
"@id": "https://www.zendesk.com"
},
"isPartOf": {
"@type": "WebSite",
"name": "Zendesk Help",
"@id": "https://support.zendesk.com/hc/"
},
"about": {
"@type": "SoftwareApplication",
"name": "Zendesk",
"@id": "https://www.zendesk.com",
"softwareAddOn": {
"@type": "SoftwareApplication",
"name": "Explore",
"@id": "https://support.zendesk.com/hc/en-us/sections/4405298856346"
}
}
}</script>