Custom Widget Display Control
Overview
By default, web deployments allow you to configure triggers for widget behavior directly in the Management Panel. These triggers control when and how the widget appears to end users, supporting the following steps:
- Show Widget Button – displays the floating button that opens the widget
- Show Headsup – displays a proactive notification/bubble above the widget button
- Show Widget – opens the widget directly
However, if you want to control this behavior using your own custom logic — for example, opening the chat from an existing button on your page — you can do so by disabling the default triggers and invoking the widget programmatically.
How to Take Manual Control
Step 1 – Disable All Triggers
In the Management Panel, navigate to your web deployment settings and disable all configured triggers. This prevents the widget from appearing automatically based on the built-in rules.
Step 2 – Invoke the Widget Programmatically
Use the following JavaScript call wherever you want to open the widget — for example, inside a click handler on your own button:
window.trueengage.openView(tab);
Replace tab with one of the supported values listed below.
Supported tab Values
| Value | Description |
|---|---|
channel_picker |
Opens the widget with the channel selection screen |
chat |
Opens the widget directly on the chat channel |
audio |
Opens the widget directly on the audio channel |
video |
Opens the widget directly on the video channel |
faq |
Opens the widget on the Genesys Knowledge Base (FAQ) channel |
scheduledVideo |
Opens the widget on the scheduled video channel |
Example
The following example opens the chat channel when a user clicks a custom button on the page:
<button onclick="window.trueengage.openView('chat')">
Contact Support
</button>
You can use any value from the table above depending on which channel you want to present to the user.
Notes
- This approach gives you full control over when and how the widget is triggered, allowing seamless integration with your existing UI.
- Make sure the TrueEngage widget script is loaded on the page before calling
window.trueengage.openView(). - If triggers are not disabled in the Management Panel, the widget may still appear based on the configured rules in addition to your manual calls.