Check an invoice before it goes to the bank
well_verify_invoice_for_qontoCheck whether one invoice that Well issued can go to the workspace's connected Qonto account. It writes nothing and calls nothing in Qonto. Call it after the invoice is issued, before any send to Qonto.
Call well_send_invoice_to_qonto only when outcome is ready: its confirm is the one question to the person. already_imported means the invoice is in Qonto: ask nothing and send nothing. On not_connected and not_open, say nothing about Qonto.
Tell the person the message the result carries. On not_ready, say each reasons message; when a reason is operation_nature_missing, ask once whether the company sells goods, services or both, save the answer as default_operation_nature with well_upsert_accounting_settings, then call again; when that save is refused because the person is not an owner or admin, say that an owner or admin states it, and stop. On invoice_changed, check the invoice again; on ready, call the send again, so its confirm asks again. On needs_reconnect, give reconnect_url once. On connection_choice_needed, ask which Qonto account, then call again with workspace_connector_id. On not_connection_owner, say that only the member who connected Qonto can send to it.
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_id on the call.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| invoice_id | Yes | The Well invoice to send to Qonto. Well must have issued it. | |
| 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. | |
| 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. | |
| workspace_connector_id | No | The Qonto connection to send to, only when several Qonto accounts are connected. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | ||
| message | No | ||
| outcome | No | ||
| reasons | No | ||
| success | Yes | ||
| reconnect_url | No | ||
| invoice_number | 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. | |
| qonto_invoice_id | 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. | |
| workspace_connector_id | No | ||
| workspace_connector_ids | No |