When a Zendesk ticket is tagged refund, refunds the customer's latest Shopify order, asking your support lead first for $50 or more.
UsesShopify
Zendesk
Refund Shopify orders from Zendesk refund tickets
When a Zendesk ticket is tagged 'refund', this finds the customer's most recent Shopify order by their email.
Orders under $50 are refunded straight away. Orders of $50 or more wait for your support lead to approve. After a refund the customer gets a reply on the ticket, and every outcome, including no order found, leaves an internal note so the team can see what happened. Change the $50 limit in the step that checks the order's total.
ticket.When a ticket is tagged. Save it as ticket.Who approves refunds of $50 or moreSet
support_lead_email to blank.recent_orders.ShopifyThe order to refundSet
order to recent_orders.orders[0].Is the refund going ahead?Set
approved to true.What happened, for the internal noteBuild the text “Refunded @order.total_display on Shopify order @order.name automatically, as it is under $50.” and save it as
what_happened.No order, or $50 or more?If
recent_orders.count is 0Yes
Change
approved to false.Change approved to false.Build the text “No refund made: there is no Shopify order placed with @ticket.requester_email. Please find the order by hand.” and save it as
what_happened.Build the text “No refund made: there is no Shopify order placed with @ticket.requester_email. Please find the order by hand.” and save it as what_happened.Else if @order.total is greater than or equal to 50
Ask a person: Refund
order.total_display on Shopify order order.name? Save it as decision.Ask a person: Refund order.total_display on Shopify order order.name? Save it as decision.
Who to ask: support_lead_emailCustomer: ticket.requester_name (ticket.requester_email)
Order: order.name for order.total_display
Zendesk ticket: ticket.subject
ticket.urlChange
approved to decision.approved.Change approved to decision.approved.Build the text “The support lead (@decision.decided_by.name) @decision.decision refunding @order.total_display on Shopify order @order.name. @decision.comment” and save it as
what_happened.Build the text “The support lead (@decision.decided_by.name) @decision.decision refunding @order.total_display on Shopify order @order.name. @decision.comment” and save it as what_happened.Otherwise
No steps
Refund going ahead?If
approved is yesYes
order. Save it as refund.Refund order. Save it as refund.ticket. Save it as customer_reply.Hi ticket.requester_first_name,
We've refunded refund.amount_display for your order refund.order_name. It goes back to the card or account you paid with.
Thanks for your patience.ZendeskNo
No steps
ticket. Save it as internal_note.
Visible to the requester: Nowhat_happenedZendesk