How to Control the Chat by Webpage URL Query Parameters
You can use URL query parameters to control the LoyJoy chat experience. The following parameters are available:
Parameter | Value | Function |
---|---|---|
loyjoy-fullscreen | true | Force that the chat messenger is always in fullscreen, not only on mobile but also on tablets etc. |
loyjoy-debug | true | Enable debug mode that logs to JavaScript console |
loyjoy-debug | true | Force that the chat messenger is always in fullscreen, not only on mobile but also on tablets etc. |
loyjoy-iframe | true | Force that the chat messenger renders in an iframe instead of a web component. Not recommended, however might be necessary if JavaScript of your hosting web page modifies DOM elements of LoyJoy web components and you cannot fix this. |
loyjoy-locale | E.g. de or de-CH | Set the locale for the chat. For example to have the chat always start in French on the French localized website |
loyjoy-open | true or false | Open chat messenger on page load / Do not open chat messenger on page load |
loyjoy-reset | true | Delete chat history on page load |
loyjoy-restart | true | Start experience again after page load |
loyjoy-route | process/<PROCESS_ID | Route chat UI to specified process ID |
loyjoy-show | false | Hide LoyJoy chat on page |
How to append query parameters to Webpage URLs / links
You can simply add any of these parameters to the URL of the hosting webpage after a ?
character. For example like this:
https://www.example.org?loyjoy-open=true
If you already have query parameters in the URL of the hosting webpage or want to add more than one parameter, you have to use the &
character to chain parameters:
https://www.example.org?foo=bar&loyjoy-show=false
Freely Selected Parameters
You can pass freely selected parameters to the experience that can be evaluated in the BPMN process using BPMN conditions and other expressions. The parameters can be accessed with the GetParam function in LoyJoy.
https://www.example.org?foo=bar