Commerce applications / Case 07
Real scenario · client identity private
Birthday capture inside Shopify customer accounts without a separate backend
An optional birthday field needed to live inside Shopify-hosted customer accounts, beyond the reach of theme code. A custom account extension provided date validation, confirmation before saving, a read-only saved state, and staff corrections through Shopify Admin.
Plain-English summary
What this solved for the business or user
Customers can add their birthday from their account profile without leaving the store's account experience. The form explains that the field is optional, asks them to confirm the date, and shows the saved value afterward. Store staff can handle corrections without a separate dashboard.
01 / Real situation
What was happening
The store wanted birthday information saved on the customer record rather than collected through a disconnected form. Customers were using Shopify's new account experience, where a Liquid section or theme script could not add the required profile field. The intended customer flow allowed one entry through the interface, with later corrections handled by support.
02 / Constraint
Why the obvious solution was not enough
The solution had to use the customer-account extension runtime and Shopify's supported components. It also needed to avoid a separately hosted application server or database. Date handling required particular care: an impossible typed date, a future birthday, or a timezone conversion could produce a value the customer did not intend to save.
03 / Implementation
How the solution works
- Build a merchant-placeable profile block with a Customer Account UI Extension, using Preact and Shopify web components.
- Read and save the birthday through the Customer Account GraphQL API, with the date stored on the Shopify customer record.
- Separate the interface into an empty form, a confirmation dialog, and a saved read-only view so each stage has one clear purpose.
- Validate typed dates as calendar dates, reject impossible or future values, and calculate today's boundary from local date parts rather than a UTC timestamp.
- Repeat the selected date in words before saving, with clear confirmation and cancellation actions.
- Keep loading and error feedback visible. After a successful save, show the stored value and direct correction requests to support.
- Allow staff to correct the customer record through Shopify Admin, with the updated value reflected in the account block.
04 / Release checks
What should be verified before shipping
- Check empty, loading, error, and saved states in the actual customer-account runtime.
- Test manual entry, calendar selection, leap days, impossible dates, and future dates.
- Verify the date boundary around local midnight and confirm that saving does not shift the calendar day.
- Cancel the confirmation dialog and verify no value is saved; confirm and check the resulting customer record.
- Correct the value in Shopify Admin and confirm the account block displays the updated date in its read-only view.
05 / Result
What changed
Birthday capture became part of the customer profile without theme changes or a separately hosted backend. The customer interface becomes read-only after saving, while staff retain a practical correction path in Shopify Admin.
Reusable lessonChoose the extension point that owns the experience. A small feature inside platform-hosted accounts can be simpler to maintain when its interface and data stay within the platform.
