Service Configuration
Business service configuration schemas for managing bookable services. Includes service definitions and dynamic field configuration for appointment data collection.
Source: src/core/business-mgt/service-config.schema.ts
BusinessServiceConfig
Configuration for bookable services offered by a business.
Schema: BusinessServiceConfigSchema
Attributes
| Attribute | Type | Required | Default | Description |
|---|---|---|---|---|
id | string | — | — | Unique identifier for the service |
name | string | Yes | — | Display name of the service |
description | string | Yes | — | Detailed description of the service |
duration | number | No | 60 | Service duration in minutes (max 480) |
bufferTime | number | No | 0 | Buffer time between appointments in minutes |
isBookable | boolean | No | true | Whether service can be booked online |
price | number | No | 0 | Service price in account currency |
isActive | boolean | No | true | Whether service is currently available |
requiredDatafieldConfig | ServiceAppointmentFieldConfig | No | — | Dynamic field configuration for appointments |
createdAt | number | — | — | Unix timestamp when created |
updatedAt | number | — | — | Unix timestamp when last updated |
ServiceAppointmentFieldConfig
Service-level configuration for dynamic appointment fields. Part of the three-level dynamic fields hierarchy.
Hierarchy
Organization Level (AppointmentFieldConfigSchema)
│
▼ inherits via appointmentFieldConfigId
Service Level (ServiceAppointmentFieldConfigSchema) ← THIS SCHEMA
│
▼ stores values
Appointment Level (AppointmentAdditionalInfoSchema)
Attributes
| Attribute | Type | Required | Default | Description |
|---|---|---|---|---|
inheritedFieldKeys | array<string> | No | [] | Field keys to inherit from organization config |
fieldOverrides | array<FieldOverride> | No | [] | Overrides for inherited field properties |
additionalFields | array<FieldDefinition> | No | [] | Service-specific field definitions |
isActive | boolean | No | true | Whether field configuration is active |
reuseDetails | boolean | No | false | Whether captured data can be reused |
ServiceQRCode
QR code for direct appointment booking.
Schema: ServiceQRCodeSchema
Attributes
| Attribute | Type | Required | Default | Description |
|---|---|---|---|---|
id | string | Yes | — | Unique identifier for the QR code |
appointmentUrl | string | Yes | — | URL to the appointment booking interface |
qrCodeImage | string | No | — | Base64 encoded QR code image |
serviceId | string | No | — | Specific service ID for direct booking |
Example
{
"id": "svc_abc123",
"name": "Haircut",
"description": "Professional haircut with wash and style",
"duration": 45,
"bufferTime": 15,
"isBookable": true,
"price": 35.00,
"isActive": true,
"requiredDatafieldConfig": {
"inheritedFieldKeys": ["allergies", "preferences"],
"fieldOverrides": [],
"additionalFields": [
{
"fieldKey": "hair_type",
"fieldType": "SELECT",
"label": "Hair Type",
"options": ["Straight", "Wavy", "Curly", "Coily"]
}
],
"isActive": true,
"reuseDetails": true
},
"createdAt": 1709856000000,
"updatedAt": 1709856000000
}
Create / Update Schemas
| Schema | Description | Omits |
|---|---|---|
CreateBusinessServiceSchema | For creating services | id, createdAt, updatedAt |
UpdateBusinessServiceSchema | For updating services | All fields optional except id |