Desk SDKs iOS v1
Desk SDKs iOS
Desk SDKs
Version 1

Customer fields

Copy link

Customer fields enables you to save additional information of a customer, and there are two ways to save information. Additional information can be added by your agents on the Sendbird Dashboard or by your customers from a client app.

Note: Refer to Prerequisite before saving additional customer information.

Store additional information of a customer

Copy link

Use setCustomerCustomFields() method to let your customers add information about themselves directly from their app. Information must consist of a field and its value, and only the field already registered in Settings > Customer fields on the Sendbird Dashboard can be used.

var customFields = [String: String]()
customFields["gender"] = "Female"
customFields["age"] = "\(30)"

SBDSKMain.setCustomerCustomFields(customFields) { (error) in
    guard error == nil else {
        // Handle error.

// Additional information of the customer is added.
// Some fields can be ignored if they aren't registered on the dashboard.
// Values aren't saved if they don't match the data type of their fields.