Choosing Between Shopify Metafields/Metaobjects vs. External Database for Customer Favorite Lists

Hi everyone,

I’m new to the forum, so please be gentle :sweat_smile:
Also, apologies in advance if this ends up under the wrong topic.

My team and I are discussing how to implement a customer favorite list feature for a custom app, and we’re split on whether the data should live inside Shopify metafields/metaobjects or in an external database.

Personally, I lean toward using an external database—but I’m open to being proven wrong.

The feature will be used across both B2B and B2C stores, so flexibility and scalability matter.


Option 1: Shopify Metafields / Metaobjects

Proposed structure

  • Create a metaobject definition: custom_favorite_lists_customer
    → Contains multiple favorite lists for a customer.
  • Create a metaobject definition: custom_favorite_list_customer_ref
    → Unsure whether the value type should be string/text or product reference list.
  • Create a customer metafield: custom_favorite_list_customer_ref
  • Link metaobject → customer metafield
  • Store product references inside the metafield
  • Fetch everything via GraphQL

Pros

  • Visible and manageable directly in the Shopify Admin UI
    (other staff can easily inspect or edit customer favorite lists)
  • No external infrastructure required

Cons

  • Metaobject limits vary by Shopify plan
  • Metafield value size limit (16 KB) may become a bottleneck
  • External systems must authenticate with Shopify to access the data
  • Potential risk of data conflicts if multiple sessions update metafields simultaneously
    (e.g., customers logged in on multiple devices)

Concerns / Open Questions

  • Could frequent updates corrupt metafield/metaobject data?
  • Will Shopify introduce stricter limits in the future?
  • Is this approach too fragile for large or complex favorite lists?

Option 2: External Database (e.g., Supabase)

Proposed structure

  • Create tables such as customer_favorite_list, favorite_list_products, etc.
  • Fetch favorite lists via GraphQL using customer ID as reference

Pros

  • Not tied to Shopify’s metafield/metaobject limits
  • Can be reused across multiple platforms or clients
  • Easier to enrich data (translations, AI‑generated content, mixed content types)
  • More control over schema, indexing, performance, and concurrency

Cons

  • Must handle product cleanup when items are deleted from Shopify
  • Requires authentication/authorization layer
  • Slightly more infrastructure and maintenance overhead

Discussion

This approach gives us more flexibility and is more aligned with standard industry practices.
Experienced developers may find it easier to maintain and extend.


What I’m Looking For

I know there’s no single “correct” answer—both approaches have trade‑offs.

I’d love to hear how others have solved similar problems:

  • Would you store customer favorite lists inside Shopify metafields/metaobjects?
  • Or would you offload everything to an external database?
  • Any pitfalls or best practices you’ve learned along the way?

Thanks in advance for your insights!

1 Like

Hey @sohnDev, welcome to the forums.

For a customer favorites feature, I’d start with metafields/metaobjects. The data lives alongside your customer and product records, so there’s no extra network hop to an external service on every storefront load. Staff can also view and edit favorites directly in the Shopify admin, which is useful for B2B support scenarios.

For a single list per customer, a customer metafield with type list.product_reference works well. Each list holds up to 128 product references. If you need multiple named lists (“Holiday Ideas”, “Reorder”, etc.), create a metaobject definition for the list itself (name field + list.product_reference), then link them to the customer via a list.metaobject_reference metafield. Each named list still holds up to 128 products, but the customer can have up to 256 separate lists.

On your concerns about concurrency: the metafieldsSet mutation supports a compareDigest parameter for compare-and-set writes. If another session updated the value since you last read it, the mutation returns an error instead of silently overwriting. This handles the multi-device scenario.

The 16KB limit coming in API version 2026-04 applies to metafield values, but it mainly affects large JSON blobs. Typed references like list.product_reference store GIDs, not raw JSON, so this is less of a concern for your use case.

More broadly, metaobject entries were increased to 1,000,000 per definition in October 2025, and app-owned definitions now have their own allocation separate from merchant definitions. The real constraint to plan around is the 128 product references per list, but for most B2B/B2C favorites use cases metaobjects handle it with less infrastructure.

3 Likes

Hey @KyleG-Shopify ,

Thanks for clarifying that the team properly was right !
-and the detailed description of limitations, how to make a configuration, etc.

One last question here, could large amount of meta objects have any impact to Shopifys internal lookup ?

And sorry for the late answer,- just wanted to see if other answers would occur.

The number of metaobjects shouldn’t be an issue, but how you structure your app around them could possibly slow things down.

This guide on data modeling should help with some best practices:

1 Like

Thanks again ! Great answer. Will definitely look into this.

1 Like