Update deal by ID
The Update deal by ID robot updates any deal by its identifier from any business-process context in Bitrix24 (Alaio). The fields to change are passed as JSON in camelCase (title, stageId, opportunity, 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 deal by its ID, even when the business process runs on a different CRM entity — a contact, a lead or a task. The deal ID and the set of fields are given explicitly: fields are passed as a JSON string in camelCase (for example {"title":"New deal","stageId":"C1:WON","opportunity":50000,"assignedById":5}). The update uses the universal crm.item.update method, so all deal fields are available, including custom ones. Typical cases: when a contact stage changes, update the linked deal; set the responsible person and amount from an external system; bulk-change deal 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 |
|---|---|---|---|
| Deal ID | int | yes | |
| Fields to update (camelCase JSON): {"title":"New deal","stageId":"C1:WON","assignedById":5,"opportunity":50000} | string | yes |
What does the robot return?
| Parameter | Type |
|---|---|
| Success (Y/N) | string |
What errors can the robot return?
The robot writes these messages to the business process log when it cannot complete a step. The text tells you what to fix in the settings or the data.
- Error: {id} is not provided
- Error: fields_json is empty
- Error: fields_json contains invalid JSON
- API error
Scenario: updating a deal from a contact process
- The contact moves to a new pipeline stage
- The robot updates the linked deal: stageId and opportunity are passed as JSON
- A Y result confirms the update for the next step
Related robots
Related articles
- Previous deal stage in Bitrix24: why an automation rule cannot see it
- Bitrix24 document generation: automatic numbering, stage rules, and the finished file
- Bitrix24 reports: built-in analytics, BI Builder, and how to get a custom metric
- How to update a deal field in Bitrix24: REST API, webhooks and no-code ways
- Field IDs in Bitrix24: how to find a field code and why you need it
- Mass-launching business processes in Bitrix24 by entity filter