Experience shared by Tatyana Tsikunova, System Analyst at MoySklad
MoySklad is an verified service for working with the WB API, simplifying inventory management, sales, and customer interactions on Wildberries.
Manual management of products, stock, and orders increases the likelihood of errors and delays, which can affect sales and impact your customers.
Automate data exchange and address key seller challenges, calculate the actual profitability of sales, and compare it with other channels.
API integration helps:
The integration is designed with sellers’ needs in mind and covers products, stock, orders, prices, and warehouses
This is the key entity on marketplaces that needs to be synchronized to transfer stock, receive orders, and update prices
Scenarios:
The WB API allows both creating and retrieving products. To create a product, we use methods that return information, categories, and restrictions, after which products can be uploaded to the system using the obtained data.
Additionally, product information can be requested on your system’s side. It’s important to get only relevant products for work — those under review or archived won’t be suitable. The product mapping algorithm looks for matches between the system and Wildberries.
The system receives a JSON with the current list of products from Wildberries and looks for matches by the user-specified identifier. Each product can have multiple identifiers: seller SKU, barcode, unique marketplace SKU, etc.
If a match is found, a record is created in the product, modification, and bundle mapping table in the database. If no matches are found, the product is created in the system, and a record is added to the mapping table. The service uses a relational database, which is optimal for these purposes.
Bundles are received from the marketplace as single products, without information about their components. Therefore, the system only creates a link between the bundle from the marketplace and the corresponding product in the system. Creating bundles is not yet supported.
As for modifications, the system accurately identifies them by size, as they share the same product identifier, unlike products of different colors. You can also create sizes as separate products or as modifications of the main product.
When Mapping Products:
Same Barcode | WB Data | MS Data | Mapping |
---|---|---|---|
for the product in WB and the product in MS | Product with barcode = 1 | Product with barcode = 1 | Product and mapping |
for the modification in WB and the product in MS | Modification with barcode = 1 | Product with barcode = 1 | Product and mapping |
for the product in WB and the modification in MS | Product with barcode = 1 | Product_1, Modification with barcode = 1 | Modification and mapping |
for the modification in WB and the modification in MS | Modification with barcode = 1 | Product_1, Modification with barcode = 1 | Modification and mapping |
When auto-sync is enabled, the system requests products from the marketplace every 15 minutes and updates the data in MoySklad.
To let the user see the link between products in MoySklad and marketplaces, the product card displays a «WB» icon.
BPMN Diagram:
With Wildberries, you can:
In this model, the seller ships goods to Wildberries warehouses, tracks orders and stock, and decides on reorders and additional deliveries. Through the WB API, stock data can be retrieved, broken down by each warehouse. In MoySklad, a report is implemented that:
In this case, it’s essential to timely transfer stock data to avoid selling out-of-stock items. The system synchronizes stock to accurately display the available quantity of products.
For bundles, the system performs a special calculation — stock is calculated based on the number of available components.
If the user enables automatic stock synchronization, the system will start sending updated information about changes every 5 minutes. This way, the marketplace will have the current product data, and you can proceed to order processing.
To get new orders, the system requests data via the API. FBS orders can be managed using the methods outlined in the API documentation.
To avoid missing orders, the system periodically requests data from the marketplace. The order processing workflow is similar to product handling: a mapping table is used to store information about which order created in MoySklad came from a specific marketplace.
If a seller changes the order status between synchronizations, the order will not appear in the list of new ones and will not be created in the system. To maintain accurate accounting, order processing has been added for other statuses.
Field | Type | Constraints | Description |
---|---|---|---|
id | uuid | NOT NULL | |
ntype | int4 | NOT NULL | Entity type, set by a numeric value |
entity_id | uuid | NOT NULL | Link to the operation to be associated with the external unique identifier |
external_id | varchar(255) | NOT NULL | External unique identifier |
account_id | uuid | NOT NULL | Account owning the data |
connector_id | uuid | NOT NULL | Connector identifier |
To avoid exceeding WB API call limits, the service tracks the frequency and number of requests sent and limits them according to the rate limits for each method. If the limit is exceeded, the request is blocked until the method can be called again. The system retries at a set frequency. The algorithm works similarly to the Leaky Bucket. For more details, see the book «System Design Interview: An Insider’s Guide» by Alex Xu.
In addition to order transmission, status exchanges occur between Wildberries and MoySklad. Users can receive labels and collect orders using a pick list.
We’ve covered the exchange of three key entities: products, stock, and orders. The next important entity is prices.
Wildberries allows you to retrieve and update product prices. When changes occur, the system only updates those prices that have changed since the last synchronization.
The integration implements the following price-related features:
The user can choose any of these options. The service displays different sync settings screen states depending on what the seller is currently using. This setting is stored in the database with the following options:
You can also transmit different prices for sizes in specific product categories through the API.
Both MoySklad and the marketplace can have multiple warehouses. This is important to consider when transferring stock and processing orders, as products are reserved in specific warehouses.
Before transferring stock, you must choose which warehouse to transfer data from.
To map warehouses, the service stores the user’s choice in its database. The marketplace warehouse selector works in the standard way: when the page is opened, the system loads the list of active warehouses via the API and displays them in a dropdown menu. The user can map several marketplace warehouses to several warehouses in MoySklad.
To finalize sales accounting on the marketplace, there is a «Sales Report Upload» feature. In the Wildberries personal account, in the «Financial Reports → Sales Reports → Weekly» section, the seller can download this report. Analyzing it helps to better understand which products generate the most profit.
The Wildberries API supports methods for uploading these reports, so they can be uploaded either manually through the system or automatically — every week.
In the MoySklad system, after uploading, an internal document is created, called the «Received Commission Report,» which includes information on sales, returns, and other expenses.
Supporting and developing the integration requires constant attention to API changes, such as:
The service constantly monitors the news in the Telegram channel and on the WB API website to avoid integration disruptions.