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 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
.exampleemail address cannot receive messages. - Allow for credit usage when testing and serving conversations.
Build and launch the agent
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.
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.
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.The policy should appear in the Knowledge base without a processing or error status. If the import fails, retry it before continuing.
Define the agent’s role and instructions
Return to Agent. In Global prompt, replace the starter text with:
# 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:
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.
This agent answers policy questions. It has no order-lookup, refund or live-handoff integration, so its instructions must not promise those actions.
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.
Answers can vary. If a response invents information or promises an unavailable action, correct the policy or instructions and repeat these checks before publishing.
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.
Future edits remain in the draft until you publish again. Retest changed answers before each release.
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 for installation settings.
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, 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 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.
Improve the agent after launch
-
Collect a support request in Zendesk when a customer needs asynchronous follow-up.
-
Investigate a customer conversation to find missing policy coverage.
-
Add human agent hand-off when customers need a person to continue the conversation.
-
Create Playbooks when the agent needs to complete a task beyond answering policy questions.