The Shopify 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.
When an order is refunded or cancelled, the Shopify integration adds the following tags to a ticket:
- For refunded orders, the integration adds the tag "shopify_refunded"
- For cancelled orders, the integration adds the tag "shopify_cancelled"
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.
For more information about the Shopify integration, see Setting up the Shopify integration for Support and Chat.
What you'll need
Skill level: Intermediate
Time required: 15 minutes
- Zendesk Explore Professional or Enterprise
- Editor or Admin permissions (see Giving agents access to Explore)
- Ticket data in Zendesk Support
- The Shopify integration for Zendesk Support together with some refunded and cancelled orders
Creating the report
In this section, you'll create a report displaying all tickets for refunded or cancelled Shopify orders.
To create the report
- In Explore, click the reports () icon.
- In the Reports library, click New report.
- On the Select a dataset page, click Support > Support - Tickets, then click Start report.
- Next, create a standard calculated metric that returns tickets that have either of the tags that Shopify adds to indicate returns or cancellations. In the calculations menu.(), click Standard calculated metric.
-
On the Standard calculated metric panel, enter Refunds and cancellations as your metric name, then enter or paste the following formula:
IF (INCLUDES_ANY([Ticket tags], "shopify_refunded", "shopify_cancelled"))
THEN [Ticket ID] ENDIF - When you are finished, click Save.
- In the Metrics panel of the report builder, click Add.
- From the list of metrics, choose Calculated metrics > Refund and cancellation tickets, then click Apply.
- Click the metric you just added and set the metric aggregator to COUNT. Explore displays the number of tickets that have either the shopify_refunded or shopify_cancelled tags.
- Now, you'll create a standard calculated attribute that gives you more information about which orders were cancelled or refunded. In the calculations menu.(), click Standard calculated attribute.
-
On the Standard calculated attribute panel, enter Refunded and cancelled Shopify tickets as your attribute name, then enter or paste the following formula:
IF INCLUDES_ANY([Ticket tags], "shopify_cancelled") THEN "Order cancelled"
ELIF INCLUDES_ANY([Ticket tags], "shopify_refunded") THEN "Order refunded"
ENDIF - When you are finished, click Save.
- In the Rows panel, click Add.
-
From the list of attributes, choose the following:
- Calculated attributes > Refunded and cancelled Shopify tickets
- Ticket > Ticket ID
- Ticket > Ticket subject
- When you are finished, click Apply. Explore displays a list of all tickets and their Shopify refund or cancellation status.
- If you want to remove tickets that don't contain the refund or cancellation tags, click the Refunded and cancelled Shopify tickets attribute and on the Excluded tab of the attribute panel, exclude NULL values.
You'll end up with a report that looks something like the following example:
If you want to make the ticket IDs into clickable hyperlinks to the ticket, see Configuring clickable links to tickets for help.