cashflow_category_mute
ChatGPT«Не считать регулярной» (Do not treat as recurring) for a suggested schedule of a finance category in the «Прогноз денег» (Cash-flow forecast): the forecast stops suggesting it. TWO-PHASE: the preview shows «before → after». Relay the write response (what was done and the cash-flow forecast after it) as is — do not interpret it. Requires the «Expert» plan.
cashflow_category_set_nature
ChatGPTMark how a finance category is paid in the «Прогноз денег» (Cash-flow forecast): period monthly — every month; irregular — not every month (the «Не каждый месяц» (Not every month) button of a provisional schedule, not_monthly in actions); auto — reset the mark. TWO-PHASE: the preview shows «before → after». Relay the write response (what was done and the cash-flow forecast after it) as is — do not interpret it. Requires the «Expert» plan.
cashflow_get
ChatGPTThe company's cash-flow forecast: whether there is enough money, the risk of a cash gap (date and amount), how much can be spent without risk, daily income and spending, the current balance, the balance line and payments with statuses. Everything is calculated by the server: when answering, quote verdict.text, safe_to_spend.sentence, per_day.text and other *.text as is — do not recompute. Amounts and dates are pairs {v, text}: v — for the next call, text — as on the screen. verdict.date — the first day the balance falls below threshold (null — no risk); verdict.amount — the LARGEST shortfall within the horizon window, it is reached by verdict.amount_date, not by verdict.date. threshold — the alert threshold: the company's minimum balance (0 for a branch forecast). line — balance checkpoints: expected — the expected scenario, cautious — a pessimistic scenario. per_day.parts — the breakdown of daily spending; explaining spending, quote their text. Customer debts are NOT included (for them — reports_get report=receivables). pools — available forecasts (the whole company and self-contained branches with their own money); branch_id selects one. pools[].risk — the balance falls below threshold soon (a dot on the tab and a notification to the owner); a risk later within the horizon — only in verdict. verdict.drivers_text — large payments before the alert date (only when verdict.state=alert). payments[].actions — available actions with rule_id, period_start, slot: confirm — cashflow_payment_confirm, edit — cashflow_payment_edit, move — cashflow_payment_move, skip — cashflow_payment_skip, not_monthly — cashflow_category_set_nature (period=irregular), mute — cashflow_category_mute. daily=true — the balance for each day; otherwise only checkpoints. Requires the «Expert» plan.
cashflow_payment_add_once
ChatGPTAdd a ONE-OFF payment to the «Прогноз денег» (Cash-flow forecast) calendar. A recurring one (rent, salary, loan), even new, — expenses_set. The preview also shows how the forecast changes («После этого: …»). A repeated call would create a second payment — if the connection drops, repeat the confirmation with the same token, not a new call. TWO-PHASE: the preview shows «before → after». Relay the write response (what was done and the cash-flow forecast after it) as is — do not interpret it. Requires the «Expert» plan.
cashflow_payment_confirm
ChatGPTAccept a suggested recurring payment of the «Прогноз денег» (Cash-flow forecast) calendar as a plan — only a payment whose actions in cashflow_get have confirm. Amount and days default to the suggested ones; you can change amount, period_type, day1, day2, share1 (share of the first payment in %), pay_month (month of the quarter). TWO-PHASE: the preview shows «before → after». Relay the write response (what was done and the cash-flow forecast after it) as is — do not interpret it. Requires the «Expert» plan.
cashflow_payment_edit
ChatGPTChange the amount or days of a payment plan of the «Прогноз денег» (Cash-flow forecast) calendar: amount, or amount1+amount2 for «twice a month»; day1, day2; what is not passed stays as in the plan. It does not remove the second day of a «twice a month» plan — do not promise this: such a plan can be switched to a single date with the form on the screen or via expenses_set with when. A one-off into a recurring one — expenses_set. TWO-PHASE: the preview shows «before → after». Relay the write response (what was done and the cash-flow forecast after it) as is — do not interpret it. Requires the «Expert» plan.
cashflow_payment_move
ChatGPTMove one date of a payment of the «Прогноз денег» (Cash-flow forecast) calendar to another day. The preview also shows how the forecast changes («После этого: …»). TWO-PHASE: the preview shows «before → after». Relay the write response (what was done and the cash-flow forecast after it) as is — do not interpret it. Requires the «Expert» plan.
cashflow_payment_skip
ChatGPTSkip one date of a payment of the «Прогноз денег» (Cash-flow forecast) calendar: the payment does not happen in this period. The preview also shows how the forecast changes («После этого: …»). TWO-PHASE: the preview shows «before → after». Relay the write response (what was done and the cash-flow forecast after it) as is — do not interpret it. Requires the «Expert» plan.
catalog_browse
ChatGPTProducts as on the «Остатки на складе» (Stock on hand) page: row = variation. Search by name, vendor code and barcode; filters by category (with subcategories), branch and availability. Color, size and other properties — the attributes filter {"Цвет": "красный"}: searches the company's characteristic fields (exact name, key, or a field whose name contains the word), and if there is no such field — the product name; attribute_filter in the response shows where it searched. Row fields: variation_id (for write tools), product_id, name, category_id and category (null — product without a category), sku, vendor_code, barcodes, unit, stock (sum over available branches or for branch_id; for a bundle — how many can be assembled from component stock within each branch, nested bundles included; null for services, non-stock items and bundles without stock components or with a circular reference in the composition), min_stock, retail_price, retail_price_discounted (if a discount applies), wholesale_price and buy_price (only with the employee's rights), is_productset, is_service, image_thumb_url (with with_images). Empty sku, vendor_code, min_stock, barcodes and false is_productset/is_service are not sent. Price null — not set in the price list, 0 — equals zero. Which prices the employee can see — in price_fields of the response; the company's custom price lists a_price…e_price (names in company_get_settings.price_types) — only those available to the employee. All prices are for one branch price_branch_id: branch_id, otherwise the employee's branch, otherwise the company's reference branch, otherwise the first available. buy_price — by the last purchase and the company's stock valuation method from buy_price_method in the response: fifo — the price of that purchase, average — the weighted average cost at the time of that purchase. Order: by product and variation name; when searching, an exact barcode or vendor code match comes first. stock_unavailable: true — the company's stock snapshot is not filled yet.
catalog_create_category
ChatGPTCreate a product category. form_guid is the key of the category itself, not only a retry guard: a matching key UPDATES the existing category — a newer server version is kept, otherwise it may be overwritten with the data sent. For a new category generate a new form_guid (uuid v4); when repeating the same operation keep the key and the data. TWO-PHASE. parent_id — the parent category (id from catalog_list_categories); without it — a root category. Requires the «Expert» plan.
catalog_create_product
ChatGPTCreate a product with variations. product_form_guid and a variation's form_guid are the keys of the product and the variation themselves, not only a retry guard: a matching key UPDATES the existing record — a newer server version is kept, otherwise it may be overwritten with the data sent. For a new product and each new variation generate a separate uuid v4; when repeating the same operation keep the keys and the data. TWO-PHASE. At least one variation with is_generic=true. category_id — the product category (id from catalog_list_categories); without it — no category. variations[].barcodes — barcodes of the variation; without them a barcode is generated if the company generates barcodes automatically. Prices are set separately — catalog_set_prices. Requires the «Expert» plan.
catalog_list_categories
ChatGPTCompany product categories: id, name, parent_id (null — root), is_hidden. id goes into category_id of the catalog_browse tool.
catalog_set_discount
ChatGPTSet a permanent discount on variations in the price list of the branches: it applies to every sale until it is changed; value 0 removes it. type: percent (0..100) or natural — a fixed amount off per unit (the same as fixed in trade rules). branch_ids is optional — defaults to the employee's branches. For a discount by time, days of week, dates or only for selected customers — a trade rule (trade_rules_create, type=time_discount), not this tool. TWO-PHASE. Requires the «Expert» plan.
catalog_set_prices
ChatGPTSet variation prices by branch. TWO-PHASE. prices — an array of items {branch_id, variation_id, prices: {code: price}}; price codes — from company_get_settings.price_types: retail_price, wholesale_price and the company's custom price lists a_price…e_price (their names are there). Requires the «Expert» plan.
company_get_settings
ChatGPTCompany settings: currency, country, time zone, stock valuation method (fifo/average), price mode (unified/per_branch), accounting flags, taxes (rate, inclusive/exclusive, VAT or not), price types (price_types.code), branches (branches: id, name, address, is_active — false for a disabled one). The company's IIN/BIN is excluded from the response. Useful before operations: get branch_id, currency, rates. The ai_access block — the company's plan and what is available via AI: writing (write), allowed and closed reports with the reason. return_reasons — return reasons for sales_return_order (id, name).
documents_get
ChatGPTShort description of a document (number, counterparty, amount, line items) and a link to print it on the web. doc_type: packing_list (waybill), issue_slip (dispatch note), invoice_for_payment (invoice), procurement_slip (goods receipt), writeoff_act (write-off act), movement_slip (transfer), payment_voucher (cash receipt order, «ПКО»), expense_voucher (cash disbursement order, «РКО»). entity_id — id of the order/goods receipt/payment. Each type has its own right: waybills and invoice — viewing sales, goods receipt — goods receipts, write-off act — write-offs, transfer — transfers, «ПКО» and «РКО» — payments. Goods receipt amount and purchase prices — with the right to view purchase prices.
expenses_fill
ChatGPTFill empty rows of «Мои расходы» (My expenses) that have history with the average over 3 closed months — like the «Заполнить средним» (Fill with average) button (fill_count from expenses_get — how many rows will be filled). TWO-PHASE: the preview lists the finance categories and amounts. The response — how many were saved and the cash-flow forecast after that. Requires the «Expert» plan.
expenses_get
ChatGPTThe «Мои расходы» (My expenses) table: recurring expenses by finance category — amount per month (or per quarter/year), the payment schedule, average over 3 closed months, current month actuals, amount and schedule hint, the «not recurring» mark. rows — table rows, group: filled — filled in, suggest — we suggest filling in. addable — finance categories that can be added (only finance_category_id and title; to set — expenses_set with this finance_category_id). fill_count — how many rows expenses_fill will fill. When answering, quote when_text and *.text as is — do not recompute. Requires the «Expert» plan.
expenses_set
ChatGPTSet, change or remove a recurring expense by finance category (finance_category_id from expenses_get): the amount and the payment schedule («when»). This is the tool for ANY recurring payment — rent, salary, a loan, a subscription — including a new category with no history (it is in addable of expenses_get) and turning an existing one-off payment into a recurring one: the plan replaces the category's one-off payments from the month it takes effect, the preview lists them. Pass only what changes: an amount or schedule not passed stays as is. amount=null or 0 — remove the plan. when — the schedule: monthly (day1), twice (day1, day2, amount1, amount2; without the pair the amount is split in the row's previous proportion, and if the row is not «twice» — in half), quarter (day1, month 1..3 — month of the quarter), year (day1, month 1..12), during — within the month. not_regular=true — the category is not recurring (the forecast stops placing it on dates; the plan for the category is removed), false — remove the mark. TWO-PHASE: the preview shows «before → after» and from which month. Relay the write response (what was done and the cash-flow forecast after it) as is — do not interpret it. Requires the «Expert» plan.
finance_create_category
ChatGPTCreate a new finance category («статья») of income (direction=in) or expense (direction=out) — like «Добавить статью» in the finance categories settings. Use it when the category the user names is not in finance_list_categories; then use its finance_category_id in expenses_set, finance_create_expense and others. An existing category with the same name is refused with its id — use that one. group — optional, the name of an existing category group of the same direction. TWO-PHASE. Requires the «Expert» plan.
finance_create_expense
ChatGPTExpense from an account — like the «Расход» (Expense) form on the Payments page, without a register or shift. TWO-PHASE: the preview checks access to the account, the balance, the finance category and the branch and shows the balance after the operation. Only the owner, accountant or director can set the expense date. After posting, an expense notification is created; depending on company settings and recipients it may be delivered via external channels. The notification contains the payment, amount, branch and employee. Requires the «Expert» plan.
finance_create_income
ChatGPTIncome to an account — like the «Приход» (Income) form on the Payments page, without a register or shift. TWO-PHASE: the preview checks access to the account, the finance category and the branch and shows the balance after the operation. Do not post a payment for a sale or a goods receipt with this tool. Requires the «Expert» plan.
finance_list_accounts
ChatGPTCompany finance accounts with current balances (field amount): id, branch_id, type, name, is_common, amount, is_negative_balance_allowed, commission and commissions (bank commission of the account — for bank_commission of a payment; not sent when the account has none). Archived accounts (operations on them are not allowed) are returned only when is_archived is set, then with the is_archived field. include_branch_info=true adds branch_name. To pay for a sale or a goods receipt ALWAYS pass the branch_id of that document: otherwise the list will contain other branches' accounts.
finance_list_categories
ChatGPTFinance categories («статьи»: expense and income categories) for finance_create_expense (direction=out) and finance_create_income (direction=in): id (finance_category_id), name, group. The same finance_category_id is used by reports_get costs, expenses_ and cashflow_.
finance_list_payments
ChatGPTCompany payments (income/expense) with filters: account_id, branch_id, order_id, procurement_id, partner_id, date_start, date_end. Payment fields: id, payment_no, date_of_payment, amount, operation (debit — income, credit — expense), account_id, account_type, branch_id, order_id, procurement_id, customer_id, supplier_id, finance_category_id, is_debt_payment, notes (the finance category name at the end). A field without a value is not sent. If the page is full — request page+1.
goods_receipt_create
ChatGPTCreate a goods receipt: goods arrived from a supplier, stock increases at the purchase price. To order goods from a supplier before they arrive — purchase_order_create; a stock count — revision_create. TWO-PHASE. status: draft — a draft; completed — post: the stock changes immediately. procurement_items: variation_id; quantity — how many arrived; buy_price — purchase price per unit. The items are recorded on behalf of the connected employee. Requires the «Expert» plan.
insights_fast_moving
ChatGPTRanking of product variations by inventory turnover for a period. Ratio for the period = cost of sales net of returns / average inventory value at the start and end of the period; turnover_days — days per one turnover. Sorted by turnover_ratio descending, then variation_id; the ratio is not annualized. Stock valuation method — FIFO or weighted average from company settings. Default — the last 30 completed days; period not longer than 366 days. Dates are local to the company. branch_id — one available branch, otherwise all available. Zero/negative average inventory, negative stock, non-positive net cost of sales and deleted/archived products are excluded; counters — excluded. With incomplete aggregates or aggregates pending recalculation it returns data_complete=false, data_warning and an empty items: this is missing data, not absence of sales. limit/offset — pages of the already sorted ranking. Does not start a recalculation and does not return the register's quick-pick groups. Requires the «Expert» plan.
kassa_close_shift
ChatGPTClose the current register shift. TWO-PHASE. kassa_id is required. Requires the «Expert» plan.
kassa_list
ChatGPTList of the branch's cash registers (id, name, linked accounts, OFD). branch_id is required. is_binded=1 — the register is bound to a cashier's tablet; do not open a shift on it from here.
kassa_list_shifts
ChatGPTShifts (a shift is a cash register working day), newest first. Needs kassa_id OR branch_id: by branch — shifts of all its registers, without iterating registers one by one. only_open=true — only open (not closed) shifts: this is how you find a register through which a sale can be made. show_last=true — only the last one. has_more — there is a next page.
kassa_open_shift
ChatGPTOpen a register shift. TWO-PHASE. kassa_id is required. Requires the «Expert» plan.
labels_print
ChatGPTPrint price labels on the user's OPEN X2 tab: fills the labels list and prints it there, the way a person would on the «Этикетки» (Labels) page. Needs a connected tab — if the user has no X2 tab open in their browser, this tool is refused: ask the user to open X2 and try again. TWO-PHASE: the first call fills the list on screen and returns a preview of the print job with a confirmation_token; repeat with the token to print. template — a template name as shown on the page (optional, if there is more than one template and none is selected, the first call stops and lists the names to choose from). Labels already in the list are printed too, unless replace_list=true clears them first. Requires the «Expert» plan.
partners_create_customer
ChatGPTCreate a customer (or a supplier with is_supplier=true). TWO-PHASE. At least one of: name/company_name/phone_number/email is required. Requires the «Expert» plan.
partners_list_customers
ChatGPTCompany counterparties with search and debt (by company name, person name, phone, address). The response contains name, company name, phone, email, address, debt, bonuses and discounts; IIN/BIN and date of birth are excluded. is_supplier=true — suppliers only. id — card of one counterparty. has_more — there is a next page.
plans_activate
ChatGPTEnable a draft plan plan_id on the «Планы» (Plans) board. A closed month does not change. TWO-PHASE: the preview shows what will change. Relay the write response as is — do not interpret it. Requires the «Expert» plan.
plans_create
ChatGPTCreate a plan on the «Планы» (Plans) board — the «Свой план» (Custom plan) button. For a monthly sales target of the company, a branch or a seller (e.g. «set Asel's plan for October») use sales_goals_set — the same plans as a table; plans_create is for what the table cannot do: quarterly, yearly and one-off plans, departments, a plan under a chosen parent. - metric — the metric; - scope_type — for whom: company — the whole company; branch — branch scope_id; department — department scope_id; employee — seller scope_id (scope_id — from plans_list rows; branches — also from company_get_settings.branches; sellers — entity_id from sales_goals_get kind=sellers); - period_type and recurrence (once — one period, repeat — every period); period_start — the first day of the period (month; quarter — January 1, April 1, July 1, October 1; year — January 1); period_end — end of recurrence (not set — no end); - amount — per period (for orders_count — the number of receipts); - branch_id — the branch of a department's or seller's plan; not set — the branch of the plan above, for a seller without a plan above — their branch if they have only one, otherwise all their sales; - parent_id — the plan from plans_list under which the new one goes (metric and period — as its). The plan is created as a draft, as on the web; activate=true — enable right away. A plan with the same metric, scope and start is not created twice. TWO-PHASE: the preview shows which plan will be created. A repeated call without a token would create a second plan — if the connection drops, repeat the confirmation with the same token. Relay the write response as is — do not interpret it. Requires the «Expert» plan.
plans_delete
ChatGPTDelete plan plan_id from the «Планы» (Plans) board. Deleting a company or branch plan also finishes all child plans — the preview lists them; name them to the user before confirming. A closed month does not change. TWO-PHASE: the preview shows what will change. Relay the write response as is — do not interpret it. Requires the «Expert» plan.
plans_distribute
ChatGPTDistribute plan plan_id on the «Планы» (Plans) board among children for the month in month (mode=this_period — only this period, from_period — from it onwards): children — shares {plan_id, amount} for existing children from plans_list plan_id=… and {scope_type, scope_id, amount} for new ones (scope_id of a department, seller or branch — from plans_list rows; branches — also from company_get_settings.branches; sellers — entity_id from sales_goals_get kind=sellers). A closed month does not change. TWO-PHASE: the preview shows what will change. Relay the write response as is — do not interpret it. Requires the «Expert» plan.
plans_finish
ChatGPTFinish plan plan_id on the «Планы» (Plans) board: month — the last month in effect. Finishing a company or branch plan also finishes all child plans — the preview lists them; name them to the user before confirming. A closed month does not change. TWO-PHASE: the preview shows what will change. Relay the write response as is — do not interpret it. Requires the «Expert» plan.
plans_list
ChatGPTThe «Планы» (Plans) board: sales plans (revenue, gross profit, number of receipts) for the company, branches, departments and sellers — plan, actual, completion percent, status, draft or active. children_count — how many child plans the row has on this board. plan_id — one plan in detail: the cascade of child plans and the breakdown by month. Only plans available to the employee are visible (a seller sees their own). scope_type and scope_id of the row (and of the children in plan_id) — whom the plan is for: id of the branch, department or seller for plans_create and plans_distribute (departments cannot be found anywhere else). When answering, quote _text as is — do not recompute. The same plans are edited as a monthly table in sales_goals_: for a monthly sales target of the company, a branch or a seller use sales_goals_get / sales_goals_set. The synthetic row («Без продавца», No seller) — actuals without a plan, it cannot be changed. Requires the «Expert» plan.
plans_override_period
ChatGPTSet the amount of one period (month) of plan plan_id on the «Планы» (Plans) board, or skip=true to skip the period. A closed month does not change. TWO-PHASE: the preview shows what will change. Relay the write response as is — do not interpret it. Requires the «Expert» plan.
plans_set_amount
ChatGPTSet a new amount of plan plan_id on the «Планы» (Plans) board starting from the month in month: mode=this_period — only this period, from_period — from it onwards. A closed month does not change. TWO-PHASE: the preview shows what will change. Relay the write response as is — do not interpret it. Requires the «Expert» plan.
procurement_add_payment
ChatGPTPay a supplier for an EXISTING goods receipt (procurement_id from procurement_list — the receipt number the user sees). TWO-PHASE: the preview checks the goods receipt, the account and the remaining debt. No expense category is needed — the payment is linked to the goods receipt. Do NOT use finance_create_expense for this: it creates a separate expense and does not reduce the debt to the supplier. Take the account from finance_list_accounts with the branch_id of this goods receipt's branch: an account of the branch or a shared one will do. The system will not allow an overpayment — the amount is not more than the remaining debt. Requires the «Expert» plan.
procurement_list
ChatGPTList of goods receipts/transfers/write-offs/stock counts (action=acceptance|move|writeoff|revision). Filter by id, status, action. Document fields: id, action, status, branch_id, branch_name, source_branch_id, source_branch_name, supplier_id, supplier_name, supplier_company_name, procurement_date, purchase_order_date, estimated_delivery_date, notes, items_count. Line items (procurement_items) and supplier payments come only for one document by id; a list has items_count. Purchase amounts (document total, buy_price and line total) and supplier payments — only with the right to view purchase prices. A field without a value is not sent. If the page is full — request page+1.
production_cancel
ChatGPTA draft is deleted; a posted document is cancelled — its write-off and receipt are cancelled, raw material returns to stock. Not possible while its parts were taken by another production document. TWO-PHASE. Requires the «Expert» plan.
production_card_get
ChatGPTThe scheme (yield norms) of a raw material for a production kind: reference measure, cost method, parts with yield % and pieces per reference. With quantity — parts filled for that amount (as the «Fill by scheme» button); source_units — how many units are processed (½ carcass = 0.5): piece parts are counted per unit, rounded down. source_variation_id — from catalog_browse.
production_card_set
ChatGPTReplace the scheme of a raw material entirely: ref_measure — reference raw material amount (e.g. carcass weight 280), cost_method, items — every part with yield_percent (part weight / raw material × 100) and pieces per reference for piece parts. Total yield ≤ 100%. TWO-PHASE. Requires the «Expert» plan.
production_create
ChatGPTCreate a production document — cutting (a carcass into parts), packing (bulk into packs) or assembly (components into a product). TWO-PHASE: the preview shows parts, yield, loss vs norm and revenue as the user sees them on the web. status: draft — a draft that does not change stock; completed — post right away (raw material is written off, parts received). Ask the user which. parts may be omitted for cutting and packing: then they are filled from the raw material scheme (see production_card_get), and without a scheme — in proportion to the previous posted document of this raw material («as last time», an estimate); neither a scheme nor a previous cutting — production_suggest_parts gives the parts and estimated weights. Part products that do not exist yet — production_parts_create. A draft is saved without loss_reason, it is needed on posting; source_units — how many units are processed (½ carcass = 0.5). Assembly: inputs are the components, parts[0] is the product. Loss above the norm needs loss_reason. Products — variation_id from catalog_browse. Requires the «Expert» plan.
production_get
ChatGPTOne production document as the user sees it: inputs (raw material, quantity, measure), parts (quantity, weight, sale price, yield norm and fact in %), loss vs norm, reason, revenue at sale prices, numbers of its write-off and receipt documents. Cost, profit and markup — only with the right to view purchase prices.
production_list
ChatGPTProduction documents (cutting — carcass into parts, packing — bulk into packs, assembly — several components into a product): kind, status, date, branch, document product, how much raw material went in. Yield, loss and cost — in production_get. Dates — YYYY-MM-DD, local. Only the user's branches and production kinds they have the right to.
production_parts_create
ChatGPTCreate the part products of a production document in one call — instead of catalog_create_product for each part. items — name, unit (unit_kg, unit_g or unit_piece — for heads, legs and other parts counted in pieces) and the sale price (it becomes the branch retail price). Before the call ask the user the sale prices of the new parts in one question: without prices the cutting preview refuses to split the cost by price. A product with the same name already in the catalog is reused, not duplicated. The response gives variation_id of every part for production_create. category_id — optional (catalog_list_categories). TWO-PHASE. Requires the «Expert» plan.
production_post
ChatGPTPost a production draft: raw material is written off, parts received at the calculated cost. TWO-PHASE. The weighed result may come in the same call: parts (the full list), inputs, source_units, cost_method replace the draft's; what is not passed stays as in the draft. Loss above the norm needs loss_reason. id — from production_list (status draft). Requires the «Expert» plan.
production_suggest_parts
ChatGPTTypical parts of a carcass by its name — as the «Suggest parts» button on the web (an AI suggestion; only the raw material name is sent to the AI). Use it when the raw material has no scheme (production_card_get has_card=false) and no previous cutting — do not ask the user for yield percentages, they rarely know them. Each part: name, unit_code, yield_percent, variation_id (null — not in the catalog yet), sell_price (null — no retail price), and quantity/measure for this raw material amount — an estimate before weighing. Show the parts to the user and ask the sale prices of the parts without sell_price in one question; then parts without variation_id — production_parts_create with these prices, then production_create with these quantities as a draft; after weighing — production_post with the weighed parts. Only for meat, poultry and fish. A carcass received in pieces (1 pc): ask the user its weight and pass weight_kg — the cutting then goes from 1 pc, cost split by sale price, without loss; do not change the unit. source_variation_id — from catalog_browse.
production_update
ChatGPTChange a production document. A draft — saved with the new values, stock does not change (to post it — production_post). A posted one — part quantities, weights and sale prices, raw material quantity (the same inputs), loss reason; documents that took its parts are recalculated too. What is not passed stays as is; parts — the full list. recalc=true — only a posted one: recalculate the cost from raw material batches with the same weights (only alone). TWO-PHASE. Requires the «Expert» plan.
purchase_order_create
ChatGPTPurchase order to a supplier with items named by the user (for an order by recommendation — purchase_order_from_recommendation). It is also used to order recommendation items without a supplier (purchase_recommendations with supplier_id=0): the user chooses the supplier. An order is placed BEFORE the goods arrive; when the goods have arrived — goods_receipt_create, not this tool. TWO-PHASE: the preview shows the items and the amount. Prices — the last purchase price of each product, they can be adjusted in the order editor. Bundles and services are not ordered. status: draft — draft, sent — mark the order as sent in X2 right away; X2 does not contact the supplier (the quantity goes into the expected delivery; the lead time must be set in the supplier card). Ask the user whether to mark it as sent. Requires the «Expert» plan.
purchase_order_from_recommendation
ChatGPTPurchase order to a supplier with items and quantities from the purchase recommendation — like the «Заказать» (Order) button on the «Закупка» (Purchasing) screen. What goes into the order — see purchase_recommendations with the same supplier_id. Items whose need a transfer could cover (transfer_qty) are ordered too — offer a transfer first; compare the order sum with safe_to_spend from cashflow_get. TWO-PHASE: the preview shows the items and the amount. There is one recommendation draft per «supplier × branch» pair: if it already exists, missing items are added to it. branch_ids — for which branches; one branch — an order for itself, several or none — a network order through the hub split across branches. To order for the whole network through the hub (order_mode in purchase_recommendations), call WITHOUT branch_ids — do NOT pass the hub branch alone: that orders only the hub's own need, not the other branches'. status: draft — draft, sent — mark the order as sent in X2 right away (the quantity goes into the expected delivery; X2 does not contact the supplier). Ask the user whether to mark it as sent. The lead time must be set in the supplier card — without it the order is not created. Items without a supplier (supplier_id=0) are not ordered with this tool: ask whom to order from and use purchase_order_create with that supplier. When the goods arrive — goods_receipt_create. Requires the «Expert» plan.
purchase_recommendations
ChatGPTPurchase recommendation based on the demand forecast and stock — like the «Закупка» (Purchasing) screen. Without supplier_id — suppliers with a need (suppliers): supplier_name, positions (number of items to order), to_buy_qty, transfer_qty, buy_sum (order amount at the last purchase prices; no_price — number of items without a price), lost_profit, lead_days and lead_is_set (lead time is set in the supplier card), overdue (number of items that should already have been ordered); the largest lost profit first. supplier_id=0 — products without a supplier. With supplier_id — the supplier's items (positions): variation_id, name, suggested_qty, order_qty (goes into the order, rounded to the product's step — tell the person this one), order_sum, unit, stock, days_left and per_day (expected daily sales), buy_price, buy_sum, lost_profit, urgency. transfer_qty — how much of the need another branch could cover by a transfer; it is NOT subtracted from the order: offer the user a transfer (transfer_create) first. urgency — how soon to order: overdue — nothing is available to sell; urgent — order now so as not to run out. lost_profit — estimated profit at risk if nothing is ordered. Before ordering, compare the sum with safe_to_spend from cashflow_get and tell the user if it is more. To order — purchase_order_from_recommendation. branch_id — one branch; without it — all available to the employee (a network order goes to the hub — the branch that distributes goods to the others by transfers). order_mode (only with several branches) — how the network orders: hub_branch (the hub), via_hub (branches supplied through it), order_themselves (branches that order on their own). data_as_of — when it was calculated. Purchase amounts and lost profit — only with the right to view purchase prices. has_more — there is a next page. Requires the «Expert» plan.
reports_get
ChatGPTReady-made reports — built on the server, no need to recalculate them. What each report shows, its default period and filters — in the description of the report parameter. Dates — YYYY-MM-DD. Report tables (items etc.) are returned by limit rows starting from offset; rows in the response — how many rows in total and how many returned. data_warning — part of the data is still being recalculated. Cost and profit (cost_net, gross_profit, margin_pct, stock value) are visible only with the right to view purchase prices; without it the fields are not returned, and metric=profit is rejected.
revision_create
ChatGPTCreate a stock count: the actual counted stock; the server computes the surplus and shortage against the book stock. Goods that arrived from a supplier — goods_receipt_create. TWO-PHASE. status: draft — a draft; completed — complete the count: it does NOT change the stock by itself — its surplus and shortage are posted afterwards by revision_post_results (a goods receipt and a write-off from the count). procurement_items: variation_id; quantity — how many were counted (the actual quantity, not the difference). inventory_price_type — at which price to value the surplus and shortage (default buy_price). The items are recorded on behalf of the connected employee. Requires the «Expert» plan.
revision_post_results
ChatGPTPost the results of a COMPLETED stock count — the same as the «Автоматически создать списание и оприходование» button on the web: a goods receipt for the surplus (at the purchase price) and a write-off for the shortage are created and posted. A stock count does not change the stock by itself — this tool does. revision_id — the stock count number (procurement_list with action=revision, or the result of revision_create). TWO-PHASE: the preview lists what will be received and written off; if the branch has less stock than the shortage, only what is in stock is written off. Documents are created once: a goods receipt or a write-off already created from this stock count is not created again. Requires the «Expert» plan.
sales_add_items
ChatGPTAdd products to an EXISTING order (sale). Use when the order is already created and the user asks to «add more». TWO-PHASE: the preview shows the total before and after. In items[] variation_id and quantity are required. sell_price is optional: if missing or <= 0, execution uses the retail price from the price list of the order's branch, if found. To set the price explicitly pass sell_price > 0. A completed order is edited only with the order/edit_completed right. Trade rules (discounts, gifts, bans) are not applied to the added items. Do not promise the user a discount or gift under a rule. Requires the «Expert» plan.
sales_add_payment
ChatGPTAccept a payment for an EXISTING sale (order_id from sales_list_orders — the sale number the user sees). TWO-PHASE: the preview checks the order, the account and the remaining debt. No income category is needed — the payment is linked to the sale. Do NOT use finance_create_income for this: it creates a separate income and does not reduce the customer's debt. Take the account from finance_list_accounts with the branch_id of this sale's branch: an account of the branch or a shared one will do. Cash or non-cash is set by the account type (type: pay_by_cash — cash, pay_by_cc — card, cashless_payment — bank transfer, card_to_card — card transfer): pick an account of the type the person named; several such accounts — ask which. The system will not allow an overpayment — the amount is not more than the remaining debt. Requires the «Expert» plan.
sales_create_order
ChatGPTCreate an order/sale. TWO-PHASE. order_items[].variation_id/quantity/sell_price are required. form_guid — idempotency. status is required, and «completed» means FULLY PAID: if there is no payment, ask the person whether to postpone the sale (draft) or issue it on credit (issued), and do not decide for them. kassa_id/session_no are optional: without them the sale goes outside the register, as from the web. If the company has shift management enabled (smena_management_enabled in company_get_settings) — ask for the register and make the sale through its open shift. On execution, if external loyalty programs Tuvis/SAGI are configured and the conditions on the customer, status and payment of the order are met, operation data may be sent to these services to accrue or redeem bonuses. Trade rules (discounts, gifts, bans) are not applied to this sale: bans are only checked after the sale. Do not promise the user a discount or gift under a rule. Requires the «Expert» plan.
sales_goals_fill
ChatGPTButtons of the sales goals table (as in sales_goals_get): mode=average — fill empty rows with the average over 3 closed months with growth (0, 10 or 20 %; fill_count from sales_goals_get — how many rows will be filled); mode=split — distribute the plan one level up (the company plan; for sellers of one branch — the branch plan) by share of sales over 3 months; rows without history get 0, and their plan is removed — before confirming, tell the user which rows these are (the preview lists them). For kind=company — only average. Goals are set from this month and stay in effect until they are changed. TWO-PHASE: the preview lists the rows and amounts. The response — how many rows were saved and which failed. Requires the «Expert» plan.
sales_goals_get
ChatGPTSales goals as a table for a month: kind=company — the company plan by metric; branches — by branch; sellers — by seller. Row: average over 3 closed months, month actuals, plan, percent. above — the plan one level up and the reconciliation of the rows' sum with it, total — the sum of the rows' plans. sales_failed — sales were not read: actuals are empty, not zero. fill_count — how many rows sales_goals_fill will fill. When answering, quote *_text and recon_text as is — do not recompute. These are the same plans as on the «Планы» (Plans) board (plans_list); a monthly target of the company, a branch or a seller is set with sales_goals_set. Requires the «Expert» plan.
sales_goals_set
ChatGPTFor a monthly sales target of the company, a branch or a seller (e.g. «set Asel's plan for October» — kind=sellers) use this tool; plans_create is for quarterly and yearly plans, departments and cascades. Set, change or remove the sales goal of one table row (as in sales_goals_get): kind=company — the company plan for the metric; branches — the plan of branch branch_id; sellers — the plan of seller employee_id (branch_id — the group's branch, if sellers of one branch were viewed). The goal is set from this month and stays in effect until it is changed; a closed month does not change. amount — the amount per month (for orders_count — the number of receipts); null or 0 — remove the plan. TWO-PHASE: the preview shows «before → after» and the reconciliation with the plan one level up after the change, and for a new plan — which plan it will go under. Relay the write response as is — do not interpret it. Requires the «Expert» plan.
sales_list_orders
ChatGPTCompany orders/sales with filters: branch_id, date_start+date_end (only together), customer_id, order_status, payment_status. Order fields: id, order_date (company local time, as all times), status, channel, external_order_id, branch_id, price_type, is_return, return_for_order_id, return_reason, customer_id, customer_name, customer_company_name, subtotal, discount_type, discount_value, total, total_paid, nds_value, taxes_total, seller_name, notes, delivery_status, delivery_date, items_count and payments (list of payments). Line items (order_items) and taxes come only if order_id or with_items=true is set: in a list for a period they make up most of the response. A field without a value is not sent — a missing key means «not set». Counterparty contact data (IIN/BIN, phone, address) is not returned in the sales list — it is in partners_list_customers. If the page is full — request page+1.
sales_return_order
ChatGPTReturn goods for an existing completed or issued sale — the goods go back to stock. TWO-PHASE. Pass order_id (id from sales_list_orders), quantity_to_return {variation_id: quantity} and return_reason_id (from company_get_settings.return_reasons — ask the user for the reason); the server takes the branch and the customer from the order and the employee from the connection. The order must belong to a branch available to the employee. Money back to the customer — refunds [{account_id, amount}]; without refunds only the goods are returned. By default refund to the account the sale was paid to (payments of the sale in sales_list_orders); another account — only if the user names it, and it must be an active account of the sale's branch or a shared one. The refund total is not more than was paid for the sale (not by bonuses) minus earlier refunds; usually it equals the value of the returned goods shown in the preview — ask the user if unsure. Bonuses are returned automatically. On execution, if external loyalty programs Tuvis/SAGI are configured and the conditions of the original sale are met, return data may be sent to these services to cancel accrued bonuses or restore redeemed ones. Requires the «Expert» plan.
screen_get
ChatGPTWhat is on the X2 page the user has open in the browser right now: url, title, open dialog and visible buttons, links and tabs with element_id (for screen_highlight); only the first 60 in page order. find="text" searches the whole page instead: list rows (row=true) and elements containing the text, for example a document number or a product name — then screen_highlight shows it to the user. element_id is valid until the next screen_get (a find call counts too). pages=true also returns pages the user can open (menu and reports, by the user's rights) and doc_views (document url prefixes) for screen_open; tours=true — training tours for screen_tour. Reads the page only, changes nothing. If X2 is not open in the browser, ask the user to open it. Requires the «Expert» plan.
screen_highlight
ChatGPTHighlight an element on the user's open X2 page with a short hint («press here»). Pick one: element_id (from screen_get), text (finds the smallest element whose own text contains it, e.g. a product name or a number in a table cell; several matches return choices), or steps (up to 6 {element_id|text, hint} shown one after another as a mini tour; returns immediately with count). Requires the «Expert» plan.
screen_open
ChatGPTOpen a page in the user's X2 tab and wait for it to load; returns landed (the actual url: a redirect means no access) or null if still loading. url — a page from screen_get pages (query string allowed) or a document view: a doc_views prefix plus the document number (sale /shop/order/view/{id}, acceptance /shop/inventory/acceptance/view/{id}, write-off or return to supplier /shop/inventory/writeoff/result/{id}, transfer /shop/inventory/movement/view/{id}). Products and customers have no page of their own: open the list with a search, /shop/variation?search_product={name} or /shop/partner/index?search={name}, then screen_get find + screen_highlight. Requires the «Expert» plan.
screen_tour
ChatGPTStart a step-by-step training tour in the user's X2 tab (slug — from screen_get tours). Opens the tour's start page if needed. Requires the «Expert» plan.
sum_get
ChatGPTTotals for a period in ONE call: amounts, counts, paid and owed — with an optional breakdown. Use it for ANY "how much / how many / total / by seller / by day" question instead of paging sales_list_orders or finance_list_payments. what: sales — sales documents: sales_count, sales_amount (after all discounts, as revenue in reports), paid, unpaid (customers still owe for these sales today), returns, net_sales, average_check, money received from customers in the period (received, refunded; by seller — only money applied to the seller's sales, split into for period sales and for earlier sales); sale_items — goods sold: qty, revenue, discount, returns, cost and gross profit; payments — money movement: income, expense, net, transfers between own accounts apart, expense_by_category as the «Расходы» report; procurements — completed goods receipts: purchase amount, paid and owed to suppliers; writeoffs — completed write-offs (spoilage, damage, shortage; NOT returns): documents_count, qty and writeoff_cost at purchase cost. by — one breakdown; rows come sorted by the main amount, the tail is summed into one "others" row, totals are always exact. A row id (seller user_id, customer, branch, category) can be passed to list tools to see the documents. Default period — current month; dates are company-local YYYY-MM-DD, not longer than 366 days.
supplier_return_create
ChatGPTReturn goods to a supplier from a branch's stock (defect, mis-sort (wrong items delivered), surplus). For a write-off without a supplier — writeoff_create. TWO-PHASE: the preview checks the stock. Goods leave the stock immediately, even for a draft. status: draft — draft, it can be posted or cancelled on the web; completed — post right away (goes into the branch's ongoing stock count, a notification is sent). The return amount is at the purchase prices of warehouse batches (FIFO), it is not passed; in the document it becomes the supplier's debt, as on the web. Money from the supplier is not accepted via the assistant — only on the web. Ask the user for the reason and whether to post the return. Bundles, products with serial numbers and services are not returned via the assistant — only on the web. Requires the «Expert» plan.
trade_rules_create
ChatGPTCreate a sale ban, a time discount or an N+M gift. TWO-PHASE: the preview checks the rule and describes how it will work. title, type and target are required; for a discount — discount_mode and discount_value, for a gift — buy_qty and get_qty. Fields of another type — error. If the company has several branches, branch_id is required — ask the user. Gift parameters the user did not name (what is given, who adds it, return, limit) are shown explicitly in the preview — check them with the user. The rule applies on X2 registers when a product is added to a receipt and again when the customer in the order changes; it does not apply to orders created before the rule. Sales via sales_create_order and sales_add_items do NOT apply rules. Registers with fiscal (OFD) integration do not give gifts. Changes take effect immediately. Priority, sales channels and conditions other than «only selected customers» cannot be set via the assistant: for an existing rule they are kept as they were. When answering about a rule, quote the description from the preview or explain from trade_rules_list as is — do not interpret the fields. Requires the «Expert» plan.
trade_rules_list
ChatGPTCompany trade rules: sale bans, time discounts, N+M gifts — including disabled ones. Row: id (for trade_rules_update) and fields in the same form that trade_rules_create / trade_rules_update accept; names — names of objects, customers and the branch; explain — the server's full description of the rule: how exactly it works. WHEN ANSWERING ABOUT A RULE, QUOTE explain AS IS — do not interpret the fields. priority and channels — read-only. has_other_conditions=true — there are conditions set outside the form; they cannot be changed via the assistant. The rule applies on X2 registers when a product is added to a receipt and again when the customer in the order changes; it does not apply to orders created before the rule. Sales via sales_create_order and sales_add_items do NOT apply rules. Registers with fiscal (OFD) integration do not give gifts. Changes take effect immediately. Priority, sales channels and conditions other than «only selected customers» cannot be set via the assistant: for an existing rule they are kept as they were. When answering about a rule, quote the description from the preview or explain from trade_rules_list as is — do not interpret the fields.
trade_rules_update
ChatGPTChange a rule (id from trade_rules_list). Fields and their meaning — as in trade_rules_create (each is described there). Pass only what changes: the rest stays as it was; null for required fields also means «do not change». A list (category_ids, customer_ids…) is replaced entirely, [] — clears it. target=all clears the selected products; with gift_pool=same the gift follows the target. The type cannot be changed. To disable or enable — is_enabled. TWO-PHASE: the preview shows «before → after» and the resulting description. The rule applies on X2 registers when a product is added to a receipt and again when the customer in the order changes; it does not apply to orders created before the rule. Sales via sales_create_order and sales_add_items do NOT apply rules. Registers with fiscal (OFD) integration do not give gifts. Changes take effect immediately. Priority, sales channels and conditions other than «only selected customers» cannot be set via the assistant: for an existing rule they are kept as they were. When answering about a rule, quote the description from the preview or explain from trade_rules_list as is — do not interpret the fields. Requires the «Expert» plan.
transfer_create
ChatGPTTransfer goods from one branch to another: source_branch_id — the SENDING branch, branch_id — the RECEIVING branch (in other tools branch_id is the branch of the operation). TWO-PHASE: the preview checks the sender's stock. Goods leave the sender's stock immediately, even for a draft; they appear at the receiver after sending and the receiver's confirmation. status: draft — draft, it can be sent on the web; sent — send right away (the receiver gets a notification and confirms receipt). An employee of the sending branch or the owner can send. Ask the user whether to send right away. Bundles, products with serial numbers and services are not transferred via the assistant — only on the web. Requires the «Expert» plan.
writeoff_create
ChatGPTWrite off goods from a branch's stock (defect, spoilage, expired, company needs, shortage). TWO-PHASE: the preview checks the stock. Goods leave the stock immediately, even for a draft. status: draft — draft, it can be posted or cancelled on the web; completed — post right away (goes into the branch's ongoing stock count, a notification is sent). Ask the user for the reason and whether to post the write-off. The write-off price is by warehouse batches (FIFO), it is not passed. Bundles, products with serial numbers and services are not written off via the assistant — only on the web. Requires the «Expert» plan.
cashflow_category_mute
Claudecashflow_category_set_nature
Claudecashflow_get
Claudecashflow_payment_add_once
Claudecashflow_payment_confirm
Claudecashflow_payment_edit
Claudecashflow_payment_move
Claudecashflow_payment_skip
Claudecatalog_browse
Claudecatalog_create_category
Claudecatalog_create_product
Claudecatalog_list_categories
Claudecatalog_set_discount
Claudecatalog_set_prices
Claudecompany_get_settings
Claudedocuments_get
Claudeexpenses_fill
Claudeexpenses_get
Claudeexpenses_set
Claudefinance_create_category
Claudefinance_create_expense
Claudefinance_create_income
Claudefinance_list_accounts
Claudefinance_list_categories
Claudefinance_list_payments
Claudegoods_receipt_create
Claudeinsights_fast_moving
Claudekassa_close_shift
Claudekassa_list
Claudekassa_list_shifts
Claudekassa_open_shift
Claudelabels_print
Claudepartners_create_customer
Claudepartners_list_customers
Claudeplans_activate
Claudeplans_create
Claudeplans_delete
Claudeplans_distribute
Claudeplans_finish
Claudeplans_list
Claudeplans_override_period
Claudeplans_set_amount
Claudeprocurement_add_payment
Claudeprocurement_list
Claudeproduction_cancel
Claudeproduction_card_get
Claudeproduction_card_set
Claudeproduction_create
Claudeproduction_get
Claudeproduction_list
Claudeproduction_parts_create
Claudeproduction_post
Claudeproduction_suggest_parts
Claudeproduction_update
Claudepurchase_order_create
Claudepurchase_order_from_recommendation
Claudepurchase_recommendations
Claudereports_get
Clauderevision_create
Clauderevision_post_results
Claudesales_add_items
Claudesales_add_payment
Claudesales_create_order
Claudesales_goals_fill
Claudesales_goals_get
Claudesales_goals_set
Claudesales_list_orders
Claudesales_return_order
Claudescreen_get
Claudescreen_highlight
Claudescreen_open
Claudescreen_tour
Claudesum_get
Claudesupplier_return_create
Claudetrade_rules_create
Claudetrade_rules_list
Claudetrade_rules_update
Claudetransfer_create
Claudewriteoff_create
Claude