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

# Chat support

> Build a website support agent for Northstar Supply, a fictional retailer. It will answer shipping and returns questions from an approved policy and direct questions it…

Build a website support agent for Northstar Supply, a fictional retailer. It will answer shipping and returns questions from an approved policy and direct questions it cannot answer to the support team. You’ll configure it in Agent studio, test its answers, publish it and install the chat widget.

## Before you begin

- Sign in to [Voiceflow](https://creator.voiceflow.com) with permission to create and edit a project.
- Have access to a website or staging page where you can add custom JavaScript. A website administrator can complete the installation step.
- Use the fictional policy below for practice. Before a customer launch, replace it with your approved policies and a real support address. The `.example` email address cannot receive messages.
- Allow for [credit usage](/docs/documentation/account-management/billing/credits-pricing-table) when testing and serving conversations.

## Build and launch the agent

### 1. Create a Chat project

From your workspace’s **Projects** page, click **New project**. Name it **Northstar Support**, choose **Chat**, then click **Start from scratch**.

Open **Agent** in the project sidebar. Keep **Main** selected in the Environment menu for this first launch.

### 2. Add the support policy

Open **Knowledge base** → **Add data source** → **Plain text**. Paste this policy, then click **Import**. Wait for processing to finish before testing the agent.

#### Sample support policy

```text
Northstar Supply support policy

Shipping: Standard delivery takes 3–5 business days after dispatch. We ship within Canada. International shipping is not available.

Returns: Unused items in their original packaging can be returned within 30 days of delivery. Contact support@northstar.example to request a return.

Support: Email support@northstar.example for order-specific questions. This policy does not include order status, warranty coverage or a refund processing time.
```

Import the Northstar Supply support policy as plain text — Import the shipping and returns policy that the agent will use.

The policy should appear in the Knowledge base without a processing or error status. If the import fails, retry it before continuing.

### 3. Define the agent’s role and instructions

Return to **Agent**. In **Global prompt**, replace the starter text with:

#### Global prompt

```markdown
# Role
You are the customer-service assistant for Northstar Supply. Help customers understand shipping and returns.

# Tone
Be friendly, concise and clear. Give the relevant policy first.

# Guardrails
Only answer from the Knowledge base. Never invent a policy, check an order, issue a refund or claim that you transferred the customer.
```

In **Instructions**, enter:

#### Instructions

```markdown
Search the Knowledge base before answering shipping or returns questions.

Explain the relevant policy in a short answer. If the policy does not answer the question, say so and direct the customer to support@northstar.example.

You cannot look up orders or process returns. Explain that the support team must handle those requests.
```

Enable **Knowledge base** under **System tools**. Keep **Web search** disabled so this example uses only the support policy you imported.

Agent instructions and Knowledge base for Northstar Support — Set the agent’s behavior and enable Knowledge base in the same workspace.

This agent answers policy questions. It has no order-lookup, refund or live-handoff integration, so its instructions must not promise those actions.

### 4. Test policy answers and boundaries

Click **Run** at the top right. Send each message below and check the answer against the imported policy:

- **“Can I return an unused item after 20 days?”** — It should explain the 30-day window, original-packaging requirement and support email.
- **“How long does standard delivery take?”** — It should say 3–5 business days **after dispatch**, within Canada.
- **“How long does warranty coverage last?”** — It should say the policy does not contain that information and direct the customer to support. It must not invent a warranty period.
- **“Where is my order?”** — It should direct the customer to support without claiming to have checked an order.

Run returns a policy-grounded answer to the 20-day return question — Check the answer against the policy, including its conditions and next action.

Answers can vary. If a response invents information or promises an unavailable action, correct the policy or instructions and repeat these checks before publishing.

### 5. Publish the tested draft

Publishing updates the version available to the widget. On an existing live project, publishing Main changes the agent customers can reach; use a new project for this exercise.

Confirm **Main** is still selected, then click **Publish**. Name the release **Support launch**, review the changes and confirm **Publish** in the dialog. Wait for the **Published** notification.

Publish the Northstar Support release in Main — Review the release in Main before publishing the tested draft.

Future edits remain in the draft until you publish again. Retest changed answers before each release.

### 6. Install the widget on your website

Open **Widget** in the project sidebar. Under **Installation**, copy the generated code snippet for this project. See [Install widget](/docs/documentation/deploy/widget/embedding-the-chat-widget) for installation settings.

Native Widget Installation panel with generated snippet and copy control — Copy the generated Installation snippet for the published support agent.

If Creator asks you to **Turn off private mode**, **Confirm & copy code** allows external users to talk to the agent in production. Confirm when the tested agent is ready to be available publicly.

Paste the snippet into your website’s custom-code area before the closing `</body>` tag, then publish the website change. Use your site builder’s site-wide footer-code setting if it provides one.

Keep the generated authentication value intact. If the snippet contains a [client key](/docs/api-reference/authentication#client-keys), it is intended for the browser; never replace it with a personal or service API key. Always use the snippet generated by your own project.

## Verify the published experience

Open the website in a fresh private browser window. Confirm the chat launcher appears, open it and repeat the return, delivery and unknown-policy questions from the Run step.

Check that:

- The website agent uses the published Northstar policy and gives the same policy facts as your tests.
- It directs an order-specific or unsupported question to the support address without claiming to complete an action.
- A new conversation appears in [Transcripts](/docs/documentation/measure/transcripts) after your website test.

Before a real customer launch, replace every fictional business detail, publish the corrected agent and run these checks again on the customer-facing website.

### The widget is missing or has an older answer

Check the website installation and the release used by a new conversation.

- **No launcher:** confirm the generated script is present on the published page, allowed by the site’s script controls, and copied from the correct project. Check browser errors if it still does not load.
- **Older policy or instructions:** publish your latest Main draft, then start a new conversation in a fresh private window.
- **Different answers:** confirm the policy import finished, Knowledge base is enabled, and the website snippet belongs to the project you tested.

For installation settings, see [Install widget](/docs/documentation/deploy/widget/embedding-the-chat-widget).

## Improve the agent after launch

- [Collect a support request in Zendesk](/docs/guides/automate-support-tickets) when a customer needs asynchronous follow-up.

- [Investigate a customer conversation](/docs/guides/studio/monitoring/investigate-failed-conversation) to find missing policy coverage.
- [Add human agent hand-off](/docs/documentation/handoff/overview) when customers need a person to continue the conversation.
- [Create Playbooks](/docs/documentation/build/playbooks) when the agent needs to complete a task beyond answering policy questions.
