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:
Attribute | Type | Description |
---|---|---|
sharedPhones | string[] | An array of phone numbers. |
sharedEmails | string[] | An array of email addresses. |
string | The customer's Twitter handle. | |
string | The customer's Facebook handle. | |
string | The customer's LinkedIn handle. | |
string | The customer's Instagram handle. | |
phones | string[] | Deprecated (v2.5.0) An array of phone numbers. |
emails | string[] | Deprecated (v2.5.0) An array of email addresses. |
Note:
phones
andemails
deprecatedAs of
2.5.0
thephones
andemails
fields have been deprecated in favor ofsharedPhones
andsharedEmails
. These fields behave the same, but more accurately represent the fields they update.
phones
andemails
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.
Updated about 1 month ago