crm_upsert_contact

Create or update a CRM contact record.

Category
CRM
Stability
Beta
Version
v1
Auth
cf-access

Input schema

{
  "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"]
}

Output schema

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

Example 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"
  }
}

Example response

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

Write path. Idempotent by (account_id, email). Emits a run_ledger row with surface=mcp_tool so every write is auditable.