create_lead_complex
Create a lead and link it to a contact in Kommo, automatically searching for existing contacts by phone, CPF, email, or name. If found, update the contact and lead instead of duplicating.
Instructions
Creates a new lead and links it to a new contact in Kommo in a single request. BUT BEFORE CREATING: it will automatically attempt to search for the contact using the provided 'phone', 'cpf', 'email' or 'contact_name'. If a contact already exists, it will UPDATE the contact and its lead instead. Automatically maps custom field NAMES to their IDs.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "create_lead_complex"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lead_name | No | Lead Name | |
| price | No | Lead price/value (MUST BE AN INTEGER no decimals. e.g. 150.50 -> 150) | |
| pipeline_id | No | Pipeline ID | |
| status_id | No | Status ID inside the pipeline | |
| lead_custom_fields | No | Key-value pairs of LEAD custom fields (keys are exact field NAMES). | |
| contact_name | No | Contact Name | |
| contact_custom_fields | No | Key-value pairs of CONTACT custom fields (keys are exact field NAMES). |