Home
/
Desk
/
iOS
/
Custom fields

Customer fields

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

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.

Light Color Skin
Copy
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.