# Create custom launch event

### Before you get started

* Make sure you've already created a [Mava web chat from the integration section](/mava-docs/getting-started/integration-setup/web-chat-setup.md)

## How to create a custom launch event

There are a few use cases where you may want to trigger a custom launch event for the Mava Web Chat Widget. A custom launch event allows you to trigger the widget to open from an event other than clicking the default Mava launcher.&#x20;

***Simple***

Add `id="mava-webchat-launcher"`  or `class="mava-webchat-launcher"`to any button on your website, depending on whether you want a single instance or multiple buttons to be able to trigger the web chat open event.

For example:

```
<button id="mava-webchat-launcher">Open Sesame </button> 

```

Or...

```
<button class="mava-webchat-launcher">Open Sesame </button> 
```

The buttons or elements but me loaded on the page before the Mava web chat script triggers. If your setup is more complex - which is sometimes the case with SPA's or if you're delaying the load of the widget, you may need to use our custom function.

***Advanced***

```
<button onclick="window.MavaWebChatToggle()">Open Sesame </button> 
```


---

# 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://mava.gitbook.io/mava-docs/getting-started/integration-setup/web-chat-setup/create-custom-launch-event.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.
