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
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.
Import product pages
In Agent studio, choose the same project as your agent or code, then Build → Knowledge base → Add data source → Shopify.
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.
Wait for processing, open an expected product and compare its content with the store. Import product knowledge covers source filters, re-sync and removal.
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.
Code
Create the text document using the saved file:
- Retain the returned
document.id. - Read
GET /v1/stable/document/{documentID}with the same project/Environment query and authorization untildocument.status.typeisSUCCESS. Inspect anERRORrather than treating submission as completion. - 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
- In Agent, make the Knowledge base tool available and describe when to use the approved policy.
- Ask “What should I do if my item arrived damaged?” Compare the answer and source with the policy document.
- 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
- Have the content owner approve the changes.
- Update the existing policy and refresh product content as needed. Wait for processing.
- 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.