Configuration options
Make the support widget your own by configuration of the Launcher and Messenger objects.
Introduction
The widget supports a rich set of configuration options which allow you to customize the widgets appearance and behavior. The structure of the configuration object follows the logical structure of the widget.
Attribute | Type | Description |
Community | String | The name of you inbox as written in the url |
Modulemask | Integer | A bit mask to enable modules. 1 = FAQ, 2 = Chat, 4= Form |
WidgetID | Integer | The ID of the widget you wish to launch |
initModule | Integer | Controls which module to load initially. Homepage = 0, FAQ = 1, Chat = 2, Forms = 3 |
Language | String | Set the language of the entire widget. Supports Norwegian ("nb"), Swedish ("sv"), Danish ("da"), Finnish ("fi") and English ("en"). Defaults to Norwegian. |
Messenger Object
These attributes will modify the behaviour and appearance of the messenger.
Attributes
Attribute | Obligatory | Type | Description |
right/left/bottom/top | No | String | Absolute position of the messenger |
animationDirection | No | String | Direction of the load animation |
translate | No | String | Number of pixels for the load animation |
Home Sub-object
The "home" page is the first page that loads after opening the widget. With these parameters, you can control the order of each module, and override the text settings for each of them. You can also adjust the logo which appears at the top of your messenger. All the parameters are optional.
Chat Sub-object
Control which authentication methods that will be presented to the user, and override default style settings.
Attribute | Type | Description |
authenticationMask | Integer | A bit mask for enabling authentication methods. 1 = Anonymous, 2 = Email, 4 = Facebook, 8 = Google. |
agentMessageBackgroundColor | String | Defines the background color of the agent chat bubbles. |
botMessageBackgroundColor | String | Defines the background color of bot chat bubbles. |
queueMessageBackgroundColor | String | Defines the background color of the queue element. |
queueMessageFontSizeRem | String | Set the font size in Rem of the queue element. |
FAQ Sub-object
Attributes optional. Overrides the default FAQ parameters.
Attribute | Type | Description |
areStickyTopicsFirst | Boolean | Presents sticky articles before others. |
faqCategoryId | Integer | Restricts FAQ articles from a specific category |
faqName | String | Restricts FAQ articles from a specific FAQ |
Form Sub-object
Optional. Used to specify which web-form that will be loaded into the messenger.
Attribute | Type | Description |
formName | String | Defines which web-form to use. |
Launcher Object
These attributes will modify the behavior of the launcher. Control where the launcher should appear on the screen, and replace the default launcher icons with your own icons. Should you wish to implement your own launcher, you then simply need to set enabled to false.
Methods
Loading the JavaScript library provides an MagicWidget JavaScript object that responds to a few methods. These allow you to update users without a page refresh and interact with the messenger window.
Show or hide the messenger
To launch the messenger from other elements on your website, use the launchAsync method. To hide the chat, use the dismissAsync() method.
You can subscribe to the launch state of the widget as shown below.
This example shows how a given element is used to control the messenger.
Log in Chat users automatically
If you also know the name and email of your chat user, you can use the setContactInfo function to skip the login page.
Adding custom data to the ticket
Attach any extra information to the ticket by using the setCustomFields function.
Last updated