Linking Orders to CRM Entities: Overview of Methods
If you are developing integrations for Bitrix24 using AI tools (Codex, Claude Code, Cursor), connect to the MCP server so that the assistant can utilize the official REST documentation.
Online store orders can be linked to CRM entities. This allows you to use order information in workflows related to deals and invoices.
A link is a separate record, not a field of the order or of the CRM object. An order can have only one link: if you create a link for an order that already has one, the previous link is replaced by the new one.
Quick Navigation: all methods
Linking to Other Entities
Online Store Orders. The order identifier orderId links the order record to a CRM object. The orders themselves are handled by the sale.order.* methods.
CRM Entities. The linking is supported for deals and invoices using the parameter pair ownerTypeId and ownerId. The first defines the type of entity, while the second specifies the identifier of a particular deal or invoice.
|
CRM Object |
|
Where to Get |
|
Deal |
|
|
|
Invoice |
|
crm.item.list with |
Getting Started
- Obtain the order identifier
orderIdusing the sale.order.add or sale.order.list methods. - Prepare the
ownerTypeIdandownerIdpair according to the table above. - Check the composition of the link fields using the crm.orderentity.getFields method.
- Create the link using the crm.orderentity.add method.
- Check the result using the crm.orderentity.list method.
- If the link is no longer needed, delete it using the crm.orderentity.deleteByFilter method.
Overview of Methods
Scope:
crmWho can execute the methods: depending on the method
|
Method |
Description |
|
Creates a link between an order and a CRM object |
|
|
Returns a list of links between orders and CRM entities |
|
|
Deletes a link between an order and a CRM object |
|
|
Returns the fields of the order link |