younifyd
Menu

Get Customer

Get Customer

GET/organizations/{organizationId}/customers/{customerId}

Use it in a workflow

  1. Add a step and choose the Salesforce Commerce Cloud connector.
  2. Pick the Get Customer action (under Shopper Customers).
  3. Fill in the fields below, then reference the result from later steps as {{getCustomer.response.data}}.

Request

Path parameters

customerIdstringrequired

The customer ID.

organizationIdstringrequired

An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f_ecom_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).

Query parameters

siteIdstringrequired

The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites.

expandarray<string>

Expands the response with additional customer data. - addresses (Default) - paymentinstruments (Default) - paymentmethodreferences (Requires Salesforce Payments integration; ignored otherwise) - none (Excludes all expansion data)

Response

Returns 200 with an object. Read it in later steps with {{getCustomer.response.data.<field>}}.

addressesarray<object>

The customer's addresses.

address1string

The first address.

address2string

The second address.

addressIdstringrequired

The ID of the address as specified by account owner.

citystring

The city.

companyNamestring

The company name.

countryCodestringrequired

The two-letter ISO 3166-1 (Alpha-2) country code.

creationDatestring (date-time)

Returns the value of attribute 'creationDate'.

firstNamestring

The first name.

fullNamestring

The full name.

jobTitlestring

The job title.

lastModifiedstring (date-time)

Returns the value of attribute 'lastModified'.

lastNamestringrequired

The last name.

phonestring

The phone number.

postBoxstring

The post box.

postalCodestring

The postal code.

preferredboolean

The preferred attribute.

salutationstring

The salutation.

secondNamestring

The second name.

stateCodestring

The state code.

suffixstring

The suffix.

suitestring

The suite.

titlestring

The title.

authTypestring

The customer's authorization type (indicates whether the customer is a guest or a registered customer).

One ofguestregistered

birthdaystring (date)

The customer's birthday.

companyNamestring

The customer's company name.

crmContactIdstring

The customer's core contact ID.

creationDatestring (date-time)

Returns the value of attribute 'creationDate'.

currentPasswordstring

The shopper's current password. This is only used when attempting to update a shopper's `loginId` in a PATCH call. This value is never returned in any response for security reasons, but is validated and must match shopper's existing password in order to update `loginId`. Otherwise, an HTTP 400 statusCode is returned and the `loginId` is not updated. This field and functionality is available with B2C Commerce version 24.7.

customerIdstring

The customer's number (ID). Both registered and guest customers have an customer ID.

customerNostring

The customer's number (ID). Only a registered customer has a customer number.

emailstring

The customer's email address.

emailVerifiedboolean

Indicates whether the customer's email address has been verified. Only included for customers who registered after the "Enable Email Verification" site preference under "Storefront Login Preferences" was enabled. This is a read-only field. If included in a PATCH or Register customer request, it's ignored. This field is available with B2C Commerce version 26.6.

enabledboolean

A flag indicating whether this customer is enabled and can log in.

faxstring

The customer's fax number. The length is restricted to 32 characters.

firstNamestring

The customer's first name.

genderinteger (int32)

The customer's gender.

hasPasswordboolean

Indicates whether the customer has a password set. A value of `false` means the customer was created via another method (for example, social login or passwordless flow). This is a read-only field. If included in a PATCH or Register customer request, it's ignored. This field is available with B2C Commerce version 26.6.

hashedLoginstring

Represents the read-only hashed value for the `loginId` used for Einstein events. This field is available with B2C Commerce version 24.9.

jobTitlestring

The customer's job title.

lastLoginTimestring (date-time)

The time when the customer last logged in.

lastModifiedstring (date-time)

Returns the value of attribute 'lastModified'.

lastNamestring

The customer's last name.

lastVisitTimestring (date-time)

The time when the customer last visited.

loginstring

The customer's login. In a PATCH call, this field can only be updated by providing a valid `currentPassword` for the shopper. The `loginId` update feature is available with B2C Commerce version 24.7, but is disabled by default. Contact Customer Support to enable this feature.

notestring

The customer's note.

paymentInstrumentsarray<object>

The customer's payment instruments.

bankRoutingNumberstring

The bank routing number.

creationDatestring (date-time)

Returns the value of attribute 'creationDate'.

lastModifiedstring (date-time)

Returns the value of attribute 'lastModified'.

maskedGiftCertificateCodestring

The masked gift certificate code.

paymentCardany

The payment card.

paymentInstrumentIdstring

The payment instrument ID.

paymentMethodIdstring

The payment method ID. Optional if a customer payment instrument ID is specified.

defaultboolean

The default payment instrument.

paymentMethodReferencesarray<object>

Payment method reference information for Salesforce Payments.

typestring

The payment method type. It is read only.

One ofcardsepa_debit

idstring

The gateway ID for the payment method. It is read only.

last4string

The last four digits of the payment method number. It is read only.

accountIdstring

Account identifier

phoneBusinessstring

The customer's business phone number.

phoneHomestring

The customer's home phone number.

phoneMobilestring

The customer's mobile phone number.

preferredLocalestring

The customer's preferred locale.

previousLoginTimestring (date-time)

The time when the customer previously logged in.

previousVisitTimestring (date-time)

The time when the customer last visited the store.

salutationstring

The salutation to use for the customer.

secondNamestring

The customer's second name.

suffixstring

The customer's suffix (for example, "Jr." or "Sr.").

titlestring

The customer's title (for example, "Mrs" or "Mr").

json
{
  "addresses": [
    {
      "addressId": "Home",
      "countryCode": "US",
      "lastName": "Smith",
      "address1": "10 Presidential Way",
      "address2": "Apt-616",
      "city": "New York",
      "companyName": "Acme Inc",
      "creationDate": "9999-12-31T17:12:56.670Z",
      "firstName": "John",
      "fullName": "John Smith",
      "jobTitle": "Supervisor",
      "lastModified": "9999-12-31T17:12:56.670Z"
    }
  ],
  "authType": "registered",
  "birthday": "2025-01-01",
  "companyName": "Acme",
  "crmContactId": "003xx000004WhKe",
  "creationDate": "9999-12-31T00:00:00.0Z",
  "currentPassword": "string",
  "customerId": "dfuisydifu2342usyf",
  "customerNo": "D0000123",
  "email": "johnsmith@email.com",
  "emailVerified": true,
  "enabled": true
}

Need more? See the Salesforce Commerce Cloud guide for connection setup and behaviour shared by every action.