Skip to content
Ecomwith

Shopify data model: managing customer, product, and order fields

  • Advanced
  • 105 minutes
  • Pro

Start with a classroom example. PetNest is the pet-supply store used in this series. Order PN-1042 was paid at 09:10 for $126, and its customer had two prior paid orders. Flow adds ops:repeat-high-value-review to prompt an internal review. The amount and history come from the primary records; the tag points an operator back to them. The store, order, and time are teaching examples.

“High-value customer” can mean an analytical segment, support priority, membership benefits, or a marketing audience. Each has different sources, readers, consent requirements, and recovery rules. PN-1042 needing review does not make the customer VIP or Gold, authorize a discount, or establish marketing consent. Define the meaning you need before choosing a field.

If you worked through the Flow lesson, you may already have listed the fields the automation writes. Those writes still do not establish who owns the underlying fact or whether each reader uses it correctly. For each field Flow touches, identify the source of truth, the writer, the readers, and the namespace. These terms are explained below. You can also start here with one field of your own.

A field card explains the source, readers, writers, and recovery

Self-check · 1 question0/1 answered

Record or migrate this field first?

Two systems disagree. What first?

Self-check not answered

Turn “customer tier” or “product material” into a definition you can check. Name the object first: Product, variant, Customer, or Order. Then record the meaning and source. Hold off creating a field with no consumer. When someone needs the value, specify who may update it, how it is validated, customer visibility, downstream dependencies, and recovery after an incorrect read.

The source of truth is the primary record responsible for the current fact. A writer is a person or process allowed to update it; a reader is the theme, Flow, feed, support view, or report that uses it. Business responsibility does not grant an app API write permission. Namespace and key identify the field, type describes the value, and validation sets permitted formats, values, or references. A field definition expresses these rules in a form Shopify can use.

Exercise · pick one

Field-card progress

Fact, object, type, writer, and readers are not yet in one reviewable record.

Series start

Member practice follows

The field cards, case calls, migration record, and recovery live in the member workspace.

Pro · Parts 2-10 · 9 parts

Members: full exercises and records

This part includes

  • Write the source and readers first
  • Preserve evidence on conflict
  • Save samples before migration

Pro $20 / monthYearly $16 / month

Choose a plan, sign in with your email or Google account, and complete payment. You'll have instant access to all member benefits.

  • Unlock every premium lesson
  • Advanced tools and member resources
  • Member-requested courses and ongoing updates
  • Pro community and priority support

Checking your membership…

See the Pro plan
What's the difference between monthly and yearly?

Yearly plans save you 20% with annual payment. Monthly plans offer more flexibility for short-term needs.

What you finished

No checkpoint finished in this lesson yet. Start with “Go to the exercise”.

Self-check not answered

FAQ

What belongs in a metafield versus a metaobject?

A metafield adds an attribute to an existing product, variant, customer, or order, such as material for one item. A metaobject holds structured content maintained independently and referenced by several objects, such as a shared delivery guide. Decide whether the information belongs to one object or needs reuse. Both structures still need a source, permitted writers, and reader access rules.

Why doesn't a tag prove customer tier, payment, or fulfillment?

A tag can flag missing specifications or an order needing review. By itself it does not establish the source, validity period, or person who verified a value. VIP, repeat, and high-value tags point back to primary records; they cannot grant benefits, prove payment or fulfillment, or stand in for marketing consent.

How do I distinguish primary fact, mirror, work cue, and customer copy?

The payment, specification, or membership system maintains the primary fact. A controlled mirror copies needed values through a named process with a sync frequency and stale-data response. A work cue directs a review, while customer copy explains verified information. Record the sources and readers at each layer, then return to the primary record when they disagree.

Sources

Next lesson · 6 of 8

You take away: 1 self-check question

Edition notes

  • Author Ranfeng Wei
  • Published
  • Updated
  • Reviewed
  • Next review

This update: Restored the FAQ and tidied the source list.