> For the complete documentation index, see [llms.txt](https://help.accentuate.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.accentuate.io/flow-examples/syncing-with-external-systems-using-the-acf-metafield-value-change-trigger.md).

# Syncing with External Systems Using the ACF Metafield Value Change Trigger

Keeping your external platforms—like ERPs, CRMs, or inventory management systems—in perfect sync with Shopify can be challenging. By using the ACF Metafield Value Changed trigger in Shopify Flow, you can instantly push data to external systems the moment a custom field is updated in your Accentuate dashboard.

This guide will walk you through building a workflow that detects a metafield change and sends that data to an external API via an HTTP request.

#### Prerequisites

* Shopify Flow is installed on your store.
* You know the endpoint URL and authentication requirements for your external system's API.

#### Step 1: Enable Flow Tracking on Your Metafield

Before Shopify Flow can detect a change, you must explicitly tell Accentuate to track the metafield. (Note: This can only be configured from the Accentuate dashboard, not the native Shopify admin).

1. Open the Accentuate Custom Fields dashboard and navigate to the scope (e.g., Products, Customers) where your metafield is located.
2. Click Add Field to create a new definition, or click the Edit Field (pen icon) next to an existing one.
3. Check the box labeled "Track the value of this field for Shopify Flow."
4. Click Save.

#### Step 2: Select the ACF Trigger in Shopify Flow

Now, let's catch that change in Flow.

1. Open the Shopify Flow app and click Create workflow.
2. Click Select a trigger.
3. In the app sidebar, select Accentuate, then choose the ACF Metafield Value Changed trigger.

Tip: The ACF trigger payload is highly detailed. It passes the metafield's namespace, key, previous\_value, and the new\_value into the workflow, giving you total context over the change.

#### Step 3: Define Your Execution Conditions

To prevent unnecessary API calls to your ERP (or other platforms), add conditions so the workflow only fires for the exact field or value you care about.

1. Click the + button and add a Condition.
2. Set the condition to verify the specific metafield that was changed. For example:
3. Metafield namespace is equal to erp\_sync
4. Metafield key is equal to status
5. Add a secondary condition to check the value itself (e.g., New value is equal to Ready for Export).

#### Step 4: Configure the "Send HTTP Request" Action

This is where the actual sync happens. You will use Flow's native HTTP action to push the ACF data out of Shopify.

1. If the condition is met, click Then and select Action.
2. Choose Shopify's native Send HTTP Request action.
3. Configure your API request details:
4. HTTP Method: Select POST (to create a new record) or PUT/PATCH (to update an existing one).
5. URL: Enter your ERP or external system’s webhook/API endpoint.
6. Headers: Add your necessary authentication.
7. Key: Authorization | Value: Bearer YOUR\_API\_TOKEN
8. Key: Content-Type | Value: application/json
9. Build the Body (Payload): Use Shopify's Liquid variables to inject the ACF trigger data into the JSON structure your ERP expects.

Example JSON Payload:

JSON

```
{
  "product_id": "{{ product.id }}",
  "metafield_key": "{{ trigger.key }}",
  "old_state": "{{ trigger.previous_value }}",
  "new_state": "{{ trigger.new_value }}",
  "timestamp": "{{ flow.run_created_at }}"
}
```

Here's a screenshot of the whole demo workflow:

<figure><img src="/files/6oGeCQGnFdLi9PujXnsj" alt=""><figcaption></figcaption></figure>

#### Step 5: Activate and Test

1. Save your workflow and toggle it to Turn on.
2. Go to the Accentuate dashboard and update the tracked metafield value on a test product or customer.
3. Open the Recent runs tab in Shopify Flow to ensure the workflow executed successfully. A "200 OK" or "201 Created" status on the HTTP Request step indicates the external system successfully received your metafield update!\
   \
   \ <br>

<br>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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-examples/syncing-with-external-systems-using-the-acf-metafield-value-change-trigger.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.
