Integration SalesDrive → Business Management
Four websites are connected to SalesDrive. A separate counterparty has been created in Business Management for each website. All reservations and write-offs of goods in Business Management are carried out from the main warehouse.
1. Order Transfer
The initial transfer of the order to Business Management is performed once when the order status changes to "Printed". A document "Customer Order" is automatically created, and a reservation for the goods is established.
When the status of the same order changes to "Shipped", the webhook updates the data of the document "Customer Order" and initiates the creation of the document "Delivery Note" based on it. During the processing of the "Delivery Note", the actual write-off of the goods is carried out, and the reservation is automatically removed.
If the document "Customer Order" already exists, there is no need to create a new document upon receiving the webhook again. It is necessary to update the existing document by the SalesDrive order ID.
2. Counterparties and Customer Data
During the order transfer, the system automatically determines the counterparty based on the website from which the order was received.
Website 1 → Counterparty 1
Website 2 → Counterparty 2
Website 3 → Counterparty 3
Website 4 → Counterparty 4
If the order is created manually in SalesDrive — a separate counterparty "Manual Orders" is used.
Additionally, transfer:
This data should be automatically recorded in the "Comment" field of the documents "Customer Order" and "Delivery Note".
3. Nomenclature
The matching of goods between SalesDrive and Business Management is performed exclusively by SKU.
If a product with the corresponding SKU is not found in Business Management:
do not create a new product card;
do not create a document;
record the error information in any convenient way.
4. Tabular Part
The document must include:
product (by SKU);
quantity;
price per unit;
total;
discount (if available).
5. Discounts from SalesDrive
The discount from SalesDrive should be automatically distributed proportionally among all products in the order by adjusting the price of each item.
The total amount of the document in Business Management must fully correspond to the order amount in SalesDrive (penny for penny).
6. Cancellation or Deletion of an Order
If the order is canceled or deleted in SalesDrive before the creation of the document "Delivery Note":
remove the reservation in Business Management;
if the "Delivery Note" has not yet been created or processed — cancel the document "Customer Order";
if the "Delivery Note" has already been processed — do not make any changes in Business Management.
7. Error Recording
In case of any error (product with such SKU not found, counterparty not found, API error, etc.):
do not create a new product;
do not create a document;
record the error information in any convenient way.
Error information should include:
8. Order Identification
To link documents in Business Management with SalesDrive orders, use the unique SalesDrive order ID.
It is by this ID that the following should be performed:
9. Control of Transfer and Display of Errors
In case of an error during the transfer of an order from SalesDrive to Business Management, it is necessary to implement any convenient method of displaying information about orders that were not transferred.
For each such order, the following information should be available:
The user should be able to quickly determine which orders were not transferred to Business Management due to an error.