Skip to main content

Upsert Order Metafield

This flow allows you to add, update or remove a metafield on a specific Shopify order. For the operation to be successful, metafields must already be defined in the store (in Setting > Metafields and metaobjects > Orders).

It is important that the value type must match what is defined in the metafield (string, number, boolean, etc.), otherwise Shopify will return an error.

Structure

{
"orderName": "#1069",
"metafields": {
"test1": "value1",
"custom.test2": "value2",
"custom.test3": "" // To clear the metafield
}
}

Destination configuration

Configure a Shopify destination and associate it with the flow.

FieldValueNotes
Destination TypeShopify
OperationOrders metafieldsPOST /egress/orders-metafields-to-shopify
GraphQL endpoint URLhttps://SHOPIFYURL.myshopify.com/Shopify Admin GraphQL endpoint URL
Admin API access tokenshpat_CODICEALFANUMERICOOr Client ID (API key) + Client secret — see Authentication
Client ID (API key)YOUR_CLIENT_ID
Client secretYOUR_CLIENT_SECRET

Deprecated — previous configuration (HTTP Adapter)

Deprecated

Configuration via HTTP Adapter with Base Url, Resource Path, and x-api-key header in Settings Override is deprecated. Use the Shopify destination configuration described above.

In addition to the basic data flow configuration, the following Settings Override settings were required:

FieldValueNotes
Base Urlhttps://adapter.flowlyze.ioAdapter URL
Resource Path/api/adp/shopify/egress/orders-metafields-to-shopifyAdapter path for order metafield addition flow
Headers :: x-api-key**********API key for endpoint interaction verification
Headers :: x-shopify-graphql-urlhttps://SHOPIFYURL.myshopify.com/Shopify shop URL to connect to
Headers :: x-shopify-access-tokenshpat_CODICEALFANUMERICOSecret of the custom app created for integration