@avvyr/storefront-sdk - v0.19.0
    Preparing search index...

    Interface CustomerProfile

    interface CustomerProfile {
        addresses?: Address[];
        billingAddress?: Address;
        companies?: CompanyMembership[];
        company?: CompanyMembership | null;
        customerGroup?: CustomerGroupRef | null;
        email: string;
        emailVerified?: boolean;
        hasPassword?: boolean;
        id: string;
        identities?: LinkedIdentity[];
        locale?: string | null;
        name: string;
        phone?: string;
        shippingAddress?: Address;
        status?: string;
        timeZone?: string | null;
        type?: "private" | "company" | "government";
        [key: string]: unknown;
    }

    Indexable

    • [key: string]: unknown
    Index
    addresses?: Address[]
    billingAddress?: Address
    companies?: CompanyMembership[]

    All companies the customer is a member of. Use to build a company switcher.

    company?: CompanyMembership | null

    First company membership, kept for backward compatibility. Prefer companies — a customer may belong to several companies (e.g. a buyer purchasing for multiple clients).

    customerGroup?: CustomerGroupRef | null

    The customer's segment, resolved server-side: their own group, else their company's, else null. The same axis that decides pricing (PriceEntry) and assortment (Catalog.customerGroupIds), so content gated on it cannot drift from what the customer actually pays and sees.

    null is a real and common answer — most customers belong to no group. Treat a missing group as "no group", never as "every group": a gate that reads it the other way opens to exactly the visitors it was meant to exclude.

    Match on id. name is for display only — names get renamed, ids do not.

    email: string
    emailVerified?: boolean
    hasPassword?: boolean

    Whether the customer has set a password (false = magic-link only)

    id: string
    identities?: LinkedIdentity[]

    Sign-in providers connected to the account (Klarna, Google, Microsoft).

    locale?: string | null

    Short language code ("sv"). null = follows the market.

    name: string
    phone?: string
    shippingAddress?: Address
    status?: string
    timeZone?: string | null

    IANA time zone. null = follows the market.

    type?: "private" | "company" | "government"

    Billing type — how the customer wants to be invoiced