GitHub

ShopifyCartBuyerIdentity

interface

import { ShopifyCartBuyerIdentity } from '@daffodil/driver/shopify'

Represents information about the buyer that is interacting with the cart.

interface ShopifyCartBuyerIdentity {
  __typename: "CartBuyerIdentity"
  countryCode: ShopifyCountryCode
  customer: ShopifyCustomer
  deliveryAddressPreferences: ShopifyMailingAddress[]
  email: string
  phone: string
  preferences: ShopifyCartPreferences
  purchasingCompany: ShopifyPurchasingCompany
  walletPreferences: string[]
}

Properties

__typename
"CartBuyerIdentity"
countryCode
ShopifyCountryCode

The country where the buyer is located.

customer
ShopifyCustomer

The customer account associated with the cart.

deliveryAddressPreferences
ShopifyMailingAddress[]

An ordered set of delivery addresses tied to the buyer that is interacting with the cart. The rank of the preferences is determined by the order of the addresses in the array. Preferences can be used to populate relevant fields in the checkout flow.

As of the 2025-01 release, buyerIdentity.deliveryAddressPreferences is deprecated. Delivery addresses are now part of the CartDelivery object and managed with three new mutations:

  • cartDeliveryAddressAdd
  • cartDeliveryAddressUpdate
  • cartDeliveryAddressDelete
email
string

The email address of the buyer that's interacting with the cart.

phone
string

The phone number of the buyer that's interacting with the cart.

preferences
ShopifyCartPreferences

A set of preferences tied to the buyer interacting with the cart. Preferences are used to prefill fields in at checkout to streamline information collection. Preferences are not synced back to the cart if they are overwritten.

purchasingCompany
ShopifyPurchasingCompany

The purchasing company associated with the cart.

walletPreferences
string[]

A set of wallet preferences tied to the buyer that is interacting with the cart. Preferences can be used to populate relevant payment fields in the checkout flow.