# Open chat window on custom event

**URL:** <https://forums.rocket.chat/t/open-chat-window-on-custom-event/3581>\
**Category:** Community Support\
**Created:** [April 8, 2019, 2:56pm UTC](https://forums.rocket.chat/t/open-chat-window-on-custom-event/3581 "2019-04-08T14:56:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mateus.silva](https://avatars.discourse-cdn.com/v4/letter/m/77aa72/32.png) [@mateus.silva](https://forums.rocket.chat/u/mateus.silva)\
**Post date:** [April 8, 2019, 2:56pm UTC](https://forums.rocket.chat/t/open-chat-window-on-custom-event/3581/1 "2019-04-08T14:56:35Z")

</div>

On my webpage I use the livechat feature for random customer to quick chat with us.

On my site i want to have a link (button or something) that open the livechat widget.

Like a “lorem ipsum text about something CLICK HERE AND FIND MORE”

And when the user clicks the link the widget that are minimized on the corner opens.

I can’t find on the documentation if this is possible and in case it’s possible, what are the methods.

Thanks.

---

<div class="post-metadata">

**Author:** ![mateus.silva](https://avatars.discourse-cdn.com/v4/letter/m/77aa72/32.png) [@mateus.silva](https://forums.rocket.chat/u/mateus.silva)\
**Post date:** [April 12, 2019, 5:11am UTC](https://forums.rocket.chat/t/open-chat-window-on-custom-event/3581/2 "2019-04-12T05:11:10Z")

</div>

I’m trying to open the livechat widget with a custom event on my page. And i can’t find how to do this since i can’t go to the iframe and trigger manually.

The script that i insert on my page has this bit “j.src = ‘[http://localhost:3000/packages/rocketchat\_livechat/assets/rocketchat-livechat.min.js?\_=201702160944](http://localhost:3000/packages/rocketchat_livechat/assets/rocketchat-livechat.min.js?_=201702160944)’;”

Can I in a safe way modify this file “rocketchat-livechat.min.js” to listen to a custom command?

I found that in “Administration \> General \> Iframe Integration” I can enable send and receive commands.

And on this doc it explain how to use the commands.

[https://rocket.chat/docs/developer-guides/iframe-integration/commands/](https://rocket.chat/docs/developer-guides/iframe-integration/commands/)

So I was thinks in add a custom command to open the livechat widget when the client clicks on a link on my website.

Thanks.
