> ## Documentation Index
> Fetch the complete documentation index at: https://docs.truv.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Task Lifecycle

> How tasks progress through the flow: statuses, errors, and processing timelines

When a user authenticates through [Truv Bridge](/developers/integration/bridge-widget/overview), the system creates a **Link**, a persistent connection to their payroll provider or bank. Each Link has a unique `access_token` that enables all subsequent data retrieval and modifications.

**Tasks** are the individual actions performed through Links (e.g., fetching income data, switching direct deposits). Each task progresses through a defined status lifecycle.

***

## Task status flow

Every task authenticates through the Link first, then follows one of two paths depending on its type. A task may skip `mfa` when the provider doesn't require multi-factor authentication.

### Standard tasks

A standard task collects data from the connected account:

```
new → login → mfa → parse → full_parse → done
```

```mermaid theme={null}
flowchart TD
    N[new] --> LG[login]
    LG -->|login_error| E[error]
    LG --> MFA[mfa]
    LG -->|no MFA required| P[parse]
    MFA -->|mfa_error| E
    MFA --> P
    P -->|error| E
    P --> FP[full_parse]
    FP --> D[done]

    classDef active fill:#2C64E3,stroke:#1E4BB8,color:#FFFFFF
    classDef error fill:#DC2626,stroke:#B91C1C,color:#FFFFFF
    class N,LG,MFA,P,FP,D active
    class E error
```

### DDS tasks

A Direct Deposit Switch task replaces `parse` and `full_parse` with `switch_deposit`:

```
new → login → mfa → switch_deposit → done
```

```mermaid theme={null}
flowchart TD
    N[new] --> LG[login]
    LG -->|login_error| E[error]
    LG --> MFA[mfa]
    LG -->|no MFA required| SD[switch_deposit]
    MFA -->|mfa_error| E
    MFA --> SD
    SD -->|error| E
    SD --> D[done]

    classDef active fill:#2C64E3,stroke:#1E4BB8,color:#FFFFFF
    classDef error fill:#DC2626,stroke:#B91C1C,color:#FFFFFF
    class N,LG,MFA,SD,D active
    class E error
```

***

## Status definitions

| Status              | Description                                                                                   |
| ------------------- | --------------------------------------------------------------------------------------------- |
| **new**             | Task initiated, queued for processing                                                         |
| **login**           | Attempting to log into the payroll provider or bank                                           |
| **mfa**             | Completing multi-factor authentication                                                        |
| **parse**           | Collecting identity, employment, and paystub data                                             |
| **full\_parse**     | Initial parse complete; downloading and parsing paystubs, W-2s, and additional income sources |
| **switch\_deposit** | Processing direct deposit allocation changes (DDS tasks only)                                 |
| **done**            | Task completed successfully                                                                   |

***

## Error states

Tasks may enter an error state at any point in the lifecycle:

| Error status          | Description                                                                                                   | Recommended action                                                                                                                                |
| --------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| **login\_error**      | Authentication failed: incorrect credentials                                                                  | Prompt the user to re-authenticate via [Bridge Update Mode](/developers/integration/bridge-widget/returning-user)                                 |
| **mfa\_error**        | Multi-factor authentication was not completed                                                                 | Prompt the user to retry, or offer document upload as fallback                                                                                    |
| **config\_error**     | Provider integration or configuration issue. Also raised when uploaded documents fail fraud/tampering checks. | Fetch the task record for the specific `error_message`. For document tampering, see [Fraud & Manual Review](/developers/fraud-and-manual-review). |
| **account\_locked**   | The payroll or bank account is locked                                                                         | Ask the user to unlock their account directly with the provider before retrying                                                                   |
| **unable\_to\_reset** | Failed to reset credentials at the provider                                                                   | Route the user to manual verification                                                                                                             |
| **no\_data**          | Provider connected successfully but returned no data                                                          | Offer document upload as fallback. Do not treat as verified \$0 income.                                                                           |
| **unavailable**       | Provider service is temporarily inaccessible                                                                  | Retry later or route to document upload. Not user-fixable.                                                                                        |
| **not\_supported**    | Provider or HRIS system is not supported                                                                      | Inform the user and offer document upload                                                                                                         |
| **error**             | Generic connection failure                                                                                    | Log the `task_id` and contact support if the error persists                                                                                       |

<Tip>
  Subscribe to [`task-status-updated` webhooks](/api-reference/webhooks) to receive error states in real time. See [Task Webhook Events](/api-reference/tasks/events) for the full list of task events.
</Tip>

***

## Data processing

See [Data Processing](/api-reference/data-processing) for stage timing, median durations, data availability at each stage, and typical processing times.

***

## Relationship to Orders

[Orders](/api-reference/orders/object) are the top-level containers for verification requests. When a user completes an Order:

1. The user authenticates through Bridge, creating a **Link**
2. A **Task** is created on that Link to retrieve the requested data
3. The Task progresses through the status lifecycle
4. On completion, data is available via the API and the order status updates

A single Order can have multiple connections (e.g., a borrower connecting two employers), each with their own Link and Tasks.

***

## Monitor tasks

### Dashboard

View task details in the Dashboard under **Activity > Tasks**. Filter by status, date, and provider.

### API

Retrieve task status programmatically:

```bash theme={null}
curl -X GET "https://prod.truv.com/v1/tasks/?query={link_id}" \
  -H "X-Access-Client-Id: your_client_id" \
  -H "X-Access-Secret: your_secret"
```

### Webhooks

Subscribe to task events for real-time monitoring:

* `task-status-updated` with `status: done`: task finished successfully
* `task-status-updated` with an error status: task encountered an error
