Wildberries and MoySklad Integration

Automating processes and increasing business efficiency

content

How to Automate Product Management on Wildberries

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.


Problem

Manual management of products, stock, and orders increases the likelihood of errors and delays, which can affect sales and impact your customers.


Task

Automate data exchange and address key seller challenges, calculate the actual profitability of sales, and compare it with other channels.

For FBS:

  • Set up timely stock data transfer to only sell products that are in stock.
  • Update prices to maintain profitability.
  • Receive orders in real-time.
  • Speed up the preparation of shipments to Wildberries warehouses.
  • Track order status at all stages.

For FBO:

  • Monitor accurate stock levels.
  • Forecast stock and deliveries.
  • Prepare deliveries based on sales forecasts.

Solution

API integration helps:

  • Synchronize data on products, stock, prices, and orders every 5 minutes.
  • Process orders in the service interface.
  • Set up accurate product mapping for correct data display across all platforms.
  • Automatically receive commission reports.

Result

  • Accelerated order processing.
  • Eliminated errors and manual operations.
  • Set up real-time stock updates.
  • Reduced the risk of account and product card blocks.

How the Integration Works

The integration is designed with sellers’ needs in mind and covers products, stock, orders, prices, and warehouses


Products

This is the key entity on marketplaces that needs to be synchronized to transfer stock, receive orders, and update prices

Mapping Products

Scenarios:

  1. Products already exist in the system: map them to marketplace products.
  2. Products are not in the system: create them based on marketplace data.

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.

Modifications and Bundles

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:

Image

Stock

With Wildberries, you can:

  1. Transmit stock data for goods stored and sold from Wildberries warehouses (FBO).
  2. Transmit and receive stock for goods sold from the seller’s warehouse (FBS).

Stock at Wildberries Warehouses (FBO)

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:

  • Shows the number of items at marketplace warehouses and in transit.
  • Calculates how many days the stock will last based on sales and returns statistics for the past month.

Stock at Seller’s Warehouses (FBS)

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.

Steps for Stock Transfer:

  1. Determine from which warehouse to transfer the data. The user sets up warehouse mapping in the synchronization section of MoySklad. These data are stored in a separate database table.
  2. Identify the products for which stock needs to be transferred. The product mapping table is used for this.
  3. Calculate the remaining quantity of each product at the selected warehouse.
  4. Call the API method and transfer the data in the required format.

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.


Orders

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.

Processing Orders During Status Changes

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.

Order Mapping Table:

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

Working with Rate Limits

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.

Order Synchronization

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.


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.

Price Types:

  • Retail Price — required for integration, displayed as a strikethrough.
  • Discounted Price — the actual sale price of the product.

API Methods for Working with Prices:

  • Update prices for products without sizes.
  • Update prices for products with sizes.
  • Check the upload status.
  • Get upload details.

The integration implements the following price-related features:

  • Record current prices from Wildberries when syncing products.
  • Import prices from the marketplace into MoySklad.
  • Export prices from MoySklad to the marketplace.
  • Automatically export prices from MoySklad every 15 minutes.

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:

  • 0 — no import/export has occurred, import is available.
  • 1 — import process (in progress / successful / with errors).
  • 2 — export available with a recommendation for preliminary import.
  • 3 — state between import and export.
  • 4 — first export completed.

You can also transmit different prices for sizes in specific product categories through the API.


Warehouses

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.

API Methods for Working with Warehouses:

  • Retrieve a list of all Wildberries warehouses.
  • Retrieve seller’s warehouses.
  • Create, update, and delete seller’s warehouses.

Mapping Warehouses

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.


Sales Report on Realization

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.


How to Track Changes in the WB API

Supporting and developing the integration requires constant attention to API changes, such as:

  • Updating the version of a method.
  • Changes in requests or responses.
  • Removing methods and recommended replacements.
  • Long-term method downtime.
  • Transition to new security tokens.
  • Changes in call rate limits.

The service constantly monitors the news in the Telegram channel and on the WB API website to avoid integration disruptions.

Case studies

Find solutions to other challenges