workspaceToken (see Authentication)
and goes to the single GraphQL endpoint:
TaskTaxPrepResult field list, see Tax prep. For the polling
mechanics, see Tasks.
1. Start the run
Start a tax prep run withtriggerTaxPrep. The only required
fields are the client’s clientId and the returnType you want to prepare (it
must match the client’s returnType, see
Clients). The mutation returns a taskId you
poll in the next step.
taskId. You will use it to find the task in the poll step.
2. Poll the task to completion
There is notask(id:) query. Poll the task you just started by listing the
client’s TAX_PREP tasks and reading the entry whose id matches the taskId
returned above. The polling mechanics are documented on
Tasks; the short version:
status is no
longer RUNNING. COMPLETED means the run succeeded and result is now
selectable as TaskTaxPrepResult; FAILED means it did not, and
errorMessage (plus subTasks[].errorMessage) explains which stage failed.
3. Read the completed result
When the task isCOMPLETED, select result with an inline fragment on
TaskTaxPrepResult to read the summary, counts, and review items. Always read
__typename on result and include a ... on TaskUnknownResult fallback: a
TAX_PREP task that fails after the run starts can resolve to
TaskUnknownResult instead of TaskTaxPrepResult, and branching on
__typename keeps your client from throwing on the unexpected member.
4. Use the review items
Two reads cover most needs:- Quick check: read
reviewItemCountfor a single “how much needs attention” number before paging through the items. - Per-item detail: read
reviewItems, each withseverity,category, anddescription.severityis a free-formString!(not an enum), so sort and group it in your client as you see fit.
TaskTaxPrepResult is one member of the TaskResult union. The other tax
members are TaskTaxReviewResult (returned for TAX_REVIEW tasks) and
TaskTaxAdvisorResult (returned for TAX_ADVISOR tasks). See
Tasks, task result for the full union and the
inline-fragment pattern used to select it.