Build with

Give shoppers descriptive product information and approved shipping or return policies through Knowledge. Keep live order records and customer data out of this general-answer source.

For approved public content from other stores, use the Knowledge workflow in WooCommerce, Wix Stores or Squarespace Commerce. These imports have their own processing and refresh checks, separate from store API access.

Before you begin

  • A content owner approves the product facts, policy, audience and refresh process.
  • A test project with Knowledge enabled for the agent, plus two answerable questions and one out-of-scope question.
  • For Shopify catalog import, a connected store. For a policy without a public URL, the owner supplies approved text.

Studio

Open the test project in Agent studio.

Code

Use a Voiceflow bearer credential with access to your test project and Environment. Keep it on your backend or development machine. Set:

Use a current Voiceflow CLI if you choose CLI. API and CLI examples use the Environment’s saved Draft. Standalone execution does not attach a tool, compile an agent or publish a release.

Import approved content

1

Choose the right source

Use Shopify’s managed source for selected active product pages. Use public policy URLs or approved text for shipping and returns. Imported prices and availability are snapshots: use a live lookup or the store before promising a current variant price or stock.

2

Import product pages

In Agent studio, choose the same project as your agent or code, then Build → Knowledge base → Add data source → Shopify.

Open the catalog import from Knowledge base in the intended project. Photo:
3

Select and inspect the product pages

In Import from Shopify, select approved collections, product types, tags and vendors. Check the count, choose Folder and Refresh rate, then select Import data sources.

Import approved active product pages with an intentional refresh schedule. Photo:

Wait for processing, open an expected product and compare its content with the store. Import product knowledge covers source filters, re-sync and removal.

4

Add the approved policy

For the worked test, save this fictional policy as northstar-policy.txt. Replace it with your approved merchant policy before customer use:

Studio

In Knowledge base, choose Add data source → Docs and upload the text file. Wait until it has processed, then open the document and compare the text. Use the approved public policy URL with Web page(s) when it needs a recrawl schedule.

Inspect the approved policy document before using it for customer answers. Photo:

Code

Create the text document using the saved file:

  1. Retain the returned document.id.
  2. Read GET /v1/stable/document/{documentID} with the same project/Environment query and authorization until document.status.type is SUCCESS. Inspect an ERROR rather than treating submission as completion.
  3. Check the processed text against the approved policy.

File names are unique across Knowledge. Replace the exact existing document through the document lifecycle to avoid conflicting policies.

Check retrieval and the answer

Studio

  1. In Agent, make the Knowledge base tool available and describe when to use the approved policy.
  2. Ask “What should I do if my item arrived damaged?” Compare the answer and source with the policy document.
  3. Test a product fact and an out-of-scope question, such as an unsupported international-delivery promise.

Code

Run a Draft retrieval diagnostic:

Require that answer.chunks[].documentID, source and content identify the intended policy. With synthesis disabled, answer.output is null. Then run a Draft conversation to verify the actual agent answer, its source and fallback. A retrieval diagnostic alone does not test agent behavior.

The completed answer should route damage claims for review and avoid inventing refund timing. For a personalized eligibility check using verified delivery data, use Assess a return request.

Keep the content current

  1. Have the content owner approve the changes.
  2. Update the existing policy and refresh product content as needed. Wait for processing.
  3. Repeat the answer tests in the intended Draft/release, including a withdrawn product and an obsolete policy. Confirm conflicting old content is unavailable.

Shopify source maintenance explains re-sync, retained-page refresh and exclusions.

Use the up and down arrow keys to select a result, Enter to open it, and Escape to close the search.