Customer Model
Properties
The unique identifier of the customer
Name of the customer. If your app has lastName
, this should be set to firstName
value.
Set this if your app has lastName
and firstName
, otherwise use name
.
It's recommended to specify either email or phone, or both. If none is specified, some features won't be available.
It's recommended to specify either email or phone, or both. If none is specified, some features won't be available.
Array of customer's billing addresses. First address is considered primary
Array of discounts applied to the customer. If your app has customer level discounts, you can specify them in the discounts
array. Make sure you already have a Coupon model to use it here.
If your app associates a currency with a customer, set this field to an ISO currency code ISO 4217.
Arbitrary data in key-value format. Where both key and value are strings.
Code Example
import { Integrator } from '@churnkey/sdk'
export class Customer extends Integrator.Customer {
constructor(customer: YourCustomer) {
super({
id: customer.id,
... // map other properties
})
}
}