Actions10
Сделки: создать и привязать контакт
AI-generatedSummary
Create a new deal in Bitrix24 with specified deal fields and link the created deal to an existing contact by contact ID.
Inputs
- ID контакта (required) — The unique identifier of the contact to link to the new deal.
- Поля сделки (JSON) — A JSON object defining the fields for the new deal as accepted by 'crm.deal.add'.
Output shape
a list of JSON objects containing the created deal ID, details of the deal creation response, and the contact-linking response.
The operation creates a deal using provided deal fields, extracts the new deal ID from the response, then adds a link between this deal and the given contact ID via the 'crm.deal.contact.add' method. On success, it returns an object with 'dealId', 'dealAdd' (details of deal creation), and 'contactAdd' (result of linking contact). Throws errors if deal creation fails or ID is missing.
Examples
Example 1: Create and link a deal to a contact
Provide a valid contact ID and a JSON object with deal fields to create the deal and link it to that contact.