# Using Metafield value change as a Shopify Flow tigger

### Using Metafield value change as a Shopify Flow trigger

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](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<br>

* 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\ <br>

  <figure><img src="/files/TzTNe2T8Ks0ApGbKbE8X" alt=""><figcaption></figcaption></figure>

In case you’re editing an existing definition:

1. Access the app's dashboard and choose the scope for the metafield definition you intend to modify.
2. Locate the desired definition and click the "Edit Field" button (represented by a small pen icon).
3. Check the box marked "Track the value of this field for Shopify Flow."
4. Save your changes.<br>

#### 2. Create your first Shopify Flow triggered by the metafield value change<br>

* 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.

<br>

<figure><img src="/files/miXEITL91NcCPHaNtabE" alt=""><figcaption></figcaption></figure>

<br>

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:

1. Create the Metafield Definition:
2. Define a metafield (e.g., using the Single-line Text type with preset choices like Regular, Silver, Gold, VIP for customer tiers).
3. Crucially, enable the "Track the value of this field for Shopify Flow" option when creating the definition.
4. Set Up the Shopify Flow Workflow:
5. Go to the Shopify Flow app and create a new workflow.
6. Select the "ACF Metafield Value Changed" trigger.
7. Define your conditions (e.g., verify that the updated metafield key is "customer\_tier," matching your definition's name).
8. Choose an Action (e.g., Update the customer note with the new metafield value).
9. Test and Activate:
10. Turn the workflow on.
11. Change the metafield value for a customer.
12. Check the workflow's performance by reviewing the "Recent runs" tab in the Flow app.

Our example flow should look something like this:

<br>

<figure><img src="/files/D3TZEll47oZFBLtfp5MX" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/jd3QcTN50i0JQk8z97Fy" alt=""><figcaption></figcaption></figure>

### 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.

\ <br>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.accentuate.io/flow-integration/using-metafield-value-change-as-a-shopify-flow-tigger.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
