Open chat window on custom event

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.

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’;”

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/

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.