crm_upsert_contact

Créer ou mettre à jour un contact CRM.

Catégorie
CRM
Stabilité
Bêta
Version
v1
Auth
cf-access

Schéma d’entrée

{
  "type": "object",
  "properties": {
    "account_id": { "type": "string" },
    "contact_id": { "type": "string", "description": "Optional — if absent, a new contact is created." },
    "full_name": { "type": "string" },
    "email": { "type": "string", "format": "email" },
    "phone": { "type": "string" },
    "preferred_language": { "type": "string", "enum": ["fr", "en"] },
    "role": { "type": "string" }
  },
  "required": ["account_id", "full_name"]
}

Schéma de sortie

{
  "type": "object",
  "properties": {
    "contact_id": { "type": "string" },
    "created": { "type": "boolean" }
  }
}

Exemple d’invocation

{
  "tool": "crm_upsert_contact",
  "arguments": {
    "account_id": "ACME-0042",
    "full_name": "Jean Lefèvre",
    "email": "j.lefevre@acmebistro.fr",
    "preferred_language": "fr",
    "role": "Gérant"
  }
}

Exemple de réponse

{
  "contact_id": "C-0188",
  "created": false
}

Chemin d’écriture. Idempotent par (account_id, email). Émet une ligne run_ledger avec surface=mcp_tool afin que chaque écriture soit auditable.