Skip to main content

Customers (Persons)

Customers are represented by the Person model (Person) with different types depending on the context.

Person Types

TypeDescription
organizationTenant/organization that uses the platform
customerCustomer of an organization
contactSecondary contact

Customer Fields

FieldDescription
NameName or legal name
NicknameTrade name
Legal nameFull legal name
Document typeCPF or CNPJ
Document numberNormalized (digits only)
Naturenatural (individual) or juridical (legal entity)
Date of birthOptional
AddressesList of addresses (JSON)
PhonesList of phone numbers (JSON)
EmailsList of emails (JSON)
WebsitesList of websites (JSON)
TagsList of tags for categorization
NotesInternal observations
Custom dataCustom fields (JSON)

Hierarchy

Customers belong to an organization via the parentId field:

Organization (type=organization, parentId=null)
├── Customer A (type=customer, parentId=org_id)
├── Customer B (type=customer, parentId=org_id)
└── Contact (type=contact, parentId=org_id)

Validations

  • Document number unique within the organization
  • External code (externalCode) unique per organization
  • Document format restrictions: CPF (11 digits) or CNPJ (14 digits)