Tag Orders with Payment Method Automatically for Enhanced Insights
This Flow automatically adds a custom attribute with the payment method(s) used to each order, enhancing your data for segmentation and analysis.
The Problem
Without clear, automated data on payment methods, merchants struggle to quickly identify trends, troubleshoot gateway issues, or segment customers based on purchasing behavior. This leads to wasted time manually sifting through order details and missed opportunities for targeted marketing or support improvements.
What This Automation Solves
This Flow starts instantly with the 'Order created' trigger. A 'Run code' action then intelligently extracts and compiles all payment gateway names from the order. A crucial 'Condition' ensures valid payment data exists before the 'Send Admin API request' action seamlessly updates the order with this new, standardized custom attribute.
When to Use This Automation
- You want to analyze payment gateway performance and identify popular methods.
- You need to segment customers based on their preferred payment options for targeted marketing.
- You frequently troubleshoot payment-related issues and require quick access to payment method details.
Workflow
Trigger
Step 1This workflow starts when a new order is created
Action
Step 2Extracts payment gateway names from an order, combines them into a comma-separated string, and creates a new set of custom attributes that includes paymentMethods.
Condition
Step 3Run code payment methods is not empty and exists.
Action
Step 4Updates the customAttributes on the order using orderUpdate
Step-by-Step Setup
- 1
Start your Flow with the 'Order created' trigger.
- 2
Add a 'Run code' action to extract payment gateway names and prepare the 'paymentMethod' custom attribute data.
- 3
Configure a 'Condition' to ensure the 'Run code' action successfully found and formatted payment methods.
- 4
Add a 'Send Admin API request' action to update the order with the new 'paymentMethod' custom attribute.
Related Questions
- Why is it better to add payment methods as a custom attribute?
- Adding payment methods as a custom attribute makes this data easily filterable and reportable directly within Shopify, avoiding manual data extraction or complex analytics setups.
- Can this Flow track multiple payment methods for a single order?
- Yes, the 'Run code' action is designed to identify and combine all payment gateways used in an order (e.g., Shop Pay + a gift card) into a single, comma-separated custom attribute.
- How do I view the 'paymentMethod' custom attribute after it's added?
- Once the Flow runs, you can view the 'paymentMethod' custom attribute on the individual order details page in your Shopify admin, usually found under the 'Additional details' section.
- What happens if an order doesn't have a clear payment method?
- The 'Condition' step in the Flow acts as a safeguard, ensuring the custom attribute is only added if the 'Run code' action successfully identifies and formats valid payment method data, preventing empty or erroneous entries.
Recommended Tools & Apps
Launch this automation
Open Shopify Flow and use this page as your setup blueprint.
Merchant Insight
This custom attribute is invaluable for A/B testing different checkout flows or understanding regional payment preferences without manual data compilation. Use it to tailor customer service scripts or develop targeted campaigns based on how
Related Automations
Tag & Prioritize High-Value Orders Automatically with Flow
Automatically identify and tag orders above a custom threshold, enabling your team to prioritize high-revenue customers for expedited processing and support.
Automate Repeat Customer Tagging for Smarter Segmentation
Automatically identify and tag loyal shoppers after their second purchase, streamlining segmentation for personalized marketing and service.
How to Automatically Tag Orders Using a Discount Code
Automatically segment your orders by applying a 'Discounted' tag whenever a customer uses a promotional code, simplifying reporting and future marketing efforts.