# Configuration of the Webchat V1 component (obsolete)

Reminder: this version is obsolete and will no longer be supported starting from the 1rst October 2019. To enable Webchat V1 control on your website, simply add the iframe and replace the settings.

<!DOCTYPE html>
<html>
<head>
    <title>Witivio webchat sample</title>
</head>
<body>
    <script>
        window.webChatSettings = {
            botId: '[BOTID]',
            color: '[COLOR]',
            avatar: '[URL]',
            title: '[TITLE]',
            height: '500px',
            callout: true,
            welcome: true,
            width:'600px',
            user: {
                'id':'userId',
                'name': 'displayName'
            },
            refresh:false,
        };
        !function () { function t() { var t = e.createElement("script"); t.type = "text/javascript", t.async = !0, t.src = "https://webchat.witivio.com/init.js", t.onload = function () { loadWebChat(window.webChatSettings) }; var n = e.getElementsByTagName("script")[0]; n.parentNode.insertBefore(t, n) } var e = document, n = window; n.attachEvent ? n.attachEvent("onload", t) : n.addEventListener("load", t, !1) }();
    </script>
</body>
</html>
BotId The unique identifier of your chatbot. The ID is available in the settings menu.
Color Primary color in Hexa.
Avatar The URL of the image of your chatbot.
Title The title of the chat window. Usually the name of the chatbot.
Callout Activate the welcome message. (by default: true)
Welcome Enable the display of the welcome message in the chat window. (by default: true)
USER Not mandatory. You can use it in SharePoint.

{
    'id': _spPageContextInfo.aadUserId,
    'name': _spPageContextInfo.userDisplayName
}
            
            
ou
            
{
    'id': _spPageContextInfo.userPrincipalName,
    'name': _spPageContextInfo.userDisplayName
}
            
            
If no configuration is specified, the component generates a unique identifier that is stored in the browser.
refresh Display a botton that refresh the component (by default : false)
environnement Environment of the Knowledge base ('production' or 'integration') (by default: 'production')
triggerableDialogId Triggerable Dialog ID (not mandatory)
triggerableDialogItemId Triggerable Item ID to start (not mandatory)
background Background image (default value: square3d). possible value: square3d, communication, square, travel
autocomplete Display question with autocomplete style (par défaut: false)
autoscroll Force the autoscroll when the user go up in the conversation and decide to send a new message in the chat (default value: false).
buttonDesign.shape Choose the shape of the button, possible value: square, circle, chat (default value: circle)
buttonDesign.icon Choose the icon of the button, possible value:: 'bot' (to use the image of your bot from the plateform), 'fa fa-comment'if you want to use a Font Awesome (for instance 'fa fa-quote-right' ou 'fas fa-comment'). You can also add an URL of a image of your choice. (default value: 'fa fa-comment-dots')
buttonDesign.height Button height, advised unit: 'px' (default value: '80px')
buttonDesign.width Button width, advised unit: 'px' (default value: '80px')
buttonDesign.border 6 hexadecimal chararacter for the color of the border or 'none' if you don't want any border (Be aware that the shape 'chat' always need a border) (default value: 'ffffff')
buttonDesign.text The text to display beside the choosen icon. If your text has more than 25 character, it will be not displayed entirely.
headerHeight Change the header size. Possible value: small, big (default value: 'big' if unspecified)
position position of the webchat on the page,'top', 'middle' or 'bottom' then 'left' or 'right' followed with a margin of 150px maximum (default value: 'bottom right 10px 10px')