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.
6
8
1
“her birthday is in March, wants a card”
March
WOULD UPDATE
“customer ordered in March, follow up on sizing”
“birth month: sept”
“BIRTHDAY — DECEMBER”
December
WOULD UPDATE
“wants a birthday discount, no date given”
“birthday month is July”
July
WOULD UPDATE
“prefers linen. birthday in August.”
August
WOULD UPDATE
“returned two items in November”
“birthday April — allergic to wool”
April
NO UPDATE NEEDED
“shipping address changed in June”
“birth month february, second address is the shop”
February
WOULD UPDATE
“no notes”
“asked about the January sale”
“birthday is on the 3rd, did not say which month”
“birthday: october. wholesale account.”
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