Add Custom Data
add-custom-dataCreate a custom field, if necessary, and set its value on a Chatway visitor/contact. Use update-custom-data when the field already exists. Use list-custom-fields to see existing field names.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"visitor_id": "<visitor_id>",
"name": "<name>",
"value": "<value>"
},
"name": "add-custom-data"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Custom field name, up to 100 characters. The field is created if it does not exist yet. | |
| value | Yes | Value to store, up to 1,000 characters. | |
| visitor_id | Yes | UUID of the visitor/contact, for example `contact.id` from `get-conversation` or `id` from `search-contacts`. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Custom field name. | |
| value | No | Stored value. | |
| visitor_id | No | Visitor/contact UUID. |