Use setCustomFieldValue with an individualProfileId or entityProfileId to set a custom field on a profile.
Setting custom fields on a profile requires the profile-management scope, while setting them on a case
requires case-management.
Required scope: profile-management
Request
mutation setCustomFieldValue($input: SetCustomFieldValueInput!) {
setCustomFieldValue(input: $input) {
... on CustomFieldValues {
customFields {
fieldKey
label
text
selectedOptions {
key
label
}
}
}
... on ValidationErrors {
errors {
message
}
}
}
}
Variables
{
"input": {
"individualProfileId": "6d1f4b2a-3c8e-4a7d-9b5f-2e1c0d9a8b7c",
"value": {
"fieldKey": "01963b2e-5a2b-7d4e-9f6a-7b8c9d0e1f2a",
"optionKeys": [
"01963b2e-6b3c-7e5f-8a7b-8c9d0e1f2a3b",
"01963b2e-7c4d-7f6a-9b8c-9d0e1f2a3b4c"
]
}
}
}
Response
{
"data": {
"setCustomFieldValue": {
"customFields": [
{
"fieldKey": "01963b2e-5a2b-7d4e-9f6a-7b8c9d0e1f2a",
"label": "Client segment",
"text": null,
"selectedOptions": [
{
"key": "01963b2e-6b3c-7e5f-8a7b-8c9d0e1f2a3b",
"label": "Private client"
},
{
"key": "01963b2e-7c4d-7f6a-9b8c-9d0e1f2a3b4c",
"label": "Commercial"
}
]
}
]
}
}
}