Update lead by ID
The Update lead by ID robot updates any lead by its identifier from any business-process context in Bitrix24. The fields to change are passed as JSON in camelCase (title, stageId, assignedById and others). It returns a Y/N success flag for conditional branching in the process and works through the universal CRM method crm.item.update.
The robot updates an arbitrary lead by its ID, even when the business process runs on a different CRM entity — a deal, a contact or a task. The lead ID and the set of fields are given explicitly: fields are passed as a JSON string in camelCase (for example {"title":"New lead","stageId":"NEW","assignedById":5,"ufCrm_123":"value"}). The update uses the universal crm.item.update method, so all lead fields are available, including custom ones. Typical cases: when the process fires, move the lead to the right stage; set the responsible person from an external system; bulk-change lead stages from a parent process. It returns a Success (Y/N) flag: Y on a successful update, N on an empty ID, empty or invalid JSON, or an API error — compare it in the condition of the next step.
What input parameters does the robot accept?
| Parameter | Type | Required? | Default |
|---|---|---|---|
| Lead ID | int | yes | |
| Fields to update (camelCase JSON): {"title":"New lead","stageId":"NEW","assignedById":5,"ufCrm_123":"value"} | string | yes |
What does the robot return?
| Parameter | Type |
|---|---|
| Success (Y/N) | string |
Scenario: updating a lead from a process
- The lead process reaches the qualification step
- The robot updates the lead: stageId and assignedById are passed as JSON
- A Y result confirms the update for the next step