Tag Shopify Orders When Specific Discount Codes Are Applied

3 min setup
No coding required
Runs automatically

Gain valuable insights into discount performance by tagging orders when a specific discount code is used. This MESA workflow template automatically applies a custom tag to Shopify orders with designated discount codes, allowing you to analyze promotion effectiveness, segment customers, and track sales trends with ease. Streamline order management and make data-driven marketing decisions.

Shopify logo icon
Order Created
Loop
Shopify logo icon
Order Add Tag

You're in good company

"MESA has been a game changer for us. And, if you ever get stuck, their support team is always super helpful."

  • Ico star
  • Ico star
  • Ico star
  • Ico star
  • Ico star
PetFriendly

"It's like Zapier but exactly designed for Shopify. I have been able to complete all the workflows that I've needed."

  • Ico star
  • Ico star
  • Ico star
  • Ico star
  • Ico star
Zailys

"The MESA team has been amazing at helping us set up our automations. We would highly recommend this app!"

  • Ico star
  • Ico star
  • Ico star
  • Ico star
  • Ico star
Rothy's

How it works

3 steps to start tagging orders when customers use your target discount code

Shopify logo icon

Order Created

App connector: Shopify • Time to complete: 0 minutes (Auto-configured)
Why this matters: This trigger monitors your Shopify store and captures every new order as it comes in, providing all the order data needed to check for discount codes and apply tags.

This step automatically activates whenever a customer completes a purchase in your store. It captures all order details including customer information, purchased items, and any discount codes applied during checkout. No configuration is required - MESA connects directly to your Shopify store's order creation events and passes the complete order data to the next step for processing.

Loop

App connector: Loop • Time to complete: 1 minute
Why this matters: This step examines each discount code used on the order to find matches with your target code, ensuring tags are only applied when the specific code you're tracking is present.

The Loop step processes through all discount codes applied to the order and compares each one against your specified discount code. You'll need to enter the exact discount code you want to track in the filter field - this must match exactly how customers will type it (case-sensitive). When a matching discount code is found, the loop allows the workflow to proceed to the tagging step. If no match is found, the workflow stops without making any changes to the order.

Shopify logo icon

Order Add Tag

App connector: Shopify • Time to complete: 1 minute
Why this matters: This step applies your chosen tag to orders that used the target discount code, making it easy to segment, report on, and analyze these specific orders later.

This action adds a custom tag to the order when the discount code match is confirmed. You'll specify exactly what tag text to add to qualifying orders - choose something descriptive like "VIP-DISCOUNT" or "SUMMER-PROMO-2024" that will help you identify these orders later. The tag appears immediately in your Shopify admin under the order details and can be used for filtering orders, creating customer segments, or generating reports on discount code performance.

Ready to set this up? It only takes 3 minutes.

Our support team will even help you personalize this workflow for free.

Get started →

Make it your own!

Customize this workflow even further:

Set conditional logic for different discount codes
Add multiple Loop steps to track different discount codes and apply unique tags for each one, like "NEWCUSTOMER" for first-time buyer codes and "LOYALTY" for repeat customer discounts.
Connect customer data enrichment
Chain a customer tagging action after the order tag to automatically segment customers who use specific codes, helping you build targeted marketing lists.
Store discount analytics in tables
Save detailed discount usage data including order value, customer email, and timestamp in MESA Tables for comprehensive reporting on promotion performance.
Deploy AI agents for dynamic tagging
Let AI analyze the order contents and discount amount to automatically choose appropriate tags based on your business rules, like "HIGH-VALUE" for orders over a certain threshold.

Common questions

Can I track multiple discount codes in the same workflow?

Will this work with automatic discount codes that don't require customer input?

What happens if a customer uses multiple discount codes on one order?

Ready to start tagging orders when customers use your target discount code?

7-day free trial • 3 min setup • Cancel anytime

Need help? Our automation experts will help you personalize this workflow for free. Contact support