Purchasing

Say what a supplier sells

purchasing_save_supplier_items · Changes data · Markdown

Says which Inventory items a supplier sells: their code, cost, pack size, minimum order, lead time and a fixed reorder quantity.

$0.005 per item saved

From your agent’s balance. A call that fails costs nothing.

An example

Nordstahl sells us the GN 1/1 steel pans at 18.50 each, in packs of 10, at least 20, and takes a week to deliver.

Your agent callspurchasing_save_supplier_items$0.005 per item saved

The example business is Hansen & Voss, a restaurant-equipment wholesaler in Hamburg with 60 staff. The reply is the one the tool really gives.

With these arguments
{
  "supplier": "Nordstahl Küchentechnik GmbH",
  "items": [
    {
      "sku": "GN-PAN-11",
      "code": "NS-GN11-65",
      "unit_cost": "18.50",
      "pack_size": 10,
      "min_order": 20,
      "lead_days": 7
    }
  ]
}
What comes back
{
  "items": [
    {
      "supplier": "Nordstahl Küchentechnik GmbH",
      "sku": "GN-PAN-11",
      "name": "GN 1/1 pan, steel, 65 mm",
      "code": "NS-GN11-65",
      "unit_cost": "18.5",
      "currency": "EUR",
      "pack_size": "10",
      "min_order": "20",
      "order_quantity": null,
      "lead_days": 7,
      "preferred": true
    }
  ]
}

Use it when

A supplier's price list arrives, or before low stock should turn into orders on its own.

What it does

Which Inventory items a supplier sells: their article code, the unit cost in the supplier's currency, the pack size and minimum order, the lead time in days, and a fixed quantity to order at a time when there is one. Saved by SKU (saving again changes it). The first supplier of an item is its preferred one; preferred: true moves it. purchasing_draft_reorders orders from the preferred supplier.

What comes back

items: each saved item with the supplier, SKU, code, cost, pack size, minimum, lead time and whether this supplier is the preferred one. Every reply also carries cost_usd and balance_usd.

Inputs

NameTypeWhat it is
supplierRequiredinteger or stringA supplier_id, or the supplier's name. 1 to 200 characters, at least 1.
itemsRequiredarray of objects1 to 200 items.
items[].skuRequiredstringUp to 64 characters.
items[].codestringThe supplier's own article number. Up to 64 characters.
items[].unit_costRequirednumber or stringUp to 24 characters.
items[].pack_sizenumber or stringSold in packs of this many. Default 1. Up to 24 characters.
items[].min_ordernumber or stringUp to 24 characters.
items[].order_quantitynumber or stringAlways order this many (rounded up to packs). Up to 24 characters.
items[].lead_daysinteger0 to 365.
items[].preferredboolean

The call

Over MCP, call purchasing_save_supplier_items on https://api.conecto.chat/mcp/purchasing. Over REST:

Terminal
curl -X POST https://api.conecto.chat/v1/tools/purchasing_save_supplier_items \
  -H "Authorization: Bearer $CONECTO_KEY" \
  -H "Content-Type: application/json" \
  -d '{"supplier":"Nordstahl Küchentechnik GmbH","items":[{"sku":"GN-PAN-11","code":"NS-GN11-65","unit_cost":"18.50","pack_size":10,"min_order":20,"lead_days":7}]}'

When it refuses

A refused call costs nothing and says what to do next.

CodeWhenWhat to do
not_found404No supplier of the business has that supplier_id or name.Call purchasing_list_suppliers, or add the supplier with purchasing_save_supplier.
not_found404A SKU is not an Inventory item.Add it with inventory_save_items first.
invalid_input400A cost, pack size, minimum or lead time is not a number within its limits.Send numbers like 18.50; a pack size above 0.

Give this to your agent.

Set up Conecto from https://conecto.chat/SKILL.md