Skip to main content

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:

ParameterValueFunction
loyjoy-fullscreentrueForce that the chat messenger is always in fullscreen, not only on mobile but also on tablets etc.
loyjoy-debugtrueEnable debug mode that logs to JavaScript console
loyjoy-debugtrueForce that the chat messenger is always in fullscreen, not only on mobile but also on tablets etc.
loyjoy-iframetrueForce 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-localeE.g. de or de-CHSet the locale for the chat. For example to have the chat always start in French on the French localized website
loyjoy-opentrue or falseOpen chat messenger on page load / Do not open chat messenger on page load
loyjoy-resettrueDelete chat history on page load
loyjoy-restarttrueStart experience again after page load
loyjoy-routeprocess/<PROCESS_IDRoute chat UI to specified process ID
loyjoy-showfalseHide LoyJoy chat on page

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