Skip to main content

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​

AttributeTypeRequiredDefaultDescription
idstring——Unique identifier for the customer
customerIdstring | nullNo—External system customer ID for integration purposes
phone_numberstring | nullNo—Primary phone number in E.164 format
firstnamestring | nullNo—Customer's first name
lastnamestring | nullNo—Customer's last name
companystringNo—Company name if customer represents a business
timezonestringNo—IANA timezone identifier (e.g., America/New_York)
emailstringNo—Primary email address
preferred_languagestringNoenISO 639-1 language code for communications
preferred_contact_methodenumNoEMAILPreferred channel for notifications. One of EMAIL, PHONE, or SMS.
best_time_to_callenumNo—Optimal time window for phone contact. One of MORNING, AFTERNOON, or EVENING.
notesstringNo—Internal notes about the customer
tagsarray<string>No—Labels for segmentation
custom_fieldsobjectNo—Additional custom fields for business-specific data
channelIdstring | nullNo—Communication channel ID where customer was created
addressAddressNo—Customer's primary address
isValidatedNamesbooleanNofalseWhether names have been verified
createdAtnumber——Unix timestamp when created
updatedAtnumber——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​

SchemaDescriptionOmits
CreateCustomerSchemaFor creating new customersid, createdAt, updatedAt, channelId
UpdateCustomerSchemaFor partial updatesAll 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"]
};