customer.created¶
Direction: server → modules. External Moleculer event name: customer.created.
Source and occurrence¶
C++ payload: CustomerRecord. Internal EventBus name: customer.push. Accepted event
code: EV_RECORD_ADD (0).
CustomerManager::AddCustomer emits the source event after the customer has been added
to the runtime cache and its persistence operation has been queued. The event represents
creation accepted by the running platform; it is not an acknowledgement that an external
module received or processed the message.
The Router publishes this event only through the explicit CustomerRecord +
EV_RECORD_ADD mapping. Customer updates use the separate
customer.update contract.
JSON payload¶
The payload is flat; there is no data wrapper.
{
"event_id": "a89e743cf46a4855986aa6769e47a075",
"event_code": 0,
"occurred_at": 1789544721,
"schema_version": 1,
"customer_id": 1001,
"brand": "ion4",
"first_name": "John",
"last_name": "Smith",
"full_name": "John Smith",
"email": "[email protected]",
"phone": "+35700000000",
"language": "en",
"country": "CY",
"status": 1,
"lifecycle_stage": 0,
"affiliate_id": "affiliate-42",
"campaign": "welcome-2026"
}
| Field | JSON type | Source / meaning |
|---|---|---|
customer_id |
integer | Customer identifier |
brand |
string | Customer brand |
first_name |
string | Customer first name |
last_name |
string | Customer last name |
full_name |
string | Customer full name |
email |
string | Customer email, unmasked |
phone |
string | Customer phone, unmasked |
language |
string | CustomerRecord.preferred_language |
country |
string | CustomerRecord.country_of_residence |
status |
integer | Customer status code |
lifecycle_stage |
integer | Customer lifecycle-stage code |
affiliate_id |
string | Affiliate attribution identifier |
campaign |
string | Campaign attribution value |
Common fields: event_id is a 32-character random hexadecimal string; event_code is
0; occurred_at is CustomerRecord.created_time in Unix seconds; schema_version is
an integer and is currently 1. A zero source timestamp remains zero.
Personal data and consumer rules¶
Email, phone and names are intentionally unmasked so trusted delivery and workflow modules can act on customer creation. Consumers must treat them as personal data: do not write the payload to ordinary logs, analytics or error messages, and retain only fields required for the module's function. Passwords, password hashes and authentication secrets are not included.
Subscription and delivery¶
Subscribe through the module's normal Moleculer event handler for customer.created.
Publication is enabled when server nats.enable is true and is asynchronous,
fire-and-forget, without ACK, retry or durable replay. Queue limit: 4096 business
messages; JSON limit: 16 KiB. New messages can be dropped at either limit and order is
not guaranteed. event_id supports consumer deduplication, not exactly-once delivery.
See shared outbound rules for lifecycle, observability and trust limits. See outbound catalogue for other event families.