How it works

Follow these 5 simple steps to start automatically tagging first-time Recharge subscription orders in your Shopify store

recharge logo icon

Order Created

App connector: Recharge • Time to complete: 0 minutes (Auto-configured)
Why this matters: This trigger detects when a new subscription order is created in Recharge and starts the entire tagging process automatically.

This step monitors your Recharge account for newly created orders and captures all the order details including customer information and line items. The trigger activates automatically whenever a customer places a new subscription order, gathering the data needed to determine if this is their first subscription purchase. No configuration is required - MESA connects to your Recharge account and listens for new order events in real-time.

Loop

App connector: Loop • Time to complete: 0 minutes (Auto-configured)
Why this matters: This step processes each individual product in the order separately, ensuring every subscription item gets evaluated for first-time status.

The Loop step takes each line item from the subscription order and processes them one by one, since customers can order multiple different subscription products in a single transaction. This ensures that if someone orders both coffee and protein powder subscriptions for the first time, both products get properly evaluated and tagged. The loop automatically iterates through all line items and passes each product's purchase item ID to the next step for individual analysis.

List Order

App connector: Recharge • Time to complete: 0 minutes (Auto-configured)
Why this matters: This step searches Recharge's order history to count how many times this specific customer has ordered this particular subscription product.

This step queries Recharge's API to find all previous orders from the same customer for the same subscription product using the customer ID and purchase item ID. It retrieves the complete order history to determine if this is truly the customer's first time ordering this specific subscription item. The search results get passed to the filter step, which will count the total number of matching orders to make the first-time determination.

Filter: Check to see if it's the customer's first-ever order

App connector: Filter • Time to complete: 0 minutes (Auto-configured)
Why this matters: This filter determines whether to apply the first-time tag by checking if only one order exists for this customer-product combination.

The filter examines the order count returned from the previous step and only allows the workflow to continue if exactly one order is found (meaning this is the first time this customer has ordered this specific subscription product). If the count equals 1, the customer gets tagged as a first-time subscriber for this product. If more than one order exists, the workflow stops and no tag is applied, preventing duplicate tagging on repeat orders.

const Mesa = require('vendor/Mesa.js');
const Filter = require('vendor/Filter.js');

/**
 * A Mesa Script exports a class with a script() method.
 */
module.exports = new class {

  /**
   * Mesa Script
   *
   * @param {object} payload The payload data
   * @param {object} context Additional context about this task
   */
  script = (payload, context) => {

    let {a, b, comparison, additional} = context.trigger.metadata;

    if (Filter.process(a, b, comparison, additional)) {
      // Passed the filter, call the next step and pass the original payload
      Mesa.log.debug(`Conditions passed: ${Filter.stringify(a, b, comparison, additional)}`);
      Mesa.output.next(payload);
    }
    else {
      // Did not pass the filter, stop execution by doing nothing
      // Alternatively add code here if you would like something to happen when the conditions do not pass
      Mesa.log.warn(`Conditions (${Filter.stringify(a, b, comparison, additional)}) did not pass, stopping execution`);
      Mesa.log.debug('Full configuration', context.trigger.metadata);
    }
  }
}
Shopify logo icon

Order Add Tag

App connector: Shopify • Time to complete: 1 minute
Why this matters: This step applies the "Subscription First Order" tag to the Shopify order, enabling you to segment and market to new subscription customers.

This action adds the "Subscription First Order" tag directly to the corresponding Shopify order using the external order ID from Recharge. The tag appears in your Shopify admin under the order details, allowing you to create customer segments, trigger email campaigns, or apply special discounts for first-time subscribers. You can customize the tag name in the configuration if you prefer different wording like "New Subscriber" or "First Subscription Order".

Make it your own

Customize this workflow even further:

Add welcome email sequences
Trigger email campaigns in Klaviyo or Mailchimp when the first-time subscription tag gets applied, sending personalized onboarding content to new subscribers.
Create loyalty point bonuses
Connect to your loyalty program to automatically award bonus points when customers place their first subscription order, encouraging long-term commitment.
Generate subscription analytics reports
Send tagged order data to Google Sheets or Airtable to track first-time subscription conversion rates and analyze which products convert best.
Apply first-time subscriber discounts
Use Shopify Scripts or automatic discounts to give special pricing on future orders for customers tagged as first-time subscribers.

Frequently asked questions

Will this tag orders from customers who had subscriptions in the past but cancelled?
Yes, this workflow looks at the complete order history for each specific product. If a customer previously had a coffee subscription, cancelled it, and then starts a new coffee subscription, they won't get tagged as first-time since they already have order history for that product.
Can I change the tag name from "Subscription First Order" to something else?
Absolutely. In Step 5 (Order Add Tag), you can modify the tag field to use any text you prefer, such as "New Subscriber", "First Sub Order", or "VIP Subscriber" to match your store's tagging convention.
What happens if a customer orders multiple different subscription products for the first time in one order?
The Loop step processes each product separately, so if someone orders both coffee and protein subscriptions for the first time, the Shopify order will get tagged once for being a first-time subscription order (not multiple times for each product).
What is a template?
Templates are pre-made workflows by our team of experts. Instead of building a workflow from scratch, these have all the steps needed to complete the task.
Can I personalize a template?
Yes! Every step can be customized to meet your exact requirements. Additionally, you can even add more steps and make it more sophisticated.
Are templates free?
Yes! Our entire library containing hundreds of templates are free to use and customize to your exact needs.

Ready to start automatically tagging first-time Recharge subscription orders in your Shopify store?

Join thousands who've automated their work and saved an average of 3.5 hours every week.

Start with this template — It's free
7-day free trial • 5 min setup • Cancel anytime