Online sales: typical scenarios
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.
Scenarios help you choose methods for typical online store tasks: adding an item to an order, connecting a cash register, or configuring delivery for the CRM.
A scenario describes a single practical task and the sequence of methods required to perform it.
Quick links: all scenarios
User documentation: Online store in Bitrix24: Getting started
Connection with Other Objects
In online sales scenarios, a single order may include line items, receipt fiscalization, and delivery. Separate groups of methods are used for each part.
- Order and basket. A basket item is an order line containing a product or service. It specifies the quantity, price, and currency. Items are added to an existing order using the sale.basketitem.add method. If the item is linked to a product from the catalog, pass the product identifier in the
productIdfield. If the product is not in the online store catalog, passproductId: 0and fill in the data manually: name, price, quantity, and currency. - Product catalog. If you are adding a product or service to an order, you must fill in the item fields. The sale.basketitem.getFields method shows which fields can be passed to the
fieldsof the sale.basketitem.add method. - Cash registers and receipts. An external cash register is connected in two steps: first, register a handler using the sale.cashbox.handler.add method, then create a cash register using the sale.cashbox.add method. The receipt printing result can be retained using the sale.cashbox.check.apply method.
- Delivery services. A handler links Bitrix24 to an external delivery service. To make the delivery appear in the CRM, register a handler using the sale.delivery.handler.add method, create a delivery service using the sale.delivery.add method, add shipment properties using the sale.shipmentproperty.add method, and link the properties to the delivery service using the sale.propertyRelation.add method.
If the price is retrieved from the catalog and does not need to be set manually, you can add a product using the sale.basketitem.addCatalogProduct and sale.basketitem.updateCatalogProduct methods. The minimum set of their fields is returned by the sale.basketitem.getFieldsCatalogProduct method.
Getting Started
- Determine the scenario: line item, cash register, or delivery.
- Select a scenario in the How to choose a scenario table.
- Check the permissions and scopes in the selected tutorial.
- Prepare identifiers for the order, product, payer type, property group, or delivery service. To find where to retrieve object identifiers, see the article Data types and object structure in the online store REST API.
- Execute the methods in the order described in the scenario.
- Verify the result using
listorgetmethods: for example, sale.basketItem.list for basket items, sale.cashbox.list for cash registers, or sale.delivery.getlist for delivery services.
How to choose a scenario
|
If necessary |
Open |
|
Connect an external cash register and transfer receipt printing data |
|
|
Add a product from the catalog to an order and specify an arbitrary price |
Create a line item with a product from the catalog in a quantity of 4 units with an arbitrary price |
|
Add a line item to an order for a product that is not in the online store catalog |
Create a line item with a product that does not exist on the website |
|
Register an external delivery service to work in CRM |
|
|
View the online store methods reference |