Help widget
Put your help center inside your own product or website, and open the topic that matches the page your user is on.
The help widget (SaaS Assistant Widget) adds a help button or panel to your app. Users read your documentation without leaving your product. You can link topics to pages of your app, so the widget opens the right help for each screen.
Create a widget
- Install the SaaS Assistant Widget addon from Addons.
- Go to Organization Settings › SaaS Assistant Widget.
- Select New to create a widget.
- Enter a Title. Only you see it, to tell widgets apart.
- In Button Text, enter the text on the help button, for example “Need Help?”.
- Under Default Entity, select Select and choose the document or topic the widget opens first.
Screenshot: Organization Settings, SaaS Assistant Widget tab, with the Title, Button Text and Default Entity fields filled in.
Choose how it looks
Under Styling:
- Pick a Panel Type:
- Slider: slides up from the bottom.
- Pop-Over: opens a small window over the page. This is the default.
- Side Drawer: opens a panel along the side.
- Embed: places the help inside your page, after an element you choose.
- Pick a Position: Right or Left.
- Pick a Button style. The choices depend on the panel type, for example Float or Without button.
- Set Background Color, Font color and Button Color. The preview updates as you go.
For Embed, enter a CSS selector in Target Element Selector, for example #help-area. The widget is placed after that element.
Screenshot: The Styling section with Panel Type, Position, Button and the three color fields, next to the live preview.
Turn it on and add the code
- Switch on Activate SaaS Assistant.
- Select Save.
- Copy the script under the switch.
- Paste it into your app's root page, for example before the closing
</body>tag.
The script looks like this:
<script name="SonatWebAssistant" id="YOUR-WIDGET-ID" src="https://resources.sonat.com/webAssistantSonat.min.js"></script>
To open the widget from your own button instead, add the data-swa-paneljstrigger attribute to it:
<button data-swa-paneljstrigger>Help</button>
Open the right topic for each page
You can link a topic to pages of your app with a pattern (a regular expression). When a user is on a matching page, the widget opens that topic.
- Set the widget's Default Entity to a document. Matching only works with a document.
- Open a topic in that document and go to its settings.
- Under Search & sharing, fill in SaaS Assistant Regex with a pattern that matches the page address. For example,
settingsmatches every address that contains “settings”. - Publish the topic.
The widget checks the full page address, and checks again when the address changes in single-page apps. If several topics match, the first one in the table of contents wins.
Use the widget with private content
If the widget opens a private document, visitors need a share link to read it inside the panel. Without one, they only get a link to open the documentation in a new tab.
- With the widget activated, open Share link.
- Pick a link, or select Create one to make a link that reads only this widget's document.
- Select Save, then copy the script again. It now includes the share link.
If something goes wrong
The widget doesn't appear in my app
Check that Activate SaaS Assistant is on and saved, and that the script is on the page. Open the browser console for error messages.
Embed shows nothing
The Target Element Selector is empty, invalid, or matches nothing on the page. Check it in the browser console.
The widget always opens the default page
Matching only works when the Default Entity is a document. Check that the topic's regex matches the full address and that the topic is published. An invalid pattern is skipped.
Visitors see “This documentation is private”
Add a share link to the widget and copy the new script.
I uninstalled the addon, but the widget still shows
A widget keeps running while it's activated. Switch off Activate SaaS Assistant before you uninstall, or remove the script from your app.