Track stock, profit and purchasing in MoySklad right in the chat
Lists items below minimum stock with the shortfall by supplier: 38 positions worth 1.24M RUB. The agent gets the rights of the employee whose API token is connected.
MoySklad examples
38 items are below the minimum stock level, a shortfall of RUB 1.24 million.
- Profmetall: 14 items, RUB 520,000
- Krepezh-Yug: 11 items, RUB 310,000
- Sibtekstil: 9 items, RUB 280,000
- 4 more items, RUB 130,000, have no supplier in the card, I listed them as a separate line rather than quietly skipping them
MoySklad does not return per-warehouse thresholds in an ordinary request: a naive check would decide no minimum is set. I used the server-side filter, so the list also has items with a positive balance that is still below the threshold of their warehouse.
Shortfall by supplier
Table · XLSXRevenue RUB 6.82 million, profit RUB 1.44 million, margin 21.1%.
I added up wholesale shipments of RUB 4.12 million and retail sales of RUB 2.70 million and took the cost price of RUB 5.38 million by FIFO. Half of the profit comes from 14 items out of 340, and three products have a negative margin: the purchase price went up while the list price stayed the same. Accounting currency: rubles, the API amounts converted from kopecks.
It is not empty: the role I am connected under has no rights to cost prices.
I switched to the purchase price and calculated from it, so the figure understates the real margin by roughly the delivery cost. To count by FIFO, give the role of the employee whose token is connected access to cost prices: the other sections are already open to it.
How to connect
Before you connect
- A role with access to products, orders, shipments, stock and reports
- Permission for cost prices if you need FIFO margin
- Write permission if the agent creates orders and transfers
- 1.
Open token settings
In MoySklad, go to User menu → Settings → Tokens («Меню пользователя → Настройки → Токены»).
- 2.
Create a token
Click +Token («+Токен») to create a JSON API access token. No additional employee is required.
- 3.
Copy the token
Copy the token from the window that opens and paste it into the API token field of this form.
- 4.
Revoke the token under Tokens
The token carries your account's rights. Delete it under Settings → Tokens («Настройки → Токены») and access to MoySklad stops at once.
FAQ
In MoySklad, go to User menu → Settings → Tokens, click +Token and paste the token into the API token field when connecting. No additional employee is required. Installing Samreshuuu from the MoySklad marketplace grants access automatically.
Products, counterparties, orders, shipments, stock and reports of the JSON API 1.2, within the role of the employee whose token is connected.
It can, creating purchase orders or internal transfers for example, if the role allows writing. By default the agent works in read and analytics mode.
The agent tells you right in the chat which section is missing and asks you to extend the employee role, with no cryptic 403 errors.
Use cases with MoySklad
- See what you owe suppliers and who to pay firstThere's never enough for every invoice at once, and the queue gets rebuilt in a notebook weekly. The agent spreads payments across days by real balance.
- Build a cash flow statement for the periodWhat a cash flow statement is, direct vs indirect method, sample lines. The agent builds it from 1C or MoySklad and bank data and checks the closing balance.
Skills for MoySklad
How the agent works with MoySklad
The agent connects to MoySklad with an employee API token and works with the whole account: sales and profit, stock and warehouses, counterparties, money in the accounts, documents. The agent's permissions equal those of the employee whose token is connected: the role decides which sections of the JSON API 1.2 the agent sees at all. Related entities it pulls in with the expand parameter, one request instead of a dozen, so going through documents never turns into walking card by card. The connection itself is verified with a request for the list of organizations, so an invalid or revoked token shows up immediately instead of surfacing in the middle of the first report.
The agent counts sales properly: revenue for a period adds up from wholesale shipments and retail sales, while profit and margin per product are calculated from the FIFO cost price. If there are no permissions for cost prices, the agent switches to the purchase price on its own and says so explicitly. Daily sales dynamics, money in the accounts, receivables and payables, the buyers of a specific product with their phone numbers: all straight from the account, with no manual exports. The agent detects the accounting currency automatically, be it rubles, tenge or another one, and never confuses kopecks with rubles: MoySklad returns amounts in kopecks, and that is accounted for everywhere.
Stock comes as a single overview: units and money, a breakdown by warehouse, zero and negative positions as separate counters. The most useful part for purchasing is the positions below the minimum stock level, and there is a trap here that is not visible in the API at first glance: MoySklad does not return per-warehouse thresholds in ordinary requests, so a naive check decides that no minimum is configured while dozens of positions sit below it. The agent uses the proper server-side filter and finds them all, including cases where the balance is positive but still below the threshold of that particular warehouse.
For the shortages it finds the agent prepares documents: a draft internal order to replenish a warehouse, or draft purchase orders grouped by the supplier from the product card, with demand forecast based on sales velocity and lead time. Before creating documents in the account the agent shows exactly what it is about to create, and the connection can stay Read-only. Products with no supplier in the card are listed as a separate line instead of being silently skipped.
The agent paces its own requests: no more than seven calls per second to the API and no more than three per second to the heavy stock reports, so the account does not hit the limits while the agent collects data. If the role lacks permissions, the agent names the missing section right in the chat and asks you to extend the employee role instead of showing a cryptic 403 error in the middle of a report. The data itself comes straight from the API directories, entity metadata and report slices rather than from a pre-exported copy, so the numbers in the chat match what is in the account right now.