Black Friday

40% off every plan for a year with code BF2026. Until December 2.

See the prices
2.0 Beta

Smootify 2.0 is in public beta. Your 1.x store keeps working. Move when you want.

What changed

Smootify.getCustomer()

the customer (null for a guest) once the session is known

v2.0 beta
Open .md
On this page
  1. Types
  2. Customer

the customer (null for a guest) once the session is known New in 2.0.

getCustomer(): Promise<Customer | null>

Types

Customer

/** The logged-in customer (Shopify's customer accounts). */
export interface Customer {
  /** `gid://shopify/Customer/<id>` */
  id: string;
  displayName: string;
  firstName?: string | null;
  lastName?: string | null;
  tags: string[];
  emailAddress?: { emailAddress: string; marketingState: MarketingState } | null;
  phoneNumber?: { phoneNumber: string; marketingState: MarketingState } | null;
  defaultAddress?: { id: string; name?: string | null; formatted: string[] | string } | null;
  metafields: (CustomerMetafield | null)[];
  companyContacts?: {
    nodes: {
      company: { id: string; name: string; metafields: (CustomerMetafield | null)[] } | null;
      locations: { nodes: { id: string }[] };
    }[];
  } | null;
}

    ↑ ↓ to moveEnter to openEsc to close