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.
| Field | Value | Notes |
|---|---|---|
Destination Type | Shopify | |
Operation | Orders metafields | POST /egress/orders-metafields-to-shopify |
GraphQL endpoint URL | https://SHOPIFYURL.myshopify.com/ | Shopify Admin GraphQL endpoint URL |
Admin API access token | shpat_CODICEALFANUMERICO | Or Client ID (API key) + Client secret — see Authentication |
Client ID (API key) | YOUR_CLIENT_ID | |
Client secret | YOUR_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:
| Field | Value | Notes |
|---|---|---|
Base Url | https://adapter.flowlyze.io | Adapter URL |
Resource Path | /api/adp/shopify/egress/orders-metafields-to-shopify | Adapter path for order metafield addition flow |
Headers :: x-api-key | ********** | API key for endpoint interaction verification |
Headers :: x-shopify-graphql-url | https://SHOPIFYURL.myshopify.com/ | Shopify shop URL to connect to |
Headers :: x-shopify-access-token | shpat_CODICEALFANUMERICO | Secret of the custom app created for integration |