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

# Customer copilots

> Build an onboarding assistant inside CloudDesk, a fictional project-management app. It guides a customer from creating a workspace to inviting a teammate and assigning a…

Build an onboarding assistant inside CloudDesk, a fictional project-management app. It guides a customer from creating a workspace to inviting a teammate and assigning a first task. This version explains the interface; it does not inspect or change the customer’s account.

## Before you begin

- Access to create a Chat project and approved product instructions.
- A staging page in your web application where you can add the generated widget snippet and an embedded container.
- A test customer account. Use documentation that is safe for every user who can reach this assistant; the widget’s client key is not your app’s user-authorization system.

## Build and embed the copilot

### 1. Create the Chat project

Create a **Chat** project named **CloudDesk Guide**, choose **Start from scratch** and keep **Main** selected.

### 2. Import the onboarding guide

Open **Knowledge base → Add data source → Plain text**, paste the practice guide below and click **Import**. Replace these fictional controls with the actual UI in your product before launch.

#### CloudDesk onboarding guide

```text
CloudDesk onboarding guide

Create a workspace: Open Workspaces, choose Create workspace, enter its name and save.

Invite a teammate: Open Workspace settings, choose Members, select Invite member and enter the teammate’s email. Only workspace admins can invite people.

First task: Open Projects, create a project, choose Add task, enter a title and assign the task to a member.

For account-access problems, contact help@clouddesk.example. This guide does not contain billing or administrator-recovery procedures.
```

Wait for processing to finish, then enable **Knowledge base** under **System tools** in **Agent**.

### 3. Set the assistant’s boundaries

In **Global prompt**, enter:

#### Copilot role

```markdown
# Role
Help customers use CloudDesk, a fictional project-management app. Explain onboarding steps from the approved guide.

# Boundaries
Use the approved Knowledge base. Do not invent facts or claim to complete an unavailable action.
```

In **Instructions**, enter:

#### Onboarding instructions

```markdown
Ask what the customer wants to do next. Give one short step at a time from the Knowledge base.

For team onboarding, explain how to create a workspace, invite a teammate and assign a first task. Ask what they have already finished before repeating steps.

You cannot inspect or change an account. Do not claim you created a workspace, sent an invitation or assigned a task. Direct account-access problems to the product’s support team.
```

CloudDesk Guide instructions for progressive onboarding help — Keep the guidance aware of the customer’s reported progress without claiming account access.

For a copilot that reads account data or takes actions, attach [API tools](/docs/documentation/build/tools/api-tool) backed by your application’s authorized server endpoints. A customer-provided account ID or launch variable is context, not proof of authorization. That extension is separate from this documentation-only walkthrough.

### 4. Test a customer who has already started

Click **Run**. Send “I have created a workspace. How do I invite a teammate?” The assistant should move to invitation instructions, name the admin requirement and avoid repeating workspace creation.

CloudDesk Guide explains the next onboarding step and its admin requirement — Test the next useful action for a customer who has already completed the first step.

Continue with “I’m not an admin.” It should state the permission requirement and direct the customer to an admin, not claim that it sent the invitation. Ask a billing question outside the guide and check that it does not invent an answer.

### 5. Choose the embedded interface

Open **Widget → Modality & interface**. Choose **Chat**, then **Embed** under **Chat interface**. Open **Installation** and copy the generated snippet. See [Install widget](/docs/documentation/deploy/widget/embedding-the-chat-widget).

Native Widget Modality & interface with Chat and Embed selected — Choose Chat and Embed under Modality & interface.

### 6. Add the copilot to your app page

On your staging page, add this container where the assistant should appear, before the generated installation script. The 600px height is an illustrative starting size; adapt it to your app layout.

#### Example app container

```html
<div id="customer-copilot" style="width:100%; height:600px; min-height:400px"></div>
```

Native Installation card with the app copilot’s generated snippet — Keep the generated project and authentication settings when adding the snippet to your app.

In the generated snippet’s `window.voiceflow.chat.load(...)` configuration, replace its `render` option with:

#### Embedded render target

```javascript
render: {
  mode: 'embedded',
  target: document.getElementById('customer-copilot')
}
```

Keep the rest of the generated load configuration and [client key](/docs/api-reference/authentication#client-keys). Load the snippet after the container exists. Do not insert a personal or service API key into the browser.

Keep your app’s normal sign-in and access controls around the page. Public onboarding documentation can be shared by all customers; account-specific data requires separately authorized backend access.

### 7. Publish and complete onboarding in the app

Replace the fictional guide with your approved product instructions. Click **Publish**, review Main and confirm the release. Publish the staging app change containing the widget snippet.

Sign in as the test customer, open the page and ask how to invite a teammate. Follow the suggested steps in the real app. Verify that the user can reach the named screen and complete the action themselves.

Test a non-admin account separately. Confirm the guidance preserves that permission boundary. Find both conversations in **Transcripts** to compare the advice with what the users could actually do.

## Verify the result

The assistant is embedded in the intended app page, uses the published onboarding guide and helps a test customer complete a real product action. It distinguishes instructions from actions it has actually performed and does not reveal another customer’s information.

For an application built directly on the conversation interface, use [Build a custom chat app](/docs/guides/channels/custom-apps) instead of the widget installation path.

### The embedded assistant is missing

Check the container, render target and generated installation settings.

Confirm the container exists before the widget loads, its ID matches the render target and it has visible space in the app layout. Check browser errors and that the snippet belongs to the published project. Verify a conversation, not only an empty widget frame.
