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.
Quick Navigation: all methods
Linking to Other Entities
Online Store Orders. The order identifier orderId links the order record to a CRM entity.
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.
Getting Started
- Obtain the order identifier
orderIdusing the sale.order.add or sale.order.list methods. - Determine the entity type
ownerTypeIdusing the crm.enum.ownertype method:2for deals,31for invoices. - Retrieve
ownerIdusing the crm.deal.list method for deals or crm.item.list withentityTypeId = 31for invoices. - Create the link using the crm.orderentity.add method.
- Check the result using the crm.orderentity.list method.
- If necessary, remove the link using the crm.orderentity.deleteByFilter method.
- To obtain the structure of the link fields, use crm.orderentity.getFields.
Overview of Methods
Scope:
crmWho can execute the methods: depending on the method
|
Method |
Description |
|
Creates a link between an order and a CRM entity |
|
|
Returns a list of links between orders and CRM entities |
|
|
Deletes a link between an order and a CRM entity |
|
|
Returns the fields of the order link |