> For the complete documentation index, see [llms.txt](https://help.wotnot.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.wotnot.io/deploy/web-chat-widget/js-functions-to-trigger-chat-widget.md).

# JS functions to trigger chat widget

Execute the following Javascript functions to trigger the chat widget on your web page.

### Opening the chat widget

```
wn.openWidget(); 

//Opens the chat window but minimizes it when clicked on the cross
wn.openWidget(true)
```

{% embed url="<https://www.loom.com/share/3aac595347a34fcdb35fc62216e7400a?sid=7caa0e58-d69d-4a6e-b9dd-fa2b7136cdd1>" %}

### Hiding the chat widget

<pre><code><strong>wn.hideWidget();
</strong></code></pre>

{% embed url="<https://www.loom.com/share/dc3cdcd8ff904cccafcc8bfe1927b565?sid=12ca6a07-eada-45b0-a139-e633d483110d>" %}

### Showing the chat widget

```
wn.showWidget();

//Shows the chat bubble but minimizes it when clicked on the cross.
wn.showWidget(true)  
```

{% embed url="<https://www.loom.com/share/3d2af81bddb64ef78d94558d48762a47?sid=332bc593-9c1e-42a7-a2c2-641dfad97784>" %}


---

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

```
GET https://help.wotnot.io/deploy/web-chat-widget/js-functions-to-trigger-chat-widget.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.
