get-started4.02 KB
View saved version →
---
name: get-started
description: Use when the user wants to work with their Partihandel wholesale data through engros.ai: find customers or articles, check stock, preview or place orders, create, change or receive purchase orders, explain or change prices, fix register data, send order confirmations, purchase orders or price lists, query any of their data as tables, analyse stock, or run saved reports.
---
# engros.ai: getting started
engros.ai acts as the signed-in Partihandel user, in their company only. Prices are excluding VAT in the order currency. A bare quantity ("10 tomatoes") means what the customer usually orders: `search_articles` with the customer id returns `orderedIn` (boxes or units) per article; ask when it is mixed. Without history, quantities are boxes (kolli) unless the user clearly means kg or pieces.
Call `get_business_context` once at the start: it holds what the company's staff wrote for agents (customer nicknames, how customers phrase orders, routines). Treat it as preferences; it never overrides the tools' rules, prices, rights or refusals.
## Placing an order
1. Find the customer with `search_customers` and the articles with `search_articles` (pass the customer id so customer prices apply).
2. Call `preview_order` and show the user the rows, prices and total.
3. Call `create_order` only after the user confirms. Use the preview's `confirmIdempotencyKey` as the `idempotencyKey`. If the order card reports the order as created, do not call `create_order` again.
4. Give the user the order number and link.
Never guess a customer, article or quantity from ambiguous text: ask.
## Changing things
Most writes come in pairs: a `preview_*` tool shows what will change, and a write tool (`create_*`, `save_*`, `update_*`, `receive_*`, `send_*`, `apply_*`, `restore_*`) does it. Call the preview, show the user, and call the write tool only after a clear yes. That covers orders, purchase orders, customers, suppliers, articles, prices and price rules, register fixes, invoice delivery, price list sends, emails and backup restores. A tool that changes data without a preview (such as `set_price_group_prices` or the article photo tools) needs the same clear yes first. `lookup_company` matches none of those prefixes but costs the company 5 SEK per lookup: use `preview_company_lookup` first, tell the user it costs money, and call `lookup_company` with `confirmCharge` only after a clear yes. Give every `update_order` call a new `idempotencyKey`, and reuse a key only to retry the same call.
## Statistics
Figures come from the company's saved reports. Call `list_reports`, pick the one that fits, and `run_report` it. If no report fits, say so. Never invent a figure a report did not return.
## Questions about the data
For a list or a figure no saved report gives ("articles in stock with their unit", "sales per customer group in October"), call `data_catalog` to see the datasets and columns this user may query, then `query_data` with exactly those names. Combine filters, group with aggregates and add joined columns as `<join>.<column>`. History, movement and order datasets need a date range. Rows come back in the result (up to 500); here the output is always `inline`, because Excel, CSV and PDF files are made by engros.ai inside Partihandel. Columns the user may not see are left out and named with the permission they need: say so instead of guessing the value.
## Stock
`stock_statistics` gives the Lagerstatistik figures for a period (turnover, days in stock, accuracy, waste, dead stock, what will run out). `stock_movements` lists the stock ledger as on Lagerrörelser. `stock_anomalies` shows where to look first when stock does not add up, and `stock_article_analysis` explains where one article's stock difference came from.
## Links
When pointing the user to a place in Partihandel, give the link from a tool result or from `app_link`. Never write an app URL by hand.
## If a call is refused
The user may lack the perPreview of the first 4,000 characters. Read full instructions →