Describe Customer
Updates information about a Customer object in Kustomer.
Use describeCurrentCustomer
to add custom attributes to the Customer object of the customer logged into the chat.
Kustomer.chatProvider.describeCurrentCustomer(sharedPhone:"12121234567") { result in
switch result {
case .success:
print("ok")
case .failure(let error):
print(error)
}
}
Describe Customer attributes
A list of all standard Customer klass attributes for describeCurrentCustomer
:
Name | Type | Description |
---|---|---|
sharedPhone | String | The customer's phone number as a string |
sharedPhones | [String] | An array of phone numbers associated with this customer |
sharedEmail | String | The customer's email as a string |
sharedEmails | [String] | An array of email addresses associated with this customer |
facebook | String | The customer's Facebook name as a string |
instagram | String | The customer's Instagram account name as a string |
twitter | String | The customer's Twitter account handle as a string |
linkedin | String | The customer's LinkedIn name as a string |
custom attribute | See Use custom attribute values. | See Use custom attribute values. |
emails | [String] | Deprecated 5.0.5: An array of email addresses associated with this customer |
email | String | Deprecated 5.0.5: The customer's email as a string |
phones | [String] | Deprecated 5.0.5: An array of phone numbers associated with this customer |
phone | String | Deprecated 5.0.5: The customer's phone number as a string |
Note:
phones
andemails
deprecatedAs of
5.0.5
thephones
,phone
,emails
, andsharedPhones
,sharedPhone
,sharedEmails
andsharedEmail
. These fields behave the same, but more accurately represent the fields they update.The deprecated fields will continue to work, but may be removed in a future version.
Use custom attributes values
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