How it works
Follow these 6 simple steps to start receiving automatic alerts when coupon code abuse is detected
Record Created
Record Created
Custom SQL Query
Custom SQL Query
Format order total by day including discounts
Format order total by day including discounts
Compare discount rates to identify coupon abuse
Compare discount rates to identify coupon abuse
Filter: Was coupon abuse detected?
Filter: Was coupon abuse detected?
Send Slack Message
Send Slack Message
*Required: These following must be installed before using this workflow.
Make it your own
Customize this workflow even further:
Include detailed discount data in the alert
Modify the Slack message to include specific numbers from {{custom.json_results}}, showing which days had high discount rates and the exact percentages to provide immediate context for investigation.
Adjust the baseline discount threshold
Change the 10% baseline in the AI prompt to match your actual average discount rate, or create different thresholds for different time periods (like higher baselines during known sale events).
Add email alerts for critical spikes
Connect an email step alongside or after the Slack message to notify leadership or finance teams when discount rates exceed severely abnormal levels, ensuring critical issues reach the right people.
Store abuse incidents in Google Sheets
Add a Google Sheets step after the filter to log every detected abuse instance with timestamp, discount percentage, and AI analysis, creating a historical record for pattern analysis and reporting.
Frequently asked questions
How do I set up the "Shopify Orders" data table that this workflow requires?
The easiest way is to add the template "Store Shopify Orders in a Database". This will setup the table exactly as needed.
If you want to build it from scratch, you'll need to create a separate workflow that syncs Shopify orders to a MESA Data table. Use a "Shopify Order Created" or "Order Updated" trigger and a "Data Record Create or Update" action to populate the table with fields for Created At, Total Price, and Total Discount. This provides the foundation data that the abuse detection workflow analyzes.
Can I change the 10% baseline discount rate to match my business?
Yes, edit the AI prompt in the "Compare discount rates to identify coupon abuse" step and replace "assume 10% if unspecified" with your actual typical discount rate. For example, if your average is 15%, change it to "assume 15% if unspecified" to reduce false positives.
What if I want to check more or less frequently than every hour?
Edit the trigger's poll schedule field. Adjust based on your order volume and how quickly you need to detect abuse. You may need to upgrade in order see faster frequency options.
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 start receiving automatic alerts when coupon code abuse is detected?
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 • 8 min setup • Cancel anytime