Install the workspace’s widget on the page first. Your site can then call the widget from a click handler. This works well for a Contact support button on an account page or a How does this work? link next to a form.
- To open Messenger, call
SupportDesk('show')from the button’s click handler. - To close Messenger from your page, call
SupportDesk('hide'). - To open an article, call
SupportDesk('showArticle', { id: 42, center: 'support', locale: 'en' }). Replace 42 and the center and language values with those from your published article.
Test the button on its published page. Confirm the right article opens and close the widget using the keyboard to check that focus returns to the button. If the command is unavailable, check that the embed script loaded before the click handler ran.