(function(window) {
var chatConfig = {
webchatAppUrl: 'https://apps.mypurecloud.com/webchat',
webchatServiceUrl: 'https://realtime.mypurecloud.com:443',
orgGuid: '7f9be844-b3e8-45fc-af0b-23c0eb2aa03e',
orgId: '13400',
orgName: 'branttelnetworks',
queueName : '',
chatNowElement: 'start-purecloud-chat',
logLevel: 'Debug',

data": {
"firstName": "",
"lastName": "",
"email": ""
},
reconnectEnabled: true,
reconnectOrigins: [ 'https://Branttel.com' ]
};
ININ.webchat.create(chatConfig).then(function(webchat) {
// Render to popup
return webchat.renderPopup({
width: 400,
height: 400,
title: 'Chat',
//set newTab to true if using screen share
newTab: false
}).catch(function(error) {
console.error('Error starting chat');
console.error(error);
});
}).catch(function(error) {
console.error('Error initializing chat');
console.error(error);
});
})(window);