Create workspace invoice design
well_create_workspace_invoice_designMake a built invoice template the workspace's own invoice design, after the user kept it.
Call well_get_workspace_invoice_design_offer first, with the same document_id, and show the user what it returns: the legal mentions text, whether a logo was cut from the invoice, and the company that issued the invoice, named in words. When that company is not the workspace's own, say so. Call this tool only after the user saw the template beside the invoice it was built from, saw that list, and said to keep it. Ask the user, for each of the two, whether to keep it or remove it, and pass the answer: keep_logo and keep_legal_mentions are required and have no default. Never pass true for a logo or a text the user did not keep. Pass the issuer_relation and the offer_token that the read returned: a keep made on a different reading or a different offer is refused.
Pass the template's document_id. The keep approves the template, so from then on every new invoice drafted in this workspace opens on this design and prints with it, except for a customer that keeps a design of its own; the result names those customers so you can offer to switch them. One draft can still take another design, and an issued invoice never changes. Keeping again replaces the workspace's design with the new one. Only a workspace owner or admin can keep a design.
A kept legal mentions text is saved as a note of the workspace, unless the template prints none of it: then no note is saved and legal_mentions_note_id is null, so tell the user the mentions were not kept. A removed logo or text is left out of every invoice printed with the design. When the template still prints the removed mentions in a form that cannot be found line by line, the keep is refused: ask for a revision that removes them (well_create_invoice_template_revision), then keep that revision.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| keep_logo | Yes | True only when the user kept the logo cut from the invoice. | |
| document_id | Yes | The built template the user kept. | |
| offer_token | Yes | The offer_token well_get_workspace_invoice_design_offer returned for this template. | |
| 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. | |
| 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. | |
| issuer_relation | Yes | The issuer_relation the user was shown, as well_get_workspace_invoice_design_offer returned it. | |
| 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. | |
| keep_legal_mentions | Yes | True only when the user kept the legal mentions printed on the invoice. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | ||
| success | Yes | ||
| design_id | No | The workspace's design row this keep wrote. | |
| logo_kept | No | Whether the design prints the logo cut from the invoice. | |
| issuer_name | No | The company that issued the invoice the template was built from. | |
| refusal_reason | No | The WellError code when the write is refused. | |
| 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. | |
| issuer_relation | No | Whether that company is the workspace's own, another company, or unproven. | |
| 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. | |
| replaced_design_id | No | The design this keep replaced, or null for the first. | |
| conversation_id_note | No | Present only when the server opened a fresh lane, stating that no choice recorded earlier was read. | |
| template_document_id | No | ||
| 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. | |
| legal_mentions_note_id | No | The note the kept legal mentions were saved as, or null when none was kept or the template prints none of them. | |
| customers_with_own_design | No | Customers whose drafts keep opening on their own saved design. |