Class Profile

The class represents a customer profile. It also provides access to the customers address book and credentials.

Note: this class handles sensitive security-related data. Pay special attention to PCI DSS v3. requirements 2, 4, and 12.

PropertyDescription
addressBook: AddressBook (read-only)Returns the customer's address book.
birthday: DateReturns the customer's birthday as a date.
companyName: StringReturns the customer's company name.
credentials: Credentials (read-only)Returns the customer's credentials.
customer: Customer (read-only)Returns the customer object related to this profile.
customerNo: String (read-only)Returns the customer's number, which is a number used to identify the Customer.
email: StringReturns the customer's email address.
fax: StringReturns the fax number to use for the customer.
female: Boolean (read-only)Indicates that the customer is female when set to true.
firstName: StringReturns the customer's first name.
gender: EnumValueReturns the customer's gender.
jobTitle: StringReturns the customer's job title.
lastLoginTime: Date (read-only)Returns the last login time of the customer.
lastName: StringReturns the customer's last name.
lastVisitTime: Date (read-only)Returns the last visit time of the customer.
male: Boolean (read-only)Indicates that the customer is male when set to true.
nextBirthday: Date (read-only)Returns the upcoming customer's birthday as a date.
phoneBusiness: StringReturns the business phone number to use for the customer.
phoneHome: StringReturns the phone number to use for the customer.
phoneMobile: StringReturns the mobile phone number to use for the customer.
preferredLocale: StringReturns the customer's preferred locale.
previousLoginTime: Date (read-only)Returns the time the customer logged in prior to the current login.
previousVisitTime: Date (read-only)Returns the time the customer visited the store prior to the current visit.
salutation: StringReturns the salutation to use for the customer.
secondName: StringReturns the customer's second name.
suffix: StringReturns the customer's suffix, such as "Jr." or "Sr.".
taxID: StringReturns the tax ID value.
taxIDMasked: String (read-only)Returns the masked value of the tax ID.
taxIDType: EnumValueReturns the tax ID type.
title: StringReturns the customer's title, such as "Mrs" or "Mr".
wallet: Wallet (read-only)Returns the wallet of this customer.

This class does not have a constructor, so you cannot create it directly.

MethodDescription
getAddressBook()Returns the customer's address book.
getBirthday()Returns the customer's birthday as a date.
getCompanyName()Returns the customer's company name.
getCredentials()Returns the customer's credentials.
getCustomer()Returns the customer object related to this profile.
getCustomerNo()Returns the customer's number, which is a number used to identify the Customer.
getEmail()Returns the customer's email address.
getFax()Returns the fax number to use for the customer.
getFirstName()Returns the customer's first name.
getGender()Returns the customer's gender.
getJobTitle()Returns the customer's job title.
getLastLoginTime()Returns the last login time of the customer.
getLastName()Returns the customer's last name.
getLastVisitTime()Returns the last visit time of the customer.
getNextBirthday()Returns the upcoming customer's birthday as a date.
getPhoneBusiness()Returns the business phone number to use for the customer.
getPhoneHome()Returns the phone number to use for the customer.
getPhoneMobile()Returns the mobile phone number to use for the customer.
getPreferredLocale()Returns the customer's preferred locale.
getPreviousLoginTime()Returns the time the customer logged in prior to the current login.
getPreviousVisitTime()Returns the time the customer visited the store prior to the current visit.
getSalutation()Returns the salutation to use for the customer.
getSecondName()Returns the customer's second name.
getSuffix()Returns the customer's suffix, such as "Jr." or "Sr.".
getTaxID()Returns the tax ID value.
getTaxIDMasked()Returns the masked value of the tax ID.
getTaxIDType()Returns the tax ID type.
getTitle()Returns the customer's title, such as "Mrs" or "Mr".
getWallet()Returns the wallet of this customer.
isFemale()Indicates that the customer is female when set to true.
isMale()Indicates that the customer is male when set to true.
setBirthday(Date)Sets the customer's birthday as a date.
setCompanyName(String)Sets the customer's company name.
setEmail(String)Sets the customer's email address.
setFax(String)Sets the fax number to use for the customer.
setFirstName(String)Sets the customer's first name.
setGender(Number)Sets the customer's gender.
setJobTitle(String)Sets the customer's job title.
setLastName(String)Sets the customer's last name.
setPhoneBusiness(String)Sets the business phone number to use for the customer.
setPhoneHome(String)Sets the phone number to use for the customer.
setPhoneMobile(String)Sets the mobile phone number to use for the customer.
setPreferredLocale(String)Sets the customer's preferred locale.
setSaluation(String)Sets the salutation to use for the customer.
setSalutation(String)Sets the salutation to use for the customer.
setSecondName(String)Sets the customer's second name.
setSuffix(String)Sets the the customer's suffix.
setTaxID(String)Sets the tax ID value.
setTaxIDType(String)Sets the tax ID type.
setTitle(String)Sets the customer's title.

describe, getCustom

getCreationDate, getLastModified, getUUID

assign, create, create, defineProperties, defineProperty, entries, freeze, fromEntries, getOwnPropertyDescriptor, getOwnPropertyNames, getOwnPropertySymbols, getPrototypeOf, hasOwnProperty, is, isExtensible, isFrozen, isPrototypeOf, isSealed, keys, preventExtensions, propertyIsEnumerable, seal, setPrototypeOf, toLocaleString, toString, valueOf, values

addressBook: AddressBook (read-only)

Returns the customer's address book.


birthday: Date

Returns the customer's birthday as a date.


companyName: String

Returns the customer's company name.


credentials: Credentials (read-only)

Returns the customer's credentials.


customer: Customer (read-only)

Returns the customer object related to this profile.


customerNo: String (read-only)

Returns the customer's number, which is a number used to identify the Customer.


email: String

Returns the customer's email address.


fax: String

Returns the fax number to use for the customer. The length is restricted to 32 characters.


female: Boolean (read-only)

Indicates that the customer is female when set to true.


firstName: String

Returns the customer's first name.


gender: EnumValue

Returns the customer's gender.


jobTitle: String

Returns the customer's job title.


lastLoginTime: Date (read-only)

Returns the last login time of the customer.


lastName: String

Returns the customer's last name.


lastVisitTime: Date (read-only)

Returns the last visit time of the customer.


male: Boolean (read-only)

Indicates that the customer is male when set to true.


nextBirthday: Date (read-only)

Returns the upcoming customer's birthday as a date. If the customer already had birthday this year the method returns the birthday of the next year. Otherwise its birthday in this year. If the customer has not set a birthday this method returns null.


phoneBusiness: String

Returns the business phone number to use for the customer.


phoneHome: String

Returns the phone number to use for the customer.


phoneMobile: String

Returns the mobile phone number to use for the customer.


preferredLocale: String

Returns the customer's preferred locale.


previousLoginTime: Date (read-only)

Returns the time the customer logged in prior to the current login.


previousVisitTime: Date (read-only)

Returns the time the customer visited the store prior to the current visit.


salutation: String

Returns the salutation to use for the customer.


secondName: String

Returns the customer's second name.


suffix: String

Returns the customer's suffix, such as "Jr." or "Sr.".


taxID: String

Returns the tax ID value. The value is returned either plain text if the current context allows plain text access, or if it's not allowed, the ID value will be returned masked. The following criteria must be met in order to have plain text access:

  • the method call must happen in the context of a storefront request;
  • the current customer must be registered and authenticated;
  • it is the profile of the current customer;
  • and the current protocol is HTTPS.

taxIDMasked: String (read-only)

Returns the masked value of the tax ID.


taxIDType: EnumValue

Returns the tax ID type.


title: String

Returns the customer's title, such as "Mrs" or "Mr".


wallet: Wallet (read-only)

Returns the wallet of this customer.


getAddressBook(): AddressBook

Returns the customer's address book.

Returns:

  • the customer's address book.

getBirthday(): Date

Returns the customer's birthday as a date.

Returns:

  • the customer's birthday as a date.

getCompanyName(): String

Returns the customer's company name.

Returns:

  • the customer's company name.

getCredentials(): Credentials

Returns the customer's credentials.

Returns:

  • the customer's credentials.

getCustomer(): Customer

Returns the customer object related to this profile.

Returns:

  • customer object related to profile.

getCustomerNo(): String

Returns the customer's number, which is a number used to identify the Customer.

Returns:

  • the customer's number.

getEmail(): String

Returns the customer's email address.

Returns:

  • the customer's email address.

getFax(): String

Returns the fax number to use for the customer. The length is restricted to 32 characters.

Returns:

  • the fax mobile phone number to use for the customer.

getFirstName(): String

Returns the customer's first name.

Returns:

  • the customer's first name.

getGender(): EnumValue

Returns the customer's gender.

Returns:

  • the customer's gender.

getJobTitle(): String

Returns the customer's job title.

Returns:

  • the customer's job title.

getLastLoginTime(): Date

Returns the last login time of the customer.

Returns:

  • the time, when the customer was last logged in.

getLastName(): String

Returns the customer's last name.

Returns:

  • the customer's last name.

getLastVisitTime(): Date

Returns the last visit time of the customer.

Returns:

  • the time, when the customer has visited the storefront the last time (with enabled remember me functionality).

getNextBirthday(): Date

Returns the upcoming customer's birthday as a date. If the customer already had birthday this year the method returns the birthday of the next year. Otherwise its birthday in this year. If the customer has not set a birthday this method returns null.

Returns:

  • the customer's next birthday as a date.

getPhoneBusiness(): String

Returns the business phone number to use for the customer.

Returns:

  • the business phone number to use for the customer.

getPhoneHome(): String

Returns the phone number to use for the customer.

Returns:

  • the phone number to use for the customer.

getPhoneMobile(): String

Returns the mobile phone number to use for the customer.

Returns:

  • the mobile phone number to use for the customer.

getPreferredLocale(): String

Returns the customer's preferred locale.

Returns:

  • the customer's preferred locale.

getPreviousLoginTime(): Date

Returns the time the customer logged in prior to the current login.

Returns:

  • the time the customer logged in prior to the current login.

getPreviousVisitTime(): Date

Returns the time the customer visited the store prior to the current visit.

Returns:

  • the time the customer visited the store prior to the current visit.

getSalutation(): String

Returns the salutation to use for the customer.

Returns:

  • the salutation to use for the customer.

getSecondName(): String

Returns the customer's second name.

Returns:

  • the customer's second name.

getSuffix(): String

Returns the customer's suffix, such as "Jr." or "Sr.".

Returns:

  • the customer's suffix.

getTaxID(): String

Returns the tax ID value. The value is returned either plain text if the current context allows plain text access, or if it's not allowed, the ID value will be returned masked. The following criteria must be met in order to have plain text access:

  • the method call must happen in the context of a storefront request;
  • the current customer must be registered and authenticated;
  • it is the profile of the current customer;
  • and the current protocol is HTTPS.

Returns:

  • the tax ID value

getTaxIDMasked(): String

Returns the masked value of the tax ID.

Returns:

  • the masked value of the tax ID

getTaxIDType(): EnumValue

Returns the tax ID type.

Returns:

  • the tax ID type

getTitle(): String

Returns the customer's title, such as "Mrs" or "Mr".

Returns:

  • the customer's title.

getWallet(): Wallet

Returns the wallet of this customer.

Returns:

  • the wallet of this customer.

isFemale(): Boolean

Indicates that the customer is female when set to true.

Returns:

  • true if the customer is a female, false otherwise.

isMale(): Boolean

Indicates that the customer is male when set to true.

Returns:

  • true if the customer is a male, false otherwise.

setBirthday(aValue: Date): void

Sets the customer's birthday as a date.

Parameters:

  • aValue - the customer's birthday as a date.

setCompanyName(aValue: String): void

Sets the customer's company name.

Parameters:

  • aValue - the customer's company name.

setEmail(aValue: String): void

Sets the customer's email address.

Parameters:

  • aValue - the customer's email address.

setFax(number: String): void

Sets the fax number to use for the customer. The length is restricted to 32 characters.

Parameters:

  • number - the fax number to use for the customer.

setFirstName(aValue: String): void

Sets the customer's first name.

Parameters:

  • aValue - the customer's first name.

setGender(aValue: Number): void

Sets the customer's gender.

Parameters:

  • aValue - the customer's gender.

setJobTitle(aValue: String): void

Sets the customer's job title.

Parameters:

  • aValue - the customer's job title.

setLastName(aValue: String): void

Sets the customer's last name.

Parameters:

  • aValue - the customer's last name.

setPhoneBusiness(number: String): void

Sets the business phone number to use for the customer. The length is restricted to 32 characters.

Parameters:

  • number - the business phone number to use for the customer.

setPhoneHome(number: String): void

Sets the phone number to use for the customer. The length is restricted to 32 characters.

Parameters:

  • number - the phone number to use for the customer.

setPhoneMobile(number: String): void

Sets the mobile phone number to use for the customer. The length is restricted to 32 characters.

Parameters:

  • number - the mobile phone number to use for the customer.

setPreferredLocale(aValue: String): void

Sets the customer's preferred locale.

Parameters:

  • aValue - the customer's preferred locale.

setSaluation(salutation: String): void

Sets the salutation to use for the customer.

Parameters:

  • salutation - the salutation to use for the customer.

Deprecated:

Use setSalutation(String)


setSalutation(salutation: String): void

Sets the salutation to use for the customer.

Parameters:

  • salutation - the salutation to use for the customer.

setSecondName(aValue: String): void

Sets the customer's second name.

Parameters:

  • aValue - the customer's second name.

setSuffix(aValue: String): void

Sets the the customer's suffix.

Parameters:

  • aValue - the customer's suffix.

setTaxID(taxID: String): void

Sets the tax ID value. The value can be set if the current context allows write access. The current context allows write access if the currently logged in user owns this profile and the connection is secured.

Parameters:

  • taxID - the tax ID value to set

setTaxIDType(taxIdType: String): void

Sets the tax ID type.

Parameters:

  • taxIdType - the tax ID type to set

setTitle(aValue: String): void

Sets the customer's title.

Parameters:

  • aValue - the customer's title.