Use setCustomFieldValue with a caseId to set one custom field on a case, replacing its current value. Supply
text for a text field, or optionKeys for a multi-select field. The response lists every custom field on the
case after the change.
Required scope: case-management
Request
mutation setCustomFieldValue($input: SetCustomFieldValueInput!) {
setCustomFieldValue(input: $input) {
... on CustomFieldValues {
customFields {
fieldKey
label
text
selectedOptions {
key
label
}
}
}
... on ValidationErrors {
errors {
message
}
}
}
}
Variables
{
"input": {
"caseId": "48213",
"value": {
"fieldKey": "01963b2e-4f1a-7c3d-8e5f-6a7b8c9d0e1f",
"text": "HVL-4471"
}
}
}
Response
{
"data": {
"setCustomFieldValue": {
"customFields": [
{
"fieldKey": "01963b2e-4f1a-7c3d-8e5f-6a7b8c9d0e1f",
"label": "Billing code",
"text": "HVL-4471",
"selectedOptions": []
},
{
"fieldKey": "01963b2e-5a2b-7d4e-9f6a-7b8c9d0e1f2a",
"label": "Client segment",
"text": null,
"selectedOptions": [
{
"key": "01963b2e-6b3c-7e5f-8a7b-8c9d0e1f2a3b",
"label": "Private client"
}
]
}
]
}
}
}