Using Metafield value change as a Shopify Flow tigger
Using Metafield value change as a Shopify Flow tigger
Streamlining your store's internal processes, optimizing time management, and elevating performance can be effectively achieved through task automation. A powerful method to utilize these automations is by employing metafields to trigger specific actions, allowing you to establish a completely flexible setup tailored to your precise requirements.
Prerequisite: Ensure you have installed Shopify Flow (available for free here: https://apps.shopify.com/flow).
How to use triggers?
Shopify Flow triggers can be thought of like sensors in a smart home system. When something happens - like a customer placing an order - it’s similar to a motion sensor detecting movement. The trigger simply signals that an event occurred, while conditions decide whether it’s important, and actions determine what happens next, like turning on lights or sending an alert. In this way, Shopify Flow automations react to events in your store just like a smart home reacts to activity, making processes automatic and efficient.
Here’s a quick example to understand how this actually works.
1. Create or edit the existing metafield definition
Select Scope: From the app's dashboard, choose the scope where you want to define the metafield.
Add Field: Click the "Add Field" button.
Configure Definition: Set your desired definition settings.
Enable Flow Tracking: Check the box labeled "Track the value of this field for Shopify Flow."
Save: Save the changes

In case you’re editing an existing definition:
Access the app's dashboard and choose the scope for the metafield definition you intend to modify.
Locate the desired definition and click the "Edit Field" button (represented by a small pen icon).
Check the box marked "Track the value of this field for Shopify Flow."
Save your changes.
2. Create your first Shopify Flow triggered by the metafield value change
Open the Workflow Creation: Go to the installed Shopify Flow app and click "Create workflow," then "Select a trigger."
Choose the ACF Trigger: In the sidebar, select "Accentuate," and then choose the ACF Metafield Value Changed Trigger.
Define Conditions: Set the specific conditions that must be met before the action is executed.
Configure the Action: Define the action that occurs once the trigger and conditions are met.
Set a Fallback: (Optional, but highly recommended) Create a fallback step in case the conditions are not met.
Activate and Test: Turn on the workflow. Always test your changes with sample data to prevent accidental overrides of existing live data.
3. Check the Recent runs tab
After the Flow is finished, you can review the Recent Runs tab to see its execution details. This section provides comprehensive information about the recently completed Flow, including its status, time stamps, results, and the data utilized during the process.

Additional info: The standardized payload for this trigger contains important details about the metafield change. Specifically, it includes the metafield's namespace and key, as well as both the value it held before the change and the new value that activated the trigger.
Example: Set the Customer status
Automating customer segmentation is possible simply by modifying their metafield values. To achieve this, follow these steps:
Create the Metafield Definition:
Define a metafield (e.g., using the Single-line Text type with preset choices like Regular, Silver, Gold, VIP for customer tiers).
Crucially, enable the "Track the value of this field for Shopify Flow" option when creating the definition.
Set Up the Shopify Flow Workflow:
Go to the Shopify Flow app and create a new workflow.
Select the "ACF Metafield Value Changed" trigger.
Define your conditions (e.g., verify that the updated metafield key is "customer_tier," matching your definition's name).
Choose an Action (e.g., Update the customer note with the new metafield value).
Test and Activate:
Turn the workflow on.
Change the metafield value for a customer.
Check the workflow's performance by reviewing the "Recent runs" tab in the Flow app.
Our example flow should look something like this:


Example: Track the risky orders
Build your own fraud scoring system using metafields.
How it works:
Store a metafield on the customer: customer.metafields.custom.fraud_score (for example, you can name it whatever you want)
Flow logic:
Trigger: Order created
Conditions:
High-risk country OR
Multiple failed payments OR
Shopify fraud analysis = medium/high
Actions:
Increase fraud_score (e.g. +10)
Tag customer: Fraud Risk
Then:
If fraud_score > 20:
Auto-cancel future orders OR
Require manual review
Why this is powerful: Shopify evaluates single orders, but you’re tracking behavior over time.
Additional note: Triggers can only be activated from the Accentuate dashboard. This option isn’t available in the Shopify admin, as Shopify currently doesn’t support using metafield value changes as a trigger.
Last updated