# Add knowledge for the Sales Agent

> Open Agentic › Sales Agent › Knowledge Base, add a page of your shop, a PDF or your own text as a document, check what the import made and publish it, so the Sales Agent can answer from it.

The Sales Agent answers shoppers’ questions about delivery, returns, sizes and your other policies from the documents in its knowledge base. You add a document from a page of your shop, a PDF or text you type in. Releva splits it into small passages (units), and the Sales Agent uses them once you publish the document. This guide does not cover the questions and answers made from your documents: for those, see [Approve Sales Agent answers](https://releva.ai/documentation/guides/sales-agent/approve-sales-agent-answers/).

## Before you start

* The Sales Agent is switched on for your shop. Until then, **Agentic › Sales Agent** shows only the figures and a **Chat Bot** switch you cannot turn on, and no tabs. Releva turns the Sales Agent on for your shop the first time: only a Releva super admin can make the first switch-on, so contact Releva.
* Have the content ready: the address of a public page of your shop, a PDF (on your computer, in **Assets**, or at a public address), or the text itself.
* Anyone with access to the shop can add, publish and remove documents.

## Steps

1. Go to **Agentic › Sales Agent** and select the **Knowledge Base** tab.

   ![The Sales Agent page with the Knowledge Base tab highlighted](https://releva.ai/documentation/_astro/step-1.Cg8ylWvQ_Z1AKjOz.webp)

   **Documents** opens first. Each row shows the document with its status (**draft**, **validated** or **published**), its locale and tags, how many units it has and how many of them are live, the result of the last import (**Last ingest**) and when it was last changed.

   ![The Documents list with a draft and two published documents](https://releva.ai/documentation/_astro/step-2.CMfcUSCj_28FJab.webp)

2. Select **New document**.

   ![New document highlighted above the Documents list](https://releva.ai/documentation/_astro/step-3.BLzR9I8z_1Hd5lj.webp)

3. Under **Source**, choose where the content comes from:

   * **URL** imports a public page. Enter its address in **Source URL**.
   * **PDF** imports a PDF. Select **Upload file**, **Pick from Assets** or **Paste URL**.
   * **Manual text** takes the text you type in.

   ![The New document window with Source set to URL](https://releva.ai/documentation/_astro/step-4.B2T4vAN__Z2coet8.webp)

4. Enter a **Title**. For **Manual text**, also enter the **Content**. You can format it as Markdown, with headings and lists.

   For a URL or a PDF the title is optional: without one, the document takes the title of the page or the file.

   ![Manual text selected, with the title Gift wrapping and a short text in Content](https://releva.ai/documentation/_astro/step-5.BxqtPt6N_Z1HmIGN.webp)

5. Check the other fields:

   * **Locale**: the shop language the document is for. **All locales** serves it in every language.
   * **Market**: leave it empty unless the document is for one market only.
   * **Tags**: optional labels to filter and select documents later.
   * **AI processing**: **Structure content with AI** rewrites a messy page or PDF into clean text before it is split. **Generate Q\&A pairs with AI** writes questions and answers from the document for you to review. Both use AI tokens; leave them off if you do not need them.
   * **Status**: keep **draft** so nothing reaches shoppers before you check the result.

6. Select **Create document**.

   The document appears in the list and Releva imports it in the background. **Last ingest** shows **ready** when the import has finished.

7. Select the document’s title to open it.

   ![The Size guide document, a draft, highlighted in the list](https://releva.ai/documentation/_astro/step-6.bbgOxqab_ZiTahR.webp)

8. Check the **Content** tab and the **Units** tab, then select **Publish**.

   **Content** shows the imported text. If you change it, select **Save changes**: Releva splits it again and the previous version keeps answering until that is done.

   ![The open document with its content and Publish highlighted](https://releva.ai/documentation/_astro/step-7.OCH8s2mq_ZWMT6u.webp)

9. Select **Publish … units** to confirm.

   The units go live for the Sales Agent right away. You can select **Unpublish** at any time; nothing is deleted.

   ![The Publish confirmation with Publish 3 units highlighted](https://releva.ai/documentation/_astro/step-8.03RbpnR8_ZnbcoO.webp)

10. Leave **Agent enabled** on, so the Sales Agent may use the document.

    Turn it off to hold a published document back without unpublishing it. For a URL or a PDF, turn on **Auto-resync nightly** to import the source again every night when it has changed. It is not available for **Manual text** or for documents structured with AI.

    ![Agent enabled switched on next to Auto-resync nightly](https://releva.ai/documentation/_astro/step-9.mUFq3Ksn_Z18QWm1.webp)

## Check it worked

* The document shows **published** in **Documents**, and **Units** shows that its units are live.

* Select **Ingest Queue** to see each import run, newest first, with its stage. A finished run shows **ready**.

  ![Ingest Queue highlighted next to the other Knowledge Base views](https://releva.ai/documentation/_astro/step-10.D6Gv3hes_Z2vYqjo.webp)

  ![Ingest Queue with three runs, each ready](https://releva.ai/documentation/_astro/step-11.DkbgxxHl_iV1fc.webp)

## Troubleshooting

**Already in the knowledge base.** A document with the same source exists. Select **Open document** in the message to open it instead of adding it again.

**Choose a PDF file.** **Upload file** takes PDF files only. Save the file as a PDF, or add the text with **Manual text**.

**Last ingest shows failed.** The import did not finish, for example because the page could not be read. A failed run never takes content down: the last good version keeps answering. Hover over the badge to see what happened. For a URL, check that the page is public, then select **Retry** on the run in **Ingest Queue**. If it keeps failing, add the text with **Manual text** or contact Releva support.

**The document has 0 live units.** Units go live only when the document is published. Open it and select **Publish**. If **Units** is empty, wait until **Last ingest** shows **ready**.

**The Sales Agent does not use a published document.** Check that **Agent enabled** is on and that the document’s **Locale** matches the language of your shop, or is **All locales**.

## Next steps

* [Approve Sales Agent answers](https://releva.ai/documentation/guides/sales-agent/approve-sales-agent-answers/): review the questions and answers made from your documents and write your own for questions the agent missed.
* [Review Sales Agent conversations](https://releva.ai/documentation/guides/sales-agent/review-sales-agent-conversations/): see what shoppers ask, to find the knowledge that is still missing.
* [Upload a file and use it in your messages](https://releva.ai/documentation/guides/assets/upload-a-file-and-use-it-in-your-messages/): put a PDF in **Assets** first, then pick it here with **Pick from Assets**.