> For the complete documentation index, see [llms.txt](https://docs.cleandesk.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cleandesk.ai/client-integrations/web-widget/sales-assistant.md).

# Sales Assistant

## Sales **(No authentication)**

To implement a conversational sales assistant on your website's homepage or other pages where user identity is unknown, and chat functions are enabled for any visitor, follow these steps.

Identify all the pages where you desire customers to access the chat function, allowing them to interact with an AI for responses.

### Place the JavaScript code in the HTML

#### Add the script to the \<head> section

Copy the following JavaScript code and paste it before the closing \`\</head>\` tag of your website's HTML file:

```html
<script defer src="https://cdn.cleandesk.co.in/public/build/clean_ai_bot.js"></script>
```

This script loads the necessary CleanDesk AI Bot library.

#### Add the chat widget code

Copy the following code and paste it before the closing \`\</body>\` tag of your website's HTML file or paste it where you would like to use the widget:

```html
<cleandesk-chat-widget app_id="YOUR_APP_ID" app_secret="YOUR_APP_SECRET"></cleandesk-chat-widget>    
```

Replace \`YOUR\_APP\_ID\`, \`YOUR\_APP\_SECRET with the appropriate values that you have generated in the admin section of CleanDesk Ai.

The chat widget is responsible for initiating the conversation with the AI-powered customer service.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.cleandesk.ai/client-integrations/web-widget/sales-assistant.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
