Skip to main content

Save Delivery Dates to Order Metafields

Share ArrivesBy delivery dates with ERPs, fulfillment platforms, support tools, and custom integrations.

Written by Trevor Reid

ArrivesBy can save delivery dates to Shopify order metafields. This lets ERPs, fulfillment platforms, warehouse tools, support tools, and custom integrations use the same delivery dates calculated by ArrivesBy.

Enable order metafields

  1. In ArrivesBy, open Settings.

  2. Scroll to Advanced.

  3. If you see Order write permissions required, select Enable permissions and approve the request in Shopify.

  4. Turn on Write delivery estimates to order metafields.

  5. Select Save.

Existing orders are not backfilled. Orders receive these metafields when ArrivesBy calculates their delivery dates while the setting is enabled. Your integration should handle orders where one or both metafields are missing.

Order delivery dates

ArrivesBy writes the overall dates to this Shopify order metafield:

  • Namespace: arrivesby

  • Key: order_eta

  • Type: json

{
"ship_date": "2026-08-05",
"earliest_arrival_date": "2026-08-08",
"latest_arrival_date": "2026-08-10"
}
  • ship_date: the earliest ship date across eligible line items.

  • earliest_arrival_date: the earliest arrival date across eligible line items.

  • latest_arrival_date: the latest available arrival date across eligible line items, or null if none has a latest arrival date.

Dates are ISO calendar dates in YYYY-MM-DD format, not timestamps.

Line-item delivery dates

ArrivesBy writes line-item details to a second Shopify order metafield:

  • Namespace: arrivesby

  • Key: line_item_etas

  • Type: json

The value is an array with one entry for each eligible line item that has a visible delivery date:

[
{
"line_item_id": 1234567890,
"admin_graphql_id": "gid://shopify/LineItem/1234567890",
"sku": "SKU-1",
"processing_days": 1,
"min_transit_days": 2,
"max_transit_days": 4,
"rule_name": "Domestic standard",
"earliest_arrival_date": "2026-08-08",
"latest_arrival_date": "2026-08-10"
}
]
  • line_item_id: the numeric Shopify line-item ID.

  • admin_graphql_id: the Shopify Admin GraphQL line-item ID.

  • sku: the variant SKU, or null if the variant does not have a SKU.

  • processing_days: the processing time used to calculate the delivery date.

  • min_transit_days: the minimum transit time used to calculate the delivery date.

  • max_transit_days: the maximum transit time used to calculate the delivery date.

  • rule_name: the name of the ArrivesBy rule matched to the line item.

  • earliest_arrival_date: the earliest calculated arrival date.

  • latest_arrival_date: the latest calculated arrival date, or null if the calculation has no upper bound.

Read the metafields through Shopify

Read each metafield by its namespace and key. Shopify returns the value as a string, so parse it as JSON.

Each metafield also has an updatedAt timestamp. Use it to see when that metafield was last updated. The timestamp is metadata on the Shopify metafield and is not part of the JSON value.

query OrderDeliveryDates($id: ID!) {
order(id: $id) {
orderEta: metafield(namespace: "arrivesby", key: "order_eta") {
value
type
updatedAt
}
lineItemEtas: metafield(namespace: "arrivesby", key: "line_item_etas") {
value
type
updatedAt
}
}
}

When metafields may be missing

  • ArrivesBy does not write delivery-date metafields when an order does not require shipping or does not have a visible delivery date.

  • Line items without an eligible, visible delivery date are omitted from line_item_etas.

  • If an order is cancelled or excluded from ArrivesBy, ArrivesBy removes arrivesby.order_eta and arrivesby.line_item_etas.

  • Turning this setting off stops future writes. It does not remove metafields already saved to existing orders.

Did this answer your question?