Create product
well_create_productCreate a product in the current workspace: a good, a service, a plan or a collection the workspace sells or buys. A variant, a collection member or a dated price nests under a parent product.
Use this tool when the user asks to create or add a product, a service, a plan, a variant or a price, in any language ("Ajoute le produit Audit SEO à 1 200 € HT"). It adds a row to the catalog: it never drafts an invoice or an invoice line, and it asks for no customer.
REQUIRED: name, supply_type (good, service, plan or collection), status (draft, active or archived), availability (in_stock, out_of_stock, preorder or discontinued). Read these values from the user's words when the words make them plain. A product the user adds with no status word is status active; a draft or an archived product needs the user's word. Work billed by the job, the day or the hour (an audit, a consulting day, a training) is a service: supply_type service, stock_tracked false, availability in_stock. A service with a name and a price is a complete order: on WhatsApp it saves at once, with no card and no question. For a physical good, the words rarely say whether it is in stock: ask that one value before the create, and ask for nothing else. OPTIONAL: sku, description, unit_price (a decimal string) with its currency, parent_product_id, vendor_company_id, product_type_project_id, stock_tracked (false for a service or a product made to order, whose own availability then stands). A price for one company or one project is a dated row under its parent: parent_product_id, valid_from (YYYY-MM-DD) and scope_company_id or scope_project_id, with valid_to to close it.
A collection has no parent, no price and no SKU. Two live products cannot share a SKU: the call then fails, and well_list_products finds the existing one.
Returns { success: true, product } on success, or { success: false, error } on failure.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sku | No | The seller's stock-keeping unit, unique among the workspace's live products. A collection has none. | |
| name | Yes | The product's name. | |
| status | Yes | Where the product stands: draft, active or archived. Ask the user when it is not clear. | |
| currency | No | The ISO 4217 currency of unit_price, e.g. EUR. | |
| valid_to | No | The last day a dated price row holds, YYYY-MM-DD; not before valid_from. | |
| unit_price | No | The price as a decimal string. A stated price needs a currency. A collection has none. | |
| valid_from | No | The first day a dated price row holds, YYYY-MM-DD. Only for a row under a parent product. | |
| description | No | A short description, at most 1000 characters. | |
| supply_type | Yes | What the product is: good, service, plan or collection. Ask the user when it is not clear. | |
| availability | Yes | Whether the product can be had: in_stock, out_of_stock, preorder or discontinued. Ask the user when it is not clear. It is the value stored when the product is created; a product with stock records shows the availability its stock decides. | |
| workspace_id | No | Target workspace. Omit when the token authorizes one workspace. Required when it authorizes several — a write lands in exactly one workspace and this call would not say which. | |
| stock_tracked | No | Whether the stock decides the availability shown. Default true. Pass false for a service or a product made to order: its own availability then stands. | |
| conversation_id | No | The conversation id returned by the previous Well result, in its meta under well/conversation_id, in its structuredContent, or in its JSON text block. Pass it back on every call in the same conversation, including a call a card makes, so the chosen workspace and the earlier answers still apply. It decides the conversation on its own: nothing the host states about the session replaces it. Omit it only on the first call of a conversation. | |
| idempotency_key | No | Optional client-supplied key. A retried write with the same key returns the original result instead of re-applying the operation. | |
| workspace_scope | No | Restrict this call to the family: the token's primary workspace plus the company workspaces under it that you are a member of. Unrelated authorized workspaces drop out of the read; row reads merge across the family, while a per-workspace figure still reports exactly one workspace. | |
| scope_company_id | No | The company a dated price row applies to. Needs parent_product_id and valid_from. | |
| scope_project_id | No | The project a dated price row applies to. Needs parent_product_id and valid_from. | |
| parent_product_id | No | The product this one nests under (a variant, a collection member, or a dated price row). | |
| vendor_company_id | No | The company that supplies the product. | |
| product_type_project_id | No | The project that stands for the product's type. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | ||
| error | No | ||
| product | No | ||
| success | Yes | ||
| reply_lines | No | ||
| conversation_id | No | The conversation this result belongs to. Pass it back as the conversation_id argument on every later Well call in the same conversation. | |
| near_candidates | No | ||
| newly_connected | No | Tools that connected to this workspace since the last result and that no session was told about yet, oldest first. Present only when at least one tool is new. The connected-line rule says when to tell an entry; when it does, one line per entry, in the person's language: "<name> is connected.". Never fold several entries into one sentence. Each entry comes back once, on one result only: never repeat its line later. | |
| conversation_id_note | No | Present only when the server opened a fresh lane, stating that no choice recorded earlier was read. | |
| conversation_id_source | No | Where the conversation id came from: the host's own request meta, the caller's argument, or a fresh lane the server opened. | |
| near_candidates_truncated | No |