Wait for a process
well_wait_for_processWaits up to 5 seconds for one background process of the workspace and returns where it stands. Before each call, announce it with the sentence for its kind, and nothing else, unless the skill says to make that call with no announce sentence:
bank_sync: "Retrieving transactions from your bank…"
transaction_categories: "Categorizing transactions from your counterparties…"
invoice_matching: "Retrieving invoices and matching with transactions…"
reconciliation: "Matching invoices with your bank transactions…"
statement_import: "Reading your statements…" (pass document_ids)
demo_seed: "Preparing your sample data…" (a demo workspace only; any other workspace answers done at once) Pass call: 1 on the first call of a turn and 1 more on each next call; keep every other argument the same. status "still_running": call again now, at most 60 calls in one turn, then end the turn on the last headline (invoice_matching: after the last of them, go on to the close instead of ending the turn; reconciliation: after the last of them, go on to the next step of the flow instead of ending the turn). A next_step that says to stop ends the loop at once, even on still_running. status "done": quote the headline in one line and continue. status "needs_account" (statement_import only): a statement waits for its bank account, and none of its transactions are in Well yet. Say it waits for its bank account, never that it was imported, landed or promoted, and follow next_step. status "failed": stop the loop and take the failure branch the headline names. When the token authorizes one workspace, call this directly — no workspace call is needed first. When it authorizes several, this read will not guess which one you mean: pass
workspace_idon the call.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| call | No | Which call of this turn this is: 1 on the first call of a turn, then 1 more on each next call. On call 60, next_step says to stop. | |
| kind | Yes | The background process to wait for. | |
| periods | No | The months the flow waits on, at most 6. Name each period ONE way: { calendar_year, calendar_month } or { fiscal_year, fiscal_period }, never both. Required for transaction_categories and invoice_matching. Optional for bank_sync: omit it before the months are chosen. Not taken by reconciliation or demo_seed: they read the whole workspace on their own, and a call that passes periods is refused. | |
| timeout_s | No | Default 5, clamped to 5-60. | |
| document_ids | No | statement_import only: every document_id well_claim_statement_draft or well_upload_statement_bytes returned for the statements being imported. | |
| workspace_id | No | Target workspace. Omit when the token authorizes one workspace. Required when it authorizes several: this read reports one workspace's own figures and will not choose which. | |
| expected_rows | No | invoice_matching only: how many picked gap rows the enqueue covered. | |
| snapshot_only | No | Return the current state at once, without waiting. | |
| 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. | |
| 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. | |
| counterparty_ids | No | invoice_matching only: the company_id of every row of well_enqueue_invoice_fetch's enqueued list. Each one comes back in invoice_matching.vendors with the state of its collection. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | No | ||
| error | No | ||
| status | No | ||
| success | Yes | ||
| headline | No | ||
| bank_sync | No | ||
| elapsed_s | No | ||
| next_step | No | ||
| already_done | No | The first read was already terminal: no waiting happened. | |
| reconciliation | 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. | |
| 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. | |
| invoice_matching | No | ||
| statement_import | No | ||
| resolved_workspace | No | The workspace that answered, when the caller named none and the token authorizes several. | |
| 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. | |
| transaction_categories | No |