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

# Answer product and policy questions

> Give shoppers descriptive product information and approved shipping or return policies through Knowledge.

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](/docs/guides/integrations/woocommerce/overview#product-and-policy-knowledge), [Wix Stores](/docs/guides/integrations/wix-stores/overview#product-and-policy-knowledge) or [Squarespace Commerce](/docs/guides/integrations/squarespace-commerce/overview#product-and-policy-knowledge). 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](/docs/documentation/build/tools/shopify#connecting-shopify). For a policy without a public URL, the owner supplies approved text.

#### Studio

Open the test project in [Agent studio](https://creator.voiceflow.com).

#### Developer

Use a [Voiceflow bearer credential](/docs/api-reference/authentication) with access to your test project and Environment. Keep it on your backend or development machine. Set:

```sh
export VF_TOKEN='YOUR_VOICEFLOW_BEARER_TOKEN'
export PROJECT_ID='YOUR_TEST_PROJECT_ID'
export ENVIRONMENT='main'
```

Use a current [Voiceflow CLI](/docs/cli/install) 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](https://creator.voiceflow.com), 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. — Open the catalog import from Knowledge base in the intended project.

### 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. — Import approved active product pages with an intentional refresh schedule.

Wait for processing, open an expected product and compare its content with the store. [Import product knowledge](/docs/documentation/build/tools/shopify#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:

```text
Northstar Supply example policy
Standard delivery takes 3–5 business days after dispatch within Canada.
Unused items in their original packaging may be requested for return within 30 elapsed days of delivery, except final-sale items.
Damaged items need support review. Contact support@northstar.example to request a review.
This policy does not establish an order's delivery date, authorize a return or give a refund processing time.
```

#### 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. — Inspect the approved policy document before using it for customer answers.

#### Developer

Create the text document using the saved file:

```sh
curl --fail-with-body --silent --show-error \
  --request POST "https://realtime-api.voiceflow.com/v1/stable/document/text?projectID=$PROJECT_ID&environmentAlias=$ENVIRONMENT" \
  --header "Authorization: Bearer $VF_TOKEN" \
  --form 'file=@northstar-policy.txt;type=text/plain'
```

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](/docs/documentation/build/importing-data-sources) 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.

#### Developer

Run a Draft retrieval diagnostic:

```sh
curl --fail-with-body --silent --show-error \
  --request POST "https://realtime-api.voiceflow.com/v1/stable/knowledge-base/query?projectID=$PROJECT_ID&environmentAlias=$ENVIRONMENT" \
  --header "Authorization: Bearer $VF_TOKEN" --header 'Content-Type: application/json' \
  --data '{"version":"draft","question":"What should I do if my item arrived damaged?","synthesis":false,"chunkLimit":3}'
```

Require that `answer.chunks[].documentID`, `source` and `content` identify the intended policy. With synthesis disabled, `answer.output` is null. Then [run a Draft conversation](/docs/cli/commands/conversation/send) 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](/docs/guides/integrations/commerce/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](/docs/documentation/build/tools/shopify#import-product-knowledge) explains re-sync, retained-page refresh and exclusions.
