How to connect AI to MoySklad: stock, cost prices, and purchase orders
There are four ways to connect AI to MoySklad and they produce different outcomes: a connector wrapper moves documents, built-in reports display the books, a custom script performs one step, and an AI agent calculates by your rule and carries the job through to a draft purchase order. A walkthrough: how to connect with an employee API token, what the agent does with stock, dead stock, margin and shortages — and seven places where a MoySklad integration returns a successful response with a wrong number.
Сам Решу
September 7, 2026 · 13 min read
Contents
MoySklad already has reports: stock, turnover, profitability, cash. The problem is not that the numbers are missing — it is that between the number and the action stands a person who opens the report, exports it to a spreadsheet, compares it with sales velocity, remembers who supplied that item last time, and creates a purchase order. That is exactly the part an AI agent takes over. Below: how four different ways to "connect AI to MoySklad" differ in outcome, how the agent connects, and a separate section on why a MoySklad integration can return a successful response with a wrong number.
Four ways to "connect AI to MoySklad" — and why the outcome differs
Four different things are sold under the query "AI for MoySklad." The difference decides what actually leaves your hands and what stays manual.
- A connector wrapper. A no-code service (Albato, Make, ApiX-Drive and the like) links MoySklad to a spreadsheet, a CRM, or a marketplace by a rigid rule: an order appeared → create a row, stock changed → send a notification. That is not AI, that is data transfer. It cannot calculate turnover, tell dead stock from materials that keep moving into production, or assemble a purchase order out of a shortage.
- Built-in reports and Marketplace apps. Stock, Turnover, Profitability, the extended stock report, apps from the MoySklad app market — all of it honestly shows the state of the books. But it is a display case: it answers the question you have already formulated and opened in the right breakdown. It will not come to you on its own to say that 57 positions sit below the minimum stock level of a particular warehouse.
- A single-purpose AI service or a custom script. A product-description generator, a bot over the catalog, a JSON API script a contractor wrote for one report. It works exactly in the shape it was ordered in; a new question means a new job for a developer.
- A ready AI agent. It connects to the account with an employee API token, walks the directories, documents, and report slices itself, calculates by the rule you described in plain words, and carries the job through to a document — a draft purchase order or a transfer. Samreshuuu belongs to this class.
The first three do not replace each other, and none of them replaces the fourth: the wrapper moves data, the report displays it, the script performs one step. An agent earns its place where the questions change every week while the data stays the same.
Setup in words, not development
This is the main thing that separates a ready agent from the other three options. A connector makes you assemble a scenario out of blocks. A report has to be opened and read by you. A script has to be commissioned. To an agent you explain the task the way you would explain it to a purchasing manager: "every Monday look at the materials warehouse, compare stock with sales velocity over the last 30 days, find what runs out before the lead time is over, group the shortage by the supplier from each product card, and show me draft orders — create them only after my yes." Need a different breakdown — you ask in a different sentence rather than building another integration.
How to connect AI to MoySklad: step by step
The connection runs over the official JSON API 1.2 with an employee token — the account login and password are never handed over.
- Create a robot employee. User menu → Settings → Employees — a new employee with a dedicated role. The agent's permissions are literally those of that employee: the role decides whether it sees cost prices, documents, and money in the accounts.
- Switch on API access and get the token. Enable "API access" for that employee; the key is issued by a
POST /security/tokenrequest. The token is revoked in one click and does not drag the account password along with it. - Connect the agent. In Samreshuuu → "Settings → Integrations → MoySklad," paste the token. The connection is verified with a request for the list of organizations, so an invalid or revoked key shows up immediately instead of surfacing in the middle of the first report.
- Describe the rule in words. For example: "on Mondays, a dead-stock report with the amount of cash frozen in it; daily, the positions below the minimum stock level; at month end, profitability per product with cost prices."
- Choose the control mode. Reading and analytics — on autopilot; writing to the account (a purchase order, a transfer, a price change) — in "draft → confirmation" mode.
What the agent actually does in a MoySklad account
| Task | Built-in reports | Connector wrapper | AI agent (Samreshuuu) |
|---|---|---|---|
| Show stock per warehouse in units and money | yes | no | yes |
| Find positions below a warehouse minimum stock level | partly | no | yes |
| Tell dead stock from inventory that turns over outside sales | no | no | yes |
| Calculate profit and margin per product from FIFO cost | yes | no | yes |
| Say that the margin cannot be trusted: cost is missing on some rows | no | no | yes |
| Reconcile shipments with Ozon and Wildberries orders | no | partly | yes |
| Collect the shortage and group it by supplier from product cards | no | no | yes |
| Create a draft purchase order after confirmation | no | partly | yes |
| Combine cash in the accounts with receivables and payables | partly | no | yes |
The difference is not the list of checkmarks but who holds the links between the rows. A report answers one question; an agent asks the next one itself — it saw the stock drop, looked at sales velocity, subtracted the lead time, found the supplier in the product card, and assembled a draft.
Why the chain "stock → velocity → shortage → purchase" decides everything
Stock on its own says nothing. Forty units is plenty for an item that sells twice a month and a disaster for one that goes out ten a day with a two-week lead time. The reorder point exists only as a function of two numbers at once: consumption rate and lead time. Then comes the third one: not "what is running low" but "who do we buy it from" — the supplier sits in the product card, and without it a shortage list stays a list rather than an action.
The flip side of the same chain is frozen cash. A position that has not moved for three months is worth exactly what was put into it, and that amount matters more than the fact of it being stale. That is why the agent counts not only how many positions are dead but how much money is frozen in them — a number you can bring to the owner.
The same loop closes on cash: money in the accounts plus receivables minus payables is the answer to "can we afford the purchase." Where the line runs between reporting a debt and collecting it is covered separately in your accounting system sees the debt but can't collect it. And if MoySklad sits next to marketplaces, the walkthroughs for Ozon and Wildberries are useful: the agent reconciles shipments in the books against the orders in those cabinets and shows the discrepancies.
Why a MoySklad integration returns a successful wrong answer
This is the section no vendor writes, and it matters more than a feature list. The MoySklad JSON API has several places where a request succeeds with status 200 while the number in the response does not mean what people assume. We hit them on live accounts — from a manufacturer with five hundred product cards to an account with nearly three thousand orders.
Amounts come in kopecks. The cheapest and most common mistake: a naively assembled report overstates revenue by exactly a hundred times. It is caught by eye once and then lives silently inside a custom script.
Cost price may be missing on most rows. The Profitability report honestly returns margin for rows where the cost is known. If coverage is partial, the average margin comes out beautiful and meaningless: we have seen "95.62%" on a sample where cost was known for a third of the rows. The correct answer is not a number but a number with its coverage: "margin is X, calculated over 30% of revenue." Permissions for cost prices may be absent altogether — then the honest move is to calculate from the purchase price and say so, not to substitute a zero.
A "status is not equal" filter drops documents with no status. Selecting overdue orders as "status ≠ shipped" looks obvious and silently discards everything entered without a status at all. In an account run that way the overdue list comes back short and with no sign of truncation — on one live account that meant 937 statusless shipments a person simply never saw.
Per-warehouse minimum stock levels are not returned by an ordinary request. A naive check concludes that no threshold is configured while dozens of positions sit below it. The proper server-side filter is required — and then the cases surface where the balance is positive yet still below the threshold of that particular warehouse.
"Has not sold" and "is dead weight" are different facts. Material that goes into production does not move through sales, yet its stock keeps being replenished. On one manufacturing account a single-criterion report called 243 positions worth 1.81M ₽ frozen, of which 57 worth 1.18M ₽ had been in the warehouse for less than two months. The age of the stock is calculated by the vendor itself — it arrives as a separate field of the extended stock report, and it is enough to simply read it.
Assortment search can silently return the whole catalog. The old and the new assortment endpoints have different search contracts: on one the search string works, on the other it is ignored, and instead of matches you get the first twenty rows of the catalog. The response is successful, the data is not the data you asked for.
MoySklad limits concurrency, not rate. The account counts simultaneous calls rather than calls per second, and a heavy stock report holds a slot while spending nothing on pace. The agent keeps to no more than six calls per second and no more than two per second against stock reports, so collecting data neither knocks your account into its limits nor gets in the way of the people working in it.
Every one of these traps is discovered once and then lives inside an integration for years. That is exactly why "connecting a neural network to MoySklad" in one evening usually means getting a successful wrong answer.
Honestly about the downsides
If all you need is to look at stock and turnover, the built-in reports are enough and a separate agent is overkill. If the task is moving orders from a shop into MoySklad by one rule, a wrapper is cheaper. An agent earns its place where the questions change and the numbers have to be connected to each other and carried through to a document. And it has an entry cost: the robot employee's role has to be configured deliberately — without permission for cost prices there is no margin, without write permission there are no draft orders.
Checklist: how to choose AI for MoySklad
- What exactly is being automated — viewing, moving data, or the purchasing decision. The most expensive mistake is buying a wrapper when the pain is a shortage.
- Connection over an official API token, not the employee's login and password. A token is revoked separately and does not open the whole account.
- Permissions come from a role, and the role is visible. Ask what the solution does when permissions are missing: names the missing section, or returns an empty report.
- Does the solution speak about the trustworthiness of a number. Margin without cost coverage, staleness by a single criterion, and overdue lists without statusless documents are three places where a pretty answer is wrong.
- Is there a "draft → confirmation" mode for writing to the account. Purchase orders and transfers are irreversible actions; they should start with your yes.
- Does it respect the account's limits. Collecting data must not get in the way of people working in MoySklad.
Frequently asked questions
What is AI for MoySklad and what can it do? It is an agent that connects to the account over JSON API 1.2 and takes over the work with the data: stock per warehouse in units and money, positions below the minimum stock level, turnover and the amount of frozen cash, revenue and margin per product from FIFO cost, money in the accounts, receivables and payables, reconciliation of shipments with marketplaces, draft purchase orders for the shortage it finds. Built-in reports display, a wrapper moves data, and an agent calculates and carries the result through to a document.
How do I connect a neural network to MoySklad?
Create a robot employee, switch on API access for them, get the token with a POST /security/token request, and paste it into Samreshuuu under "Settings → Integrations → MoySklad." No login and password are needed, and the connection is verified immediately with a request for the list of organizations. After that the rule is described in plain language.
Is it safe to give AI access to the books? Access runs over a separate token belonging to a separate employee rather than your password, and it is bounded by a role: if you did not grant permissions for money, the agent does not see it. The token can be revoked in the account at any moment, and writing to the books goes through confirmation by default.
Does the agent write to MoySklad? It can, if the role allows writing: draft purchase orders, internal transfers. By default it works in read and analytics mode, and it shows the documents it is about to create and waits for confirmation.
I have two MoySklad accounts — will the agent mix them up? No. An account is a separate set of books with its own legal entity, and a summary "across all accounts" describes none of them, so the agent refuses such a request and asks which account to use. It tells them apart not by the organization name, which is identical for two connections of the same account, but by the account identifier.
Will an agent replace the built-in reports? The reports stay: the agent reads the same data and refers to it. What it replaces is the manual work around the reports — the export to a spreadsheet, the comparison with sales velocity, the search for a supplier, and the creation of the document.
Last updated: September 2026.
Sources: MoySklad JSON API 1.2 documentation (employee token authentication via POST /security/token, role-based permissions, the expand parameter, entity directories and metadata, report slices, the extended stock report with days in warehouse, limits on simultaneous requests); MoySklad help on employee roles, minimum stock levels, and the Profitability report; our own measurements on live accounts while building the connector.
Put it into practice
Connect your services and hand this task to an AI agent — no manual routine, no spreadsheets.