dw.customer
Class Profile
Object
dw.object.PersistentObject
dw.object.ExtensibleObject
dw.customer.EncryptedObject
dw.customer.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.

Properties
addressBook  :  AddressBook  (Read Only)
The customer's address book.
birthday  :  Date
The customer's birthday as a date.
companyName  :  String
The customer's company name.
credentials  :  Credentials  (Read Only)
The customer's credentials.
customer  :  Customer  (Read Only)
The customer object related to this profile.
customerNo  :  String  (Read Only)
The customer's number, which is a number used to identify the Customer.
email  :  String
The customer's email address.
fax  :  String
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
The customer's first name.
gender  :  EnumValue
The customer's gender.
jobTitle  :  String
The customer's job title.
lastLoginTime  :  Date  (Read Only)
The last login time of the customer.
lastName  :  String
The customer's last name.
lastVisitTime  :  Date  (Read Only)
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)
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
The business phone number to use for the customer.
phoneHome  :  String
The phone number to use for the customer.
phoneMobile  :  String
The mobile phone number to use for the customer.
preferredLocale  :  String
The customer's preferred locale.
previousLoginTime  :  Date  (Read Only)
The time the customer logged in prior to the current login.
previousVisitTime  :  Date  (Read Only)
The time the customer visited the store prior to the current visit.
salutation  :  String
The salutation to use for the customer.
secondName  :  String
The customer's second name.
suffix  :  String
The customer's suffix, such as "Jr." or "Sr.".
taxID  :  String
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)
The masked value of the tax ID.
taxIDType  :  EnumValue
The tax ID type.
title  :  String
The customer's title, such as "Mrs" or "Mr".
wallet  :  Wallet  (Read Only)
The wallet of this customer.
Constructor Summary
This class does not have a constructor, so you cannot create it directly.
Method Summary
getAddressBook() : AddressBook
Returns the customer's address book.
getBirthday() : Date
Returns the customer's birthday as a date.
getCompanyName() : String
Returns the customer's company name.
getCredentials() : Credentials
Returns the customer's credentials.
getCustomer() : Customer
Returns the customer object related to this profile.
getCustomerNo() : String
Returns the customer's number, which is a number used to identify the Customer.
getEmail() : String
Returns the customer's email address.
getFax() : String
Returns the fax number to use for the customer.
getFirstName() : String
Returns the customer's first name.
getGender() : EnumValue
Returns the customer's gender.
getJobTitle() : String
Returns the customer's job title.
getLastLoginTime() : Date
Returns the last login time of the customer.
getLastName() : String
Returns the customer's last name.
getLastVisitTime() : Date
Returns the last visit time of the customer.
getNextBirthday() : Date
Returns the upcoming customer's birthday as a date.
getPhoneBusiness() : String
Returns the business phone number to use for the customer.
getPhoneHome() : String
Returns the phone number to use for the customer.
getPhoneMobile() : String
Returns the mobile phone number to use for the customer.
getPreferredLocale() : String
Returns the customer's preferred locale.
getPreviousLoginTime() : Date
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.
getSalutation() : String
Returns the salutation to use for the customer.
getSecondName() : String
Returns the customer's second name.
getSuffix() : String
Returns the customer's suffix, such as "Jr." or "Sr.".
getTaxID() : String
Returns the tax ID value.
getTaxIDMasked() : String
Returns the masked value of the tax ID.
getTaxIDType() : EnumValue
Returns the tax ID type.
getTitle() : String
Returns the customer's title, such as "Mrs" or "Mr".
getWallet() : Wallet
Returns the wallet of this customer.
isFemale() : boolean
Indicates that the customer is female when set to true.
isMale() : boolean
Indicates that the customer is male when set to true.
setBirthday(aValue : Date) : void
Sets the customer's birthday as a date.
setCompanyName(aValue : String) : void
Sets the customer's company name.
setEmail(aValue : String) : void
Sets the customer's email address.
setFax(number : String) : void
Sets the fax number to use for the customer.
setFirstName(aValue : String) : void
Sets the customer's first name.
setGender(aValue : Number) : void
Sets the customer's gender.
setJobTitle(aValue : String) : void
Sets the customer's job title.
setLastName(aValue : String) : void
Sets the customer's last name.
setPhoneBusiness(number : String) : void
Sets the business phone number to use for the customer.
setPhoneHome(number : String) : void
Sets the phone number to use for the customer.
setPhoneMobile(number : String) : void
Sets the mobile phone number to use for the customer.
setPreferredLocale(aValue : String) : void
Sets the customer's preferred locale.
setSaluation(salutation : String) : void
Sets the salutation to use for the customer.
setSalutation(salutation : String) : void
Sets the salutation to use for the customer.
setSecondName(aValue : String) : void
Sets the customer's second name.
setSuffix(aValue : String) : void
Sets the the customer's suffix.
setTaxID(taxID : String) : void
Sets the tax ID value.
setTaxIDType(taxIdType : String) : void
Sets the tax ID type.
setTitle(aValue : String) : void
Sets the customer's title.
Methods inherited from class ExtensibleObject
Methods inherited from class PersistentObject
Methods inherited from class Object
Method Detail
getAddressBook
getAddressBook() : AddressBook
Returns the customer's address book.
Returns:
the customer's address book.

getBirthday
getBirthday() : Date
Returns the customer's birthday as a date.
Returns:
the customer's birthday as a date.

getCompanyName
getCompanyName() : String
Returns the customer's company name.
Returns:
the customer's company name.

getCredentials
getCredentials() : Credentials
Returns the customer's credentials.
Returns:
the customer's credentials.

getCustomer
getCustomer() : Customer
Returns the customer object related to this profile.
Returns:
customer object related to profile.

getCustomerNo
getCustomerNo() : String
Returns the customer's number, which is a number used to identify the Customer.
Returns:
the customer's number.

getEmail
getEmail() : String
Returns the customer's email address.
Returns:
the customer's email address.

getFax
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
getFirstName() : String
Returns the customer's first name.
Returns:
the customer's first name.

getGender
getGender() : EnumValue
Returns the customer's gender.
Returns:
the customer's gender.

getJobTitle
getJobTitle() : String
Returns the customer's job title.
Returns:
the customer's job title.

getLastLoginTime
getLastLoginTime() : Date
Returns the last login time of the customer.
Returns:
the time, when the customer was last logged in.

getLastName
getLastName() : String
Returns the customer's last name.
Returns:
the customer's last name.

getLastVisitTime
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
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
getPhoneBusiness() : String
Returns the business phone number to use for the customer.
Returns:
the business phone number to use for the customer.

getPhoneHome
getPhoneHome() : String
Returns the phone number to use for the customer.
Returns:
the phone number to use for the customer.

getPhoneMobile
getPhoneMobile() : String
Returns the mobile phone number to use for the customer.
Returns:
the mobile phone number to use for the customer.

getPreferredLocale
getPreferredLocale() : String
Returns the customer's preferred locale.
Returns:
the customer's preferred locale.

getPreviousLoginTime
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
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
getSalutation() : String
Returns the salutation to use for the customer.
Returns:
the salutation to use for the customer.

getSecondName
getSecondName() : String
Returns the customer's second name.
Returns:
the customer's second name.

getSuffix
getSuffix() : String
Returns the customer's suffix, such as "Jr." or "Sr.".
Returns:
the customer's suffix.

getTaxID
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
getTaxIDMasked() : String
Returns the masked value of the tax ID.
Returns:
the masked value of the tax ID

getTaxIDType
getTaxIDType() : EnumValue
Returns the tax ID type.
Returns:
the tax ID type

getTitle
getTitle() : String
Returns the customer's title, such as "Mrs" or "Mr".
Returns:
the customer's title.

getWallet
getWallet() : Wallet
Returns the wallet of this customer.
Returns:
the wallet of this customer.

isFemale
isFemale() : boolean
Indicates that the customer is female when set to true.
Returns:
true if the customer is a female, false otherwise.

isMale
isMale() : boolean
Indicates that the customer is male when set to true.
Returns:
true if the customer is a male, false otherwise.

setBirthday
setBirthday(aValue : Date) : void
Sets the customer's birthday as a date.
Parameters:
aValue - the customer's birthday as a date.

setCompanyName
setCompanyName(aValue : String) : void
Sets the customer's company name.
Parameters:
aValue - the customer's company name.

setEmail
setEmail(aValue : String) : void
Sets the customer's email address.
Parameters:
aValue - the customer's email address.

setFax
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
setFirstName(aValue : String) : void
Sets the customer's first name.
Parameters:
aValue - the customer's first name.

setGender
setGender(aValue : Number) : void
Sets the customer's gender.
Parameters:
aValue - the customer's gender.

setJobTitle
setJobTitle(aValue : String) : void
Sets the customer's job title.
Parameters:
aValue - the customer's job title.

setLastName
setLastName(aValue : String) : void
Sets the customer's last name.
Parameters:
aValue - the customer's last name.

setPhoneBusiness
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
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
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
setPreferredLocale(aValue : String) : void
Sets the customer's preferred locale.
Parameters:
aValue - the customer's preferred locale.

setSaluation
setSaluation(salutation : String) : void
Sets the salutation to use for the customer.
Deprecated:
Parameters:
salutation - the salutation to use for the customer.

setSalutation
setSalutation(salutation : String) : void
Sets the salutation to use for the customer.
Parameters:
salutation - the salutation to use for the customer.

setSecondName
setSecondName(aValue : String) : void
Sets the customer's second name.
Parameters:
aValue - the customer's second name.

setSuffix
setSuffix(aValue : String) : void
Sets the the customer's suffix.
Parameters:
aValue - the customer's suffix.

setTaxID
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
setTaxIDType(taxIdType : String) : void
Sets the tax ID type.
Parameters:
taxIdType - the tax ID type to set

setTitle
setTitle(aValue : String) : void
Sets the customer's title.
Parameters:
aValue - the customer's title.