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

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

The question should be specific, self-contained, and written in natural language.
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.
