createClient and
addClientDocuments return a
taskId; you use the tasks API to follow that work to completion.
Tasks are reached through the me query as a WorkspaceUser, so
authenticate with a workspaceToken (see
Authentication). All requests go to:
The Task type
The task’s unique identifier. This is the value returned as
taskId by the
mutations that start work.What kind of work this is:
BINDER, TAX_PREP, TAX_REVIEW, TAX_ADVISOR, or
CHAT.RUNNING, COMPLETED, or FAILED. Poll this to know when work finishes.ISO 8601 timestamp of when the task started.
ISO 8601 timestamp of when the task finished.
null while RUNNING.A human-readable error message when
status is FAILED. null otherwise.Arbitrary
name/value metadata pairs describing the task.The individual stages of the task, each with its own status. Use these for
granular progress while a task is
RUNNING.The typed result of the task, resolved by
type. See Task
result.The client this task belongs to (
id, name), when applicable.The user who started the task (
id, name, email).Supporting types
The stage, for example
CONVERT_DOCUMENTS, CLASSIFY_SUBDOCS,
EXTRACT_SUBDOCS, or EXPORT_AND_INDEX. The full set of stages depends on the
parent task’s type.A machine-readable code when a data-entry stage fails, for example
INVALID_CREDENTIALS, CLIENT_NOT_FOUND, or TIMEOUT. null otherwise.List tasks
Readworkspace.tasks to list tasks across the whole workspace. Filter, page,
and sort with the arguments below.
Arguments
Return only tasks of this type.
Return only tasks in this status (
RUNNING, COMPLETED, FAILED).Return only tasks started by this user.
Free-text search over task metadata.
Sort order, for example
{ "field": "startedAt", "order": "DESC" }.Maximum number of tasks to return.
Number of tasks to skip, for pagination.
Check a single task’s status
There is notask(id:) query. To follow one task (for example the taskId
returned by createClient or addClientDocuments), list the tasks for its
client with client.tasks and read the entry whose id matches. Because a
client’s task list is small and typed, this is the reliable way to poll a
specific task.
Client.tasks accepts these arguments:
Narrow to one task type, for example
BINDER to watch document ingestion.Cap the number of tasks returned (for example
1 for the most recent).Task result
Every task carries a typedresult. TaskResult is a union whose concrete type
is determined by the task’s type. Select fields with an inline fragment on the
member you expect, and read __typename to know which one you got.
The fallback result, including for
BINDER and CHAT tasks.Returned for
TAX_PREP tasks: a summary plus document/form counts and the
individual review items.Returned for
TAX_REVIEW tasks: a summary plus issue breakdowns by severity and
by form.Returned for
TAX_ADVISOR tasks: a summary plus strategy counts. The by*
fields are JSON maps.taxYear, returnType, and summary, you can select
those on each fragment and branch on __typename: