Champs personnalisés
Définir des champs personnalisés et fixer leurs valeurs sur les clients.
list_custom_field_definitions
List the agency's custom-field schema for locations or clients — the extra fields an agency has defined beyond the built-in profile fields (e.g. "Franchise ID", "Contract renewal date"). Use this before get_custom_field_values or set_custom_field_value to discover what keys/types exist. Each definition has an id, an immutable key (used with set_custom_field_value), a label, a type (text/number/date/single_select/multi_select), whether it's required, its select options (for select types), and its display order. Archived definitions are excluded. You don't pass an agency — it comes from your credentials.
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "list_custom_field_definitions",
"arguments": {
"entityType": "location"
}
}
}{
"jsonrpc": "2.0",
"id": 1,
"result": {
"content": [
{
"type": "text",
"text": "..."
}
]
}
}La forme de la réponse est indicative — le contenu réel dépend de l'outil et de vos données.
create_custom_field
Create a new custom-field definition for locations or clients — adds a new column of information every location (or client) can carry, beyond the built-in profile fields. A URL-safe key is generated automatically from the label (renaming the label later never changes the key or breaks stored values). select types (single_select / multi_select) require at least one option. New definitions are appended to the end of the display order. Returns the new definition, including its generated key — use that key with set_custom_field_value. You don't pass an agency — it comes from your credentials.
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "create_custom_field",
"arguments": {
"entityType": "location",
"label": "string",
"type": "text"
}
}
}{
"jsonrpc": "2.0",
"id": 1,
"result": {
"content": [
{
"type": "text",
"text": "..."
}
]
}
}La forme de la réponse est indicative — le contenu réel dépend de l'outil et de vos données.
update_custom_field
Edit an existing custom-field definition's label, required flag, select options, or display order. The field's type and key cannot be changed after creation — to change the type, archive this field with delete_custom_field and create a new one. Pass only the fields you want to change. Identify the field by its id (from list_custom_field_definitions). You don't pass an agency — it comes from your credentials.
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "update_custom_field",
"arguments": {
"definitionId": "string"
}
}
}{
"jsonrpc": "2.0",
"id": 1,
"result": {
"content": [
{
"type": "text",
"text": "..."
}
]
}
}La forme de la réponse est indicative — le contenu réel dépend de l'outil et de vos données.
delete_custom_field
Archive a custom-field definition, removing it from the schema. This is a soft delete — previously stored values for this field are retained on each entity but the field itself no longer appears in list_custom_field_definitions or accepts new values via set_custom_field_value. Identify the field by its id (from list_custom_field_definitions). You don't pass an agency — it comes from your credentials.
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "delete_custom_field",
"arguments": {
"definitionId": "string"
}
}
}{
"jsonrpc": "2.0",
"id": 1,
"result": {
"content": [
{
"type": "text",
"text": "..."
}
]
}
}La forme de la réponse est indicative — le contenu réel dépend de l'outil et de vos données.
get_custom_field_values
Get the custom-field values currently set on one location or client. Returns a { key: value } bag (empty object if none are set). Use list_custom_field_definitions first to see what keys exist. You don't pass an agency — it comes from your credentials, and an entity from another agency is never returned.
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "get_custom_field_values",
"arguments": {
"entityType": "location",
"entityId": "string"
}
}
}{
"jsonrpc": "2.0",
"id": 1,
"result": {
"content": [
{
"type": "text",
"text": "..."
}
]
}
}La forme de la réponse est indicative — le contenu réel dépend de l'outil et de vos données.
set_custom_field_value
Set (or clear) one custom-field value on a location or client. The field must already exist — look it up with list_custom_field_definitions and pass its key. Passing null or an empty value clears the field. The value is validated against the field's type (text/number/date/single_select/multi_select) before saving. Returns the entity's full updated values bag. You don't pass an agency — it comes from your credentials.
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "set_custom_field_value",
"arguments": {
"entityType": "location",
"entityId": "string",
"key": "string"
}
}
}{
"jsonrpc": "2.0",
"id": 1,
"result": {
"content": [
{
"type": "text",
"text": "..."
}
]
}
}La forme de la réponse est indicative — le contenu réel dépend de l'outil et de vos données.