HOWTO Set up Visitor App (Live Chat) Test Page for Omni
First you would need to VPS/VM on which your webpage will be running.
Once deployed (Ubuntu server recommended) you would need to make sure that NGINX is installed.
You can find the steps on how to install NGINX on the following link:
After NGINX is installed create livechat directory on path /var/www/
mkdir /var/www/livechat
Within livechat directory create your index.html file which will be used for the webpage.
Example content of index.html file:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Test Live Chat</title>
<style>
body {
margin: 0;
padding: 0;
font-family: Arial, sans-serif;
background-color: #333;
color: #fff;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
</style>
<!-- Start of Live Chat code -->
<script>
(function(d, t) {
const BASE_URL = "https://YOURSYSTEMIP/visitor";
var g = d.createElement(t),s = d.getElementsByTagName(t)[0];
g.src = BASE_URL + "/sdk/sdk.js";
g.defer = true;
g.async = true;
s.parentNode.insertBefore(g, s);
g.onload=function() {
var bssdk = new window.BSSDK(BASE_URL)
}
})(document, 'script');
</script>
<!-- End of Live Chat code -->
</head>
<body>
<h1>Live Chat</h1>
</body>
</html>Please note that within this file you would need to paste the Chat Widget from your system located under Contact Center -> Channels -> Chat Widget
When done you would need to create the livechat file within /etc/nginx/sites-available/
nano /etc/nginx/sites-available/livechat
Example content of this file:
server {
listen 80;
server_name livechat www.livechat;
root /var/www/livechat;
index index.html index.htm index.php info.php;
location / {
try_files $uri $uri/ =404;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
fastcgi_read_timeout 500;
}
location ~ /\.ht {
deny all;
}
}Now you will need to create a symbolic link as follows:
ln -s /etc/nginx/sites-available/livechat /etc/nginx/sites-enabled/
Once everything is done make sure to reload and restart NGINX.
systemctl reload nginx systemctl restart nginx
Your test webpage should now be available on the IP Address / Domain defined.