01 Software

Customers

Customer and customer address collections

Customers

customers

Stores customer information. Supports repurchase tracking and address book management.

FieldTypeDescriptionRequired
nametextCustomer name
emailemailEmail (unique per tenant, indexed)
phonetextPhone number (indexed)
authProviderselectAuth provider (local, google, apple, kakao, naver)
socialIdtextSocial login ID (indexed)
marketingConsentcheckboxMarketing email consent
consentedAtdateConsent date (auto-set)
notetextareaNotes
metadatajsonMetadata (custom data)
ordersjoinOrder history (orders)
addressesjoinAddress book (customer-addresses)
// Create a customer
const customer = await client.from('customers').create({
  name: 'John Doe',
  email: 'john@example.com',
  phone: '010-1234-5678'
})

// Find customer by email
const response = await client.from('customers').find({
  where: { email: { equals: 'john@example.com' } }
})

customer-addresses

Stores customer shipping addresses. Supports default address selection.

FieldTypeDescriptionRequired
customerrelationshipCustomer reference (customers)
labeltextAddress label (e.g., "Home", "Office")
recipientNametextRecipient name
phonetextPhone number
postalCodetextPostal code
address1textAddress
address2textDetailed address
isDefaultcheckboxDefault address (default: false)
deliveryMessagetextDelivery message
// Get customer addresses
const response = await client.from('customer-addresses').find({
  where: { customer: { equals: customerId } }
})

// Get default address
const response = await client.from('customer-addresses').find({
  where: {
    customer: { equals: customerId },
    isDefault: { equals: true }
  }
})

On this page