The timing of applying widget settings in Web Widget (Classic) API workflows is crucial. Some settings should be applied when a department's status changes, while others should be applied when the widget first connects or reconnects.
For instance, you can use thechat:departmentStatus
callback to apply settings whenever a department's status changes. This ensures that the widget behaves correctly based on the department's availability. On the other hand, use thechat:connected
callback for settings or commands that should only be executed once, such as initial setup tasks.
You can modify the Web Widget (Classic) behavior using JavaScript APIs by applying specific workflows at different times. Some workflows should be executed when a department's status changes, while others should be run when the widget first…
Thechat:connected
callback in Web Widget (Classic) is best used for commands you only wish to execute once. This is ideal for initial setup tasks that should not be repeated every time the widget reconnects. If you have commands that need to be…
Handling department status changes in Web Widget (Classic) can be managed using thechat:departmentStatus
callback. This allows you to apply specific settings based on the department's availability. For example, if a department named 'CRM' is…
Hiding the Web Widget (Classic) on page load is not strictly necessary, but it can be part of your workflow if desired. The initial steps of hiding the widget and then showing it when an unread message appears can be omitted without affecting the…