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

# Use agent assist with Talkdesk

> Install Voiceflow agent assist for Talkdesk. Load approved case context, choose a staff task and review suggestions in the Workspace Designer iframe card.

## Overview

Generate the staff panel for a Talkdesk Conversations Canvas. Every task uses a backend-authorized snapshot; record-aware launch is available when the card flow already has a verified case key.

Your team hosts the staff interface and case-access checks; Voiceflow runs the published read-only assistant. Tasks run only on a staff action. Automatic selection loads a snapshot, not a live transcript or a customer-send action.

| Capability | Supplied behavior |
| --- | --- |
| Staff surface | Workspace Designer iframe card |
| Case selection | Manual ID and Load case context; optional verified launch only where described. |
| Tasks | Find policy, Draft reply, Suggest next step, Summarize and a question form. |
| Draft delivery | Copy completed suggestions for human review. |

<a id="requirements"></a>

## Prepare the staff deployment

Collect the assistant, verified identity and platform configuration once.

| Requirement | Owner and handoff |
| --- | --- |
| Published staff assistant | Voiceflow owner supplies approved Knowledge, project ID, Published test Environment alias and server API credential. Keep tools read-only. |
| Staff host | Application owner supplies Node.js 22+, HTTPS, verified staff/tenant sign-in, CSRF, body/rate limits and bounded provider reads. |
| Case access | Case-service owner approves the fields, checks staff/record access on every request and supplies the exact provider-to-case mapping. |
| Pilot platform | Administrator supplies the named app/launcher surface, test staff with allowed/denied records and the actual sandbox record IDs. |

Download the [starter bundle](/docs/examples/support-platforms-starter.zip). Keep `support-platforms`, `contact-center-assist` and `amazon-connect` as sibling directories. [Shared agent-assist setup](/docs/guides/integrations/contact-centers/agent-assist) owns the host/session contracts; [build the staff assistant](/docs/guides/agent-assist) before installing the platform entry.

<a id="installation"></a>

## Install the staff entry

Generate the platform files, connect authorized data and activate the pilot surface.

### 1. Build the platform files

From the extracted archive root, use your HTTPS staff origin without a path:

```bash title="Build the Talkdesk staff app"
npm install --prefix support-platforms
node support-platforms/setup.mjs talkdesk https://staff.example
```

Serve the generated `panel.html`, `panel.css` and `panel.bundle.mjs` together at `https://staff.example/support-platforms/talkdesk/panel.html`. The command also writes `SETUP.md` and the applicable platform artifacts. Keep credentials on the server. It refuses an existing output directory; append a new directory after the origin when rebuilding. Configure no-store, approved iframe ancestors and embedded SSO.

### 2. Connect the authorized case reader

Use the existing authenticated host with [routes.mjs](/docs/examples/support-platforms/routes.mjs):

```js title="Mount both authorized staff routes"
import {createStaffRoutes} from './support-platforms/routes.mjs';
import {requireStaff,verifyCsrf,loadCaseForStaff} from './staff-adapters.mjs';
export const handleAssistRequest=createStaffRoutes({
  projectID:process.env.VF_PROJECT_ID,
  environmentAlias:process.env.VF_ENVIRONMENT_ALIAS,
  apiKey:process.env.VF_API_KEY,
  requireStaff,verifyCsrf,loadCaseForStaff,
});
```

`loadCaseForStaff(staff, id, {signal})` verifies the tenant, provider interaction/case mapping and permitted fields, then returns `{id, context: approvedText}` or `null`. It must not accept browser-posted context as evidence.

Mount the handler at **both** same-origin POST paths, `/api/agent-assist` and `/api/agent-assist/context`. Apply the host’s CSRF policy to both, a 32 KiB body limit, staff rate/concurrency limits and bounded identity/provider reads. Honor the supplied cancellation signal. The context route starts no Voiceflow session; every later task reauthorizes and reloads the record.

### 3. Activate the platform surface

In **Workspace Designer → Cards → Create card**, connect **Card Trigger → Render Iframe** and set its source to the generated panel URL. Allow only the scripts, forms and same-origin behavior needed by the host. Save/publish the card automation.

Place the card in a Panel, add that Panel to the intended Conversations Canvas, publish/install the Canvas and assign the pilot agents. A published card alone does not make it appear in Conversations. Open the Canvas tab and complete staff sign-in.

A fixed Render Iframe source does not expose current interaction events: enter the case ID and choose **Load case context**. Render Iframe also accepts a **source variable**. If your card flow already supplies a verified opaque CRM case key, use the optional launch build below and construct its full URL with `#case=<encoded ID>` in that variable. Select it as source and prove it changes for the intended interaction. No undocumented global `interaction_id` variable is assumed.

### 4. Load context and choose a task

Enter the current authorized case ID and choose **Load case context**. Wait for **Case context ready** and inspect **Approved case context**. Denial keeps tasks disabled. Opening a record or loading context does not ask the model.

Choose **Find policy**, **Draft reply**, **Suggest next step** or **Summarize**. The question box is optional for these four actions; use it to focus the result. **Ask assistant** requires a question. Configure the assistant to return customer wording only for Draft reply and staff evidence/missing facts for the other tasks. Review model output before using it.

### Use an already verified record-aware launch

Enable this only when the existing platform flow supplies a stable opaque case key.

After the administrator proves the exact field/variable and server mapping, build with an options file containing `{"launchSelection":true}`:

```bash title="Build the optional pinned launch"
node support-platforms/setup.mjs talkdesk https://staff.example ./assist-build/talkdesk-launch ./staff-ui.json
```

Configure the source/link as the generated URL plus `#case=<URL-encoded verified ID>`. Opening it loads authorized context automatically; an unresolved variable leaves tasks disabled. The external/iframe launch remains pinned to that ID, with no undocumented background event feed.

<a id="case-context"></a>

## Configure case context

Treat workspace IDs as selection hints and keep approved data on the server.

The default build checks a manually selected case and disables tasks after an ID edit. The optional source-variable launch selects its record on URL load/hash change; it is not a Talkdesk event SDK or a live transcript listener. Your server still checks the staff account and case mapping. Clear/finish the old case and test actual card/Canvas recreation when interactions change.

| Data boundary | Contract |
| --- | --- |
| Approved snapshot | Your existing authorized CRM/case loader supplies approved fields. Publishing a card does not grant access to an interaction or case. |
| Staff identity | Verified host session and tenant mapping; browser agent objects are not authentication. |
| Question and result | Render text safely; treat case text as reference data, not permission to run actions. |
| History | Fresh runtime conversation per task; no automatic case memory or full-history guarantee. |

Use **Copy suggestion** only after the complete result arrives, then review/edit it in the normal support workspace. This supplied surface has no verified draft-composer insertion action. A provider endpoint that sends a message or saves a note is not used as a substitute.

The host must reset/unload on logout and account changes. Browser abort stops consumption; it does not prove remote execution stopped or transcripts were deleted. Set expiry and retention with the owning teams. A snapshot above the starter’s 16,000-code-unit limit is rejected; narrow the approved fields instead of silently dropping conversation coverage.

<a id="testing"></a>

## Test the staff workflow

Check tasks, record changes, denial and the exact human delivery action.

### 1. Check the selected record and all four tasks

Use a sandbox case with an unopened item delivered 12 days ago and an approved 30-day policy. Confirm the visible record ID and approved snapshot. Run every task with an empty question, then add a focus. Verify policy conditions, missing facts and source references. Summaries must state gaps when the snapshot is metadata or a limited excerpt rather than a complete interaction.

### 2. Prove record isolation and access denial

Launch a second record and confirm its ID/context replace the first in that new launch. Existing companion tabs remain pinned to their original record; finish/close them deliberately. For manual selection, edit the ID mid-response and prove tasks stay disabled until the next context load succeeds. Use a second staff account for a denied record: no snapshot/answer may appear and no model request may start. Test logout, account switch and session expiry.

### 3. Review delivery and recover from failure

Copy one completed suggestion and review it in the normal composer. No provider send, saved note, refund or call-control request may occur. Verify a partial stream never enables Copy suggestion. Interrupt the stream and deny the provider read; the prior/partial result must clear. Restore the service and retry manually while keeping the normal support workspace usable.

### The entry or context does not load

Check platform assignment, direct origins and staff/provider access.

Verify the generated URL/artifacts, platform assignment and embedded sign-in. For parent messaging, verify both the direct source window and configured HTTPS origin; never use a wildcard. A 401 requires sign-in; 403 requires CSRF/tenant/record checks; 413 needs a narrower approved snapshot. Inspect redacted server diagnostics for provider/runtime failure. Reopen/reload after recovery without exposing the staff service publicly.

### The result belongs to an old record

Check whether this surface follows selection or opens a pinned companion.

Compare the visible ID with the workspace. For a pinned launch, open a new launcher for the current record; a separate tab cannot follow the original workspace. For SDK/property binding, repeat the switch during the pending response and check the direct parent/SDK events and generation guard. Do not rely on a network abort alone. Discard an uncertain result before continuing.

<a id="release-and-maintenance"></a>

## Release and maintain assistance

Record the accepted app, permissions and rollback before expanding access.

### 1. Release to the pilot staff

Record the staff-host build, provider field allowlist/mapping, platform configuration and Voiceflow Environment/release. Repeat allowed/denied cases through the actual installed entry with a fresh staff session. Assign owners for policy freshness, identity/token lifecycle, SDK/app updates and incidents; rerun [quality evaluation](/docs/guides/channels/agent-assist/evaluate-assistance) after changes.

### 2. Restore the reviewed deployment

Restore the saved Canvas/Panel configuration or remove the assistant card from the pilot Panel and publish. Restore the recorded staff-host build and reviewed Voiceflow release, then repeat a fresh-session check.

Local review uses the starter’s labelled fictional fixtures; no SDK fixture or successful bundle proves provider installation, SSO, account permissions or real-model quality. Complete sandbox acceptance for this exact surface before release. For business-system tools, [Import help articles](/docs/guides/integrations/contact-centers) and Human agent hand-off, keep the canonical Integration manuals.
