> ## 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.

# Caseworker Portal

> Create verification orders and send links to clients from your caseworker system using the EmployeePortal demo

Create verification orders from your caseworker system and send clients a link to complete verification on their own device. Truv delivers the link via email or SMS, tracks completion, and returns verified data through webhooks. For clients who apply by phone or in person, see [Offline & Contact Center](/government/integration/offline-contact-center).

<Info>
  **Integration pattern:** [Hosted Orders](/developers/integration/hosted-orders/new-user) | **Products:** VOIE, VOE, VOA | **Demo:** [Case Worker Portal](/developers/demos/public-sector/case-worker-portal)
</Info>

***

## Get started

<Steps>
  <Step title="Run the demo">
    Clone and run the [Case Worker Portal demo](/developers/demos/public-sector/case-worker-portal) to see the full caseworker-to-client flow working locally.

    ```bash theme={null}
    git clone https://github.com/truvhq/demo-apps.git
    cd demo-apps
    npm install && npm start
    ```

    Open `http://localhost:5173`, select **Public Sector > Case Worker Portal**, add a test client with an email address, and send a verification request. The demo tracks order status and displays reports when the client completes Bridge.

    See [full setup instructions](/developers/quickstarts-overview#demo-apps) for ngrok and environment configuration.
  </Step>

  <Step title="Understand the API flow">
    The demo follows this sequence:

    1. **Create an order** — Your server sends client PII (name, email, phone) and selected products to [POST /v1/orders/](/api-reference/orders/orders_create). The response includes `order_id`, `share_url`, and `user_id`.
    2. **Deliver the link** — Truv sends the `share_url` to the client via email and/or SMS automatically. For agency-managed notifications, suppress Truv emails and send the `share_url` through your own messaging system.
    3. **Client completes Bridge** — The client opens the link, searches for their employer, and connects their payroll account on their own device.
    4. **Receive webhooks** — Truv sends an `order-status-updated` [webhook](/api-reference/webhooks) when verification completes. Verify the signature using the `X-Webhook-Sign` header with HMAC-SHA256.
    5. **Retrieve reports** — Fetch the [VOIE report](/api-reference/user-income-and-employment-reports/users_reports) with `POST /v1/users/{user_id}/reports/` or the [assets report](/api-reference/user-asset-verification-reports/assets-report-create) with `POST /v1/users/{user_id}/assets/reports/`.
  </Step>

  <Step title="Review the code">
    Each step maps to a specific file in the demo. Use these as reference when building your integration.

    | Step                 | Demo file                                                                                                      | API reference                                                                     |
    | -------------------- | -------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- |
    | Order creation       | [`server/routes/orders.js`](https://github.com/truvhq/demo-apps/blob/main/server/routes/orders.js)             | [POST /v1/orders/](/api-reference/orders/orders_create)                           |
    | Caseworker dashboard | [`src/demos/EmployeePortal.jsx`](https://github.com/truvhq/demo-apps/blob/main/src/demos/EmployeePortal.jsx)   | [Hosted Orders](/developers/integration/hosted-orders/new-user)                   |
    | Webhook verification | [`server/webhooks.js`](https://github.com/truvhq/demo-apps/blob/main/server/webhooks.js)                       | [Webhooks](/api-reference/webhooks)                                               |
    | Report retrieval     | [`server/routes/user-reports.js`](https://github.com/truvhq/demo-apps/blob/main/server/routes/user-reports.js) | [Income reports](/api-reference/user-income-and-employment-reports/users_reports) |
  </Step>
</Steps>

***

## Public Sector-specific configuration

### Case ID tracking

Use `external_user_id` to link orders to your agency's case identifier. Group all household member orders under the same case ID for unified tracking.

```json theme={null}
{
  "products": ["income"],
  "first_name": "John",
  "last_name": "Doe",
  "email": "john.doe@example.com",
  "phone": "4155554193",
  "external_user_id": "case-12345",
  "template_id": "YOUR_TEMPLATE_ID",
  "locale": "es"
}
```

Pass `template_id` to apply your agency's [customized template](/developers/customization) (branding, messaging, landing page). Pass `locale` to set the client's language — see [threshold languages](/government/overview#threshold-languages) for all supported values.

### Notification delivery

Choose how the client receives the verification link:

| Method             | Configuration                                                                             | Best for                                        |
| ------------------ | ----------------------------------------------------------------------------------------- | ----------------------------------------------- |
| **Truv-managed**   | Include `email` and/or `phone` in the order                                               | Automatic delivery with configurable reminders  |
| **Agency-managed** | Set `suppress_user_notifications: true`, use `share_url` from the response                | All communications must come from state systems |
| **Dashboard**      | Create orders through the [Truv Dashboard](https://dashboard.truv.com) or CSV bulk upload | No code required                                |

<Note>
  For agency-managed notifications, use the `short_share_url` from the order response for SMS and the full `share_url` for email.
</Note>

### Household members

Create a separate order for each household member. Use the same `external_user_id` to group all orders under one case. Truv sends each member their own verification link.

***

## Follow-up tasks

When a client doesn't complete verification after receiving a link, configure [follow-up notifications](/developers/integration/embedded-orders/follow-up) to send automatic reminders.

| Setting                          | Description                                               |
| -------------------------------- | --------------------------------------------------------- |
| `suppress_user_notifications`    | Set to `false` (default) to enable Truv-managed reminders |
| `first_notification_delay_hours` | Hours to wait before the first reminder (default: 0)      |

For caseworker-initiated workflows, the caseworker can also manually resend the link from the Dashboard or trigger a new notification through the API.

***

## Next steps

<CardGroup cols={2}>
  <Card title="Customer Portal" icon="desktop" href="/government/integration/customer-portal">
    Embed verification in the client-facing portal
  </Card>

  <Card title="Offline & Contact Center" icon="headset" href="/government/integration/offline-contact-center">
    Verify clients who apply by phone or in person
  </Card>

  <Card title="Renewals" icon="rotate" href="/government/integration/renewals">
    Re-verify clients at recertification
  </Card>

  <Card title="Document Processing" icon="file-lines" href="/government/products/document-processing">
    Extract income data from uploaded documents
  </Card>

  <Card title="Hosted Orders Guide" icon="envelope" href="/developers/integration/hosted-orders/new-user">
    Full implementation guide for hosted order creation and notification delivery
  </Card>

  <Card title="Sandbox Testing" icon="flask" href="/developers/testing/test-credentials">
    Test with government-specific scenarios
  </Card>
</CardGroup>
