Customers and addresses
Overview
Customer master data and addresses, including an async validation step used by pending orders.
Code map
| Piece | Path |
|---|---|
| Customer | src/modules/commerce/customer |
| Address | src/modules/commerce/address |
| Schema | 40-customer.prisma |
Entities: Customer, CustomerIdentity, Address, AddressValidation.
Async work
Pending orders can be queued on address_validation_queue job validate-pending-order (concurrency 5). Marketplace ingestion enqueues that job after the order transaction. AddressValidationScheduler also ticks every minute.
The provider enum includes a Bharat Address path. Compose sets BHARATADDRESS_SIDECAR_URL.
WhatsApp listens for outbox order.address.resolution_triggered.
Business rules
Unknown: which validation statuses block fulfillment and which are advisory. If the sidecar is down, the job retries when the processor throws. The fallback status written on the address is unknown.
API surface
Customer and address controllers, plus provider customer sync (BigCommerce has explicit routes). Customer channel sync interval constant is 12 hours.
Integrations
Channel customer pull is a sync job type customer on sync_queue (concurrency 2).