Customer
The Customer object represents an individual customer record for business management. Customers can be created through various channels and are linked to appointments, orders, and reservations.
Schema: CustomerSchema
Source: src/core/business-mgt/customer.schema.ts
Attributes​
| Attribute | Type | Required | Default | Description |
|---|---|---|---|---|
id | string | — | — | Unique identifier for the customer |
customerId | string | null | No | — | External system customer ID for integration purposes |
phone_number | string | null | No | — | Primary phone number in E.164 format |
firstname | string | null | No | — | Customer's first name |
lastname | string | null | No | — | Customer's last name |
company | string | No | — | Company name if customer represents a business |
timezone | string | No | — | IANA timezone identifier (e.g., America/New_York) |
email | string | No | — | Primary email address |
preferred_language | string | No | en | ISO 639-1 language code for communications |
preferred_contact_method | enum | No | EMAIL | Preferred channel for notifications. One of EMAIL, PHONE, or SMS. |
best_time_to_call | enum | No | — | Optimal time window for phone contact. One of MORNING, AFTERNOON, or EVENING. |
notes | string | No | — | Internal notes about the customer |
tags | array<string> | No | — | Labels for segmentation |
custom_fields | object | No | — | Additional custom fields for business-specific data |
channelId | string | null | No | — | Communication channel ID where customer was created |
address | Address | No | — | Customer's primary address |
isValidatedNames | boolean | No | false | Whether names have been verified |
createdAt | number | — | — | Unix timestamp when created |
updatedAt | number | — | — | Unix timestamp when last updated |
Example​
{
"id": "cust_abc123",
"customerId": "ext_12345",
"phone_number": "+14155552671",
"firstname": "John",
"lastname": "Smith",
"email": "john.smith@example.com",
"preferred_language": "en",
"preferred_contact_method": "EMAIL",
"best_time_to_call": "AFTERNOON",
"tags": ["vip", "repeat-customer"],
"isValidatedNames": true,
"createdAt": 1709856000000,
"updatedAt": 1709856000000
}
Create / Update Schemas​
| Schema | Description | Omits |
|---|---|---|
CreateCustomerSchema | For creating new customers | id, createdAt, updatedAt, channelId |
UpdateCustomerSchema | For partial updates | All fields optional except id |
Create Example​
const newCustomer: CreateCustomer = {
firstname: "Jane",
lastname: "Doe",
email: "jane.doe@example.com"
};
Update Example​
const updateCustomer: UpdateCustomer = {
id: "cust_abc123",
preferred_contact_method: "SMS",
tags: ["vip", "premium"]
};