Switch workspace
well_switch_workspaceWrite this conversation's context: the one place its standing choices live. This is the tool the widget cards call when the user CLICKS them: the workspace pin and queue, the selected months, the selected counterparties, and the step acknowledgements are all recorded here, and every later tool call defaults to them.
Pass any of:
workspace_ids (ordered list): the workspaces to work in. The FIRST entry becomes the pin and the rest the workspace_queue to work through next. Every id must be one this connection is already authorized for — call well_list_workspaces to see them. This grants no new access; it only chooses among the authorized workspaces.
periods: the months the user VALIDATED on the period card ({ calendar_year, calendar_month } each). Period-scoped reads (well_list_missing_invoices, well_preview_invoice_fetch) default to them when called without a period. Send it only for the user's month selection — never to bound a counterparty pick, which would overwrite that selection.
counterparties: the counterparties (vendors) the user selected, each { company_id, matched_connector_service_id }. Copy both ids off the row you listed them from; pass no display name. The selection belongs to the workspace this call is dispatched to, and a switch to another workspace clears it. One conversation holds one selection, so a new one replaces it; a selection sent for a workspace this conversation has switched away from is REFUSED instead, so a card the flow moved past cannot overwrite the pinned workspace's selection.
counterparty_periods: the months the counterparties card listed, sent alongside counterparties. The pick then narrows those months only, and a month it never covered is read in full. With none named, the months this conversation already holds bound the pick. This never becomes the conversation's selected months.
exempt_categories: the category keys the user marked as NOT burn on the exemption card, copied off what well_list_burn_exemptions returned. An EMPTY list is a real answer and records that they exempted nothing; omit the field entirely when they have not answered yet. The set belongs to the workspace this call is dispatched to, and a switch to another workspace clears it, but a change of months does not, because a category is or is not burn for the business whatever window is read next. One conversation holds one set, so a new one replaces it.
recurring_contexts: the billing context keys the user counts as recurring revenue on the recurring-contexts card, copied off what well_list_recurring_contexts returned. An EMPTY list is a real answer and records that they count nothing as recurring. It is scoped, cleared and replaced exactly like exempt_categories.
counted_account_types: the account types the user ticked as cash on the cash-scope card, copied off what well_list_cash_scope returned. An EMPTY list is a real answer and records that they count nothing as cash, which ends the run rather than reporting a zero total. It is scoped, cleared and replaced exactly like exempt_categories.
ack: "connectors", "bank", "categorize", "assign", "deploy", "invite" or "company_pick": records that the user answered that flow step, in the workspace this call is dispatched to. "company_pick" is the company candidates card's own ack: the card sends it on its Use click alongside the pin to the new company workspace, and on its Keep for later without moving the pin, so you do not send it yourself. "categorize", "deploy", "retarget", "company_pick" and "invite" also take ack_outcome: "done" when the user carried the step out, "keep_for_later" when they set it aside; both end the step. A switch to another workspace clears it, so the next workspace's card asks for its own click. An acknowledgement sent for a workspace this conversation has switched away from is REFUSED instead, so a card the flow moved past cannot un-confirm the step the pinned workspace's own card recorded.
next_step: the line the user picked on the next-steps card, as { skill, prompt } copied off that card's row. The prompt is the sentence the model reads as the user's own message, so it travels beside the slug rather than being rebuilt from it. The pick belongs to the workspace this call is dispatched to, and a switch to another workspace clears it.
Call it with NO argument at all to pin the workspace this call itself is dispatched to: its universal workspace_id, or the only workspace the token covers. workspace_ids is the PIN write and nothing else: it moves the pin AND replaces the workspace_queue, so a one-entry list ends a run that still had workspaces queued. Send it only to change the workspace. A call carrying periods, counterparties, exempt_categories, recurring_contexts, counted_account_types, ack or next_step needs no workspace_ids: its universal workspace_id targets that one call, and the pin and the queue stay where they are. Never re-pin the workspace this conversation already holds.
Every provided input is applied, and changed names the conversation fields this call wrote. pickup says what became of the write: "resumed" or "held_then_resumed" mean the model's own turn carries it on and the caller must send no reply of its own, "unwaited" or "exhausted" mean nothing is watching and the caller's reply is the only thing that moves the flow, and "stale" means the flow already answered this card, so the value is kept as a late edit and the caller says nothing. resumed is the boolean half of the first two. After a switch, every later call that omits workspace_id targets the pinned workspace, for reads and writes alike; passing workspace_id on a later call overrides it for that call only. well_list_workspaces reports the current conversation context, and well_wait_for_selection reads a card click back, instantly when it already landed here and after a short wait otherwise.
This changes nothing in the user's data.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ack | No | Acknowledge a flow step: "connectors" for the connect-tools step, "bank" for the bank step, "categorize" for the counterparty-categorization step, "assign" for the assign-owners step, "deploy" for the collect-agents step, "retarget" for the connector-retarget (data-migration) card, "company_pick" for the company-candidates card, "invite" for the invite-members card. "retarget" is the retarget card's own ack: the card sends it on its Confirm with ack_outcome "done", or on its Keep for later with "keep_for_later", so you do not send it yourself. The acknowledgement is scoped to the workspace this call is dispatched to, and a switch to another workspace clears it. An acknowledgement sent for a workspace this conversation has switched away from is refused, and the pinned workspace's own acknowledgement of that step stands. | |
| periods | No | The months the user VALIDATED on the period card, stored as this conversation's selected_periods. Later period-scoped reads default to them when called without a period. This field is the user's month selection alone: to bound a counterparty pick, send counterparty_periods instead. | |
| next_step | No | The next step the user picked on the well_propose_next_steps card, as the pair that card listed: the skill's slug and the sentence beside it. Both travel, because the sentence is what the model reads as the user's own message and the slug is what it loads. The pick is scoped to the workspace this call is dispatched to, and a switch to another workspace clears it. | |
| ack_outcome | No | What the click said about the step: "done" when the user carried it out, "keep_for_later" when they set it aside on purpose. REQUIRED with ack "categorize" and "deploy" and "retarget" and "company_pick" and "invite", whose cards end on two buttons that mean different things, and refused with every other step, whose card confirms and nothing else. | |
| 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. | |
| workspace_ids | No | Ordered workspace selection, and the ONLY field that moves the pin: the FIRST entry becomes this conversation's pin, and the rest REPLACE the workspace_queue, so a one-entry list empties a queue that still holds workspaces. Every entry must be authorized for this connection, or the whole call is refused. Never send it to name the workspace of a periods, counterparties or ack call: the universal workspace_id already targets those, while a re-pin to the id this conversation already holds writes nothing and clears the queue. | |
| counterparties | No | The counterparties the user selected, stored as this conversation's selected_counterparties and scoped to the workspace this call is dispatched to. At most 200, and a longer list is refused, so a select-all keeps to that bound. Copy the ids off the row: company_id, plus matched_connector_service_id when the row carries one. Send the card's months as counterparty_periods in the same call, so the pick applies to those months only; with none named, the months this conversation already holds bound it. The conversation holds ONE selection, so this REPLACES the previous one, but only when the call names the pinned workspace: a selection sent for a workspace this conversation has switched away from is refused, and the pinned workspace's selection 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. | |
| exempt_categories | No | The categories the user marked as NOT burn, stored as this conversation's selected_exemptions and scoped to the workspace this call is dispatched to. Copy each category_key off the row well_list_burn_exemptions returned; never send a label. An EMPTY list is a real answer, since it records that the user exempted nothing, so send it when they clicked Continue with nothing ticked, and omit the field entirely when they have not answered. At most 100, the same bound well_sum_transactions accepts, so a recorded answer is always one the sum can run. The conversation holds ONE set, so this REPLACES the previous one; unlike a counterparty pick it survives a change of months, because a category is or is not burn for the business whatever window is read next. | |
| recurring_contexts | No | The billing contexts the user counts as recurring revenue, stored as this conversation's selected_recurring_contexts and scoped to the workspace this call is dispatched to. Copy each context_key off the row well_list_recurring_contexts returned; never send a label. An EMPTY list is a real answer, since it records that the user counts nothing as recurring, so send it when they clicked Continue with nothing ticked, and omit the field entirely when they have not answered. At most 100, the same bound well_render_mrr accepts. The conversation holds ONE set, so this REPLACES the previous one, and like the exemptions it survives a change of months. | |
| counterparty_periods | No | The months the counterparties card listed, which bound the pick sent as counterparties in the same call. Send it only with counterparties; it never becomes this conversation's selected months, so it cannot overwrite what the user validated on the period card. With none named, the months this conversation already holds bound the pick. | |
| counted_account_types | No | The account types the user ticked as cash, stored as this conversation's selected_cash_scope and scoped to the workspace this call is dispatched to. Copy each account_type off the group well_list_cash_scope returned; never send a label. An EMPTY list is a real answer, since it records that the user counts nothing as cash, which ends the run rather than reporting a zero, so send it when they clicked Continue with nothing ticked, and omit the field entirely when they have not answered. The conversation holds ONE set, so this REPLACES the previous one, and like the exemptions it survives a change of months: a credit card is or is not cash for the business whatever window is read next. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | ||
| pickup | Yes | What became of this write: "resumed" (a model wait took it), "held_then_resumed" (no wait yet, so the call was held until one consumed it), "unwaited" (nothing ever consumed it), "exhausted" (the model gave up on the card and ended the turn), "stale" (the flow already answered this card and moved past it — the value is recorded as a late edit). A card prefills a reply on "unwaited" and "exhausted" only. | |
| changed | No | Which fields of this conversation's context this call wrote. | |
| resumed | Yes | True when the model's own turn carries this write on — the derived half of `pickup` ("resumed" or "held_then_resumed"). A card that reads true must not prefill a reply; the conversation continues on its own. | |
| success | Yes | ||
| warning | No | Present when this call opened a fresh lane because no conversation_id reached it: the write landed, and only a later call that passes the echoed conversation_id back can read it. | |
| acknowledged | No | ||
| workspace_id | No | ||
| workspace_name | 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. | |
| workspace_queue | No | The workspaces queued after the pinned one, in order. | |
| selected_periods | No | ||
| selected_next_step | No | The next step this call recorded, echoed back as the card sent it. | |
| selected_cash_scope | No | ||
| selected_exemptions | No | ||
| acknowledged_outcome | No | The answer the acknowledging click carried, echoed back on a step whose card offers two. | |
| 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. | |
| selected_counterparties | No | ||
| selected_recurring_contexts | No |