Describe Customer

Updates information about a Customer object in Kustomer.

Use describeCustomer to add predefined and custom attributes to the Customer
object of the customer logged into the chat.

Usage

import KustomerChat from '@kustomer/chat-react-native';

KustomerChat.describeCustomer(
  {
    sharedPhones: ['+1 555 555 5555'],
    sharedEmails: ['[email protected]'],
    twitter: 'someTwitterHandle',
    facebook: 'someFacebookHandle',
    linkedin: 'someLinkedInHandle',
    instagram: 'someInstagramHandle',
  },
  {
    'custom.attribute': 'someValue',
  }
);

Predefined attributes

The following attributes are predefined and can be used to describe the
customer:

AttributeTypeDescription
sharedPhonesstring[]An array of phone numbers.
sharedEmailsstring[]An array of email addresses.
twitterstringThe customer's Twitter handle.
facebookstringThe customer's Facebook handle.
linkedinstringThe customer's LinkedIn handle.
instagramstringThe customer's Instagram handle.
phonesstring[]Deprecated (v2.5.0) An array of phone numbers.
emailsstring[]Deprecated (v2.5.0) An array of email addresses.

🚧

Note: phones and emails deprecated

As of 2.5.0the phonesand emails fields have been deprecated in favor of sharedPhonesand sharedEmails. These fields behave the same, but more accurately represent the fields they update.

phones and emails will continue to work, but may be removed in a future version.

Custom attributes

You can also send the SDK custom attribute values for custom attributes enabled
in Kustomer.

Always use the attribute name instead of the Display Name listed in the
Klasses editor (Settings > Platform > Klasses) in Kustomer. The attribute
name will always be formatted in camelCase or PascalCase without spaces and also
describes the data type for the attribute.

For example, if a custom attribute has a Display Name of "Avg Sat Score" and has
a number data type, then the name may appear as AvgSatScoreNum. You would use
AvgSatScoreNum, the system name for the custom attribute, with the SDK.

Activate custom attributes for the Customer klass

To update custom attributes, ensure you have the custom attribute key-value
pairs activated for the Customer klass on the Kustomer platform. To edit or view
custom attributes for the Customer klass, go to Settings and select Platform >
Klasses > Customer
.

To learn more, see
Define custom attribute in Kustomer
in the Kustomer Help Center.