Skip to main content

Customer

This entity represents a customer of the store, typically an individual person. A Customer can be a guest, in which case it has no associated User. Customers with registered account will have an associated User entity.

Signature
class Customer extends VendureEntity implements ChannelAware, HasCustomFields, SoftDeletable {    constructor(input?: DeepPartial<Customer>)    @Column({ type: Date, nullable: true })    deletedAt: Date | null;    @Column({ nullable: true })    title: string;    @Column() firstName: string;    @Column() lastName: string;    @Column({ nullable: true })    phoneNumber: string;    @Column()    emailAddress: string;    @ManyToMany(type => CustomerGroup, group => group.customers)    @JoinTable()    groups: CustomerGroup[];    @OneToMany(type => Address, address => address.customer)    addresses: Address[];    @OneToMany(type => Order, order => order.customer)    orders: Order[];    @OneToOne(type => User, { eager: true })    @JoinColumn()    user?: User;    @Column(type => CustomCustomerFields)    customFields: CustomCustomerFields;    @ManyToMany(type => Channel, channel => channel.customers)    @JoinTable()    channels: Channel[];}

constructor

method(input?: DeepPartial<Customer>) => Customer

deletedAt

propertyDate | null

title

propertystring

firstName

propertystring

lastName

propertystring

phoneNumber

propertystring

emailAddress

propertystring

groups

propertyCustomerGroup[]

addresses

propertyAddress[]

orders

propertyOrder[]

user

propertyUser

customFields

propertyCustomCustomerFields

channels

propertyChannel[]
Was this chapter helpful?
Report Issue
Edited Feb 4, 2026·Edit this page