Interactive demo · synthetic dataEvery record on this page is fabricated.

Customer Birthday Backfill

The extractor that read birthdays out of free-text notes, and the two rules that stop it doing damage.

The production code behind this demo is my own work — implementation, operational run.

Read about the system

WOULD UPDATE

6

NO MONTH FOUND

8

ALREADY SET

1

  1. “her birthday is in March, wants a card”

    c01 · A. Okonkwo

    March

    WOULD UPDATE

  2. “customer ordered in March, follow up on sizing”

    c02 · B. Lindqvist

    —

    NO MONTH FOUND

  3. “birth month: sept”

    c03 · C. Moreau

    —

    NO MONTH FOUND

  4. “BIRTHDAY — DECEMBER”

    c04 · D. Halvorsen

    December

    WOULD UPDATE

  5. “wants a birthday discount, no date given”

    c05 · E. Ferreira

    —

    NO MONTH FOUND

  6. “birthday month is July”

    c06 · F. Nakamura

    July

    WOULD UPDATE

  7. “prefers linen. birthday in August.”

    c07 · G. Adeyemi

    August

    WOULD UPDATE

  8. “returned two items in November”

    c08 · H. Castellan

    —

    NO MONTH FOUND

  9. “birthday April — allergic to wool”

    c09 · I.Варга

    April

    NO UPDATE NEEDED

  10. “shipping address changed in June”

    c10 · J. Oyelaran

    —

    NO MONTH FOUND

  11. “birth month february, second address is the shop”

    c11 · K. Sandoval

    February

    WOULD UPDATE

  12. “no notes”

    c12 · L. Brennan

    —

    NO MONTH FOUND

  13. “asked about the January sale”

    c13 · M. Aliyev

    —

    NO MONTH FOUND

  14. “birthday is on the 3rd, did not say which month”

    c14 · N. Ferrante

    —

    NO MONTH FOUND

  15. “birthday: october. wholesale account.”

    c15 · O. Bergström

    October

    WOULD UPDATE

What is real, and what is simulated

Runs in your browser

  • extractBirthdayMonth — the keyword guard and the word-boundary month search
  • The empty-only write rule from build_metafields, which is what makes a re-run safe

Ported from backfill_customer_birthdays.py. 19 tests assert the behaviour both docstrings describe, including the exact accidental match the source names.

Simulated

  • The Shopify Admin API, the client-credentials grant, pagination, batching and the per-record retry
  • The fifteen customers — every name, id and note is invented