Shopify Metafields Reference

The Compatify Shopify app writes one product metafield, under the compatify namespace.

Namespace: compatify
Owner type: PRODUCT
Set via: metafieldsSet GraphQL mutation (the app requests write_products and write_metafields)
compatify.compatible_devicesjson

The Compatify POST /v1/query response for the question "What devices is <product title> compatible with?", stored as the API returned it. The sync writes this key and no other.

Example value
{
  "compatible": true | false | null,
  "confidence": 0.0 to 1.0,
  "source": "where the answer came from",
  "query_intent": "how the question was read",
  "answered_at": "ISO 8601 time of the answer",
  ...the rest of the POST /v1/query response
}

GraphQL mutation example

mutation {
  metafieldsSet(metafields: [
    {
      ownerId: "gid://shopify/Product/123456789"
      namespace: "compatify"
      key: "compatible_devices"
      type: "json"
      value: "{\"compatible\":true,\"confidence\":0.97, ...}"
    }
  ]) {
    metafields { key namespace value }
    userErrors { field message }
  }
}