How it works
Follow these 4 simple steps to track Shopify refunds in Mixpanel automatically
Refund Created
Refund Created
Retrieve Order
Retrieve Order
Custom Code
Custom Code
Create an Event
Create an Event
Make it your own
Customize this workflow even further:
Add product-level refund details
Modify the custom code to create separate events for each refunded line item instead of one aggregated event, enabling product-specific refund rate analysis and identifying which products drive the most returns.
Include refund method information
Add properties to the Mixpanel event that capture the refund gateway, payment method, or whether it was a store credit versus original payment method refund, helping analyze refund processing patterns.
Send alerts for high-value refunds
Add a filter step before Mixpanel that checks {{custom.total_refund_amount}} and sends Slack notifications when refunds exceed a certain threshold, enabling immediate investigation of significant returns.
Track time-to-refund metrics
Modify the custom code to calculate the days between order creation ({{shopify_1.created_at}}) and refund creation ({{shopify.created_at}}), adding this as a property to analyze how quickly refunds are processed.
Frequently asked questions
What if a refund doesn't have a reason specified?
The Refund Reason property ({{shopify.order_adjustments[0].reason}}) will be empty if no reason was entered when processing the refund. The event will still be created with all other properties populated. Consider adding a filter or default value in the custom code if you want to ensure every event has a reason.
Can I track partial refunds versus full refunds differently?
Yes, add a comparison in the custom code that checks if {{custom.total_refund_amount}} equals the order's {{shopify_1.total_price}} to determine full versus partial refunds, then add this as a property or create different event names for each type.
How are refund amounts calculated when there are multiple transactions?
The custom code loops through all transactions in {{shopify.transactions}} and sums the amounts. The code negates the amounts because Shopify stores refund transaction amounts as positive numbers, but they represent money leaving your account, so the code converts them to negative values for accurate refund total calculation.
What is a template?
MESA templates are fully pre-configured workflows built and vetted by Shopify Experts. Unlike competitor templates that provide basic scaffolds requiring extensive setup, MESA templates come with all data variables properly mapped, required fields configured, and steps ready to activate. You can turn them on immediately and start automating.
Can I customize a template?
Absolutely! While our templates work out-of-the-box, every step can be personalized to match your exact business requirements. Add conditional logic, integrate additional apps, or build more sophisticated workflows. MESA's templates provide a solid foundation that you can expand as needed.
Are templates free?
Yes! Our entire library of expert-built, production-ready templates is free to use. Unlike platforms that charge for premium templates or provide only basic scaffolds, MESA gives you access to hundreds of fully-configured, vetted workflows at no additional cost.
Ready to track Shopify refunds in Mixpanel automatically?
Join thousands who've automated their work and saved an average of 3.5 hours every week.
Start with this template — It's free7-day free trial • 5 min setup • Cancel anytime