How to show an email form when no operators are available
You can set the Unavailable Email Form to appear when a no operators are available to answer a chat request.
You can set the Unavailable Email Form to appear when a no operators are available to answer a chat request.
Result: The New Custom Chat Window is displayed.
Multiple emails must be separated by a comma, semi-colon, or space.
To add a button to your email signature that users click to initiate a chat session, you simply generate the appropriate chat button code and associate it with your Outlook signature.
Result: The Generate Chat Button HTML window is displayed.
Result: The chat button is added to your email signature.
You may share the transcript of a chat with others that do not have access within BoldChat.
Result:
You can correlate specific canned message folders with a chat window. This can be helpful in an environment with multiple web sites to ensure that relevant messages are presented to operators.
Result: The New Custom Chat Window is displayed.
Canned messages are predefined text strings that the operator can insert into a conversation. With canned messages, the operator can reuse commonly used responses without having to type them.
For each technology, canned messages are stored and managed in their respective area.
Operators with proper permission can create and manage canned messages at Setup > My Canned Messages Setup.
You can set up a pre-chat form that is displayed to visitors after they click a chat button but before actually chatting with an operator. The pre-chat form is a component of the Custom Chat Window definition associated with a chat button or chat invitation. The form can be customized. Visitor input is added to the incoming chat.
Result: The New Custom Chat Window is displayed.
See also How to provide a chat window in multiple languages.
To provide the visitor with choices, you must add Available Departments.
You can prompt visitors for feedback after a chat has been closed.
Result: The New Custom Chat Window is displayed.
Result:
Use the Operator Wrap-Up feature to gather information from operators about ended sessions.
Result: The New Custom Chat Window is displayed.
Option | Description |
---|---|
Auto-Close | Set how long an ended session remains in the active chats view (shown in italics) before closing automatically. Required fields must be completed before the session can close. |
Standard Wrap-Up | Set fields that operators must complete before a session can be closed.
Tip: To create values for these fields, see Organizing Chats.
|
Custom Wrap-Up | Enterprise subscribers can set additional fields that operators can complete before a session can be closed. Unlike standard wrap-up, multiple response types are allowed (text, drop-down, radio button). Click New to set up fields and values. Fields can be required or optional. |
Set a text-based link that a visitor clicks to initiate a chat session.
When implementing chat, your visitors need something to click in order to start a chat session. The term chat entry point refers to the interface element that a visitor clicks to initiate a chat. You set a chat entry point as part of the procedure of generating and inserting an HTML snippet to your site.
Result: The Generate Chat Button HTML window is displayed.
A Chat Window definition controls the look and feel and advanced behavior of the interface that is opened when a visitor clicks your link.
See How to use Website definitions to manage multiple sites.
See Custom Visitor Info, Variables: Collecting visitor data.
Canned messages are predefined strings of text that the operator can insert into a conversation. With canned messages, the operator can reuse commonly used responses without having to type them.
Conflicts can occur when a particular key combination is registered to other applications on your local machine. Operators should check key availability by clicking Check.
This value acts as a filter to ensure that operators see only messages matching the visitor's language. When no value is specified, no filter is applied and the message is displayed to all operators as <Not specified>.
Result: For example, when an Italian speaking visitor starts a chat, the operator sees Italian canned messages plus those messages with no language value.
Result: The list of canned messages for an operator is filtered down to those canned messages that match the visitor's language. For example, when an Italian speaking visitor starts a chat, the operator sees Italian canned messages plus any canned message where the language is unknown <Not Specified>.
Result: The canned message is made available to be used in response to incoming communications for the chosen technology (Chat, Email, SMS, or Twitter).
To arrange canned messages in folders, right click the root folder and click New Folder. Once you have folders, you can drag and drop messages between folders.
Integrate Google Analytics with Layered Chat Windows, track visitor interactions as Analytics events and gain accurate insight into visitor behavior.
As dynamic elements on a website, Layered Chat Windows require a mechanism to cache tracking information and provide accurate results. This step-by-step guide describes a Local Storage implementation that allows data to persist when a chat session is interrupted.
The Local Storage technology is compatible with the following browsers:
See the WebStorage article on Wikipedia for details.
All pages on your site must either include or reference the following code snippets:
Code locations in BoldChat for Task One, Task Two and Task Three.
Add a Chat Frame Javascript Include to the Chat Window Definition deployed to your site. This code intercepts chat events and passes them to the chat window via the postMessage method.
try {
function sendtxt(txt) {
var message = JSON.stringify({
gacomm: txt
});
parent.parent.postMessage(message, "*");
}
sendtxt(bcConfig.chatOptions.page);
window.console && console.log("Sent Chat Window Page: " + bcConfig.chatOptions.page);
if (bcConfig.chatOptions.page == "chat") {
var _tEvents = {
"new-message": "bc_newHistoryMessageCallback"
},
_tFunction = function(i, type, fName) {
if ((i == "new-message") && (bc.$("#bc-status-prompt").prev().hasClass("bc-operator-message"))) {
sendtxt("answered");
}
}
}
for (var i in _tEvents) {
window[_tEvents[i]] = _tFunction.bind(window, i, "function", _tEvents[i]);
}
} catch (err) {
window.console && console.error(err);
}
Add a Chat Window Javascript Include to the Chat Window Definition deployed to your site.
try {
/**
* lscache library
* Copyright (c) 2011, Pamela Fox
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
**/
!function(a,b){"function"==typeof define&&define.amd?define([],b):"undefined"!=typeof module&&module.exports?module.exports=b():a.lscache=b()}(this,function(){function a(){var a="__lscachetest__",c=a;if(void 0!==m)return m;try{g(a,c),h(a),m=!0}catch(d){m=b(d)?!0:!1}return m}function b(a){return a&&"QUOTA_EXCEEDED_ERR"===a.name||"NS_ERROR_DOM_QUOTA_REACHED"===a.name||"QuotaExceededError"===a.name?!0:!1}function c(){return void 0===n&&(n=null!=window.JSON),n}function d(a){return a+p}function e(){return Math.floor((new Date).getTime()/r)}function f(a){return localStorage.getItem(o+t+a)}function g(a,b){localStorage.removeItem(o+t+a),localStorage.setItem(o+t+a,b)}function h(a){localStorage.removeItem(o+t+a)}function i(a){for(var b=new RegExp("^"+o+t+"(.*)"),c=localStorage.length-1;c>=0;--c){var e=localStorage.key(c);e=e&&e.match(b),e=e&&e[1],e&&e.indexOf(p)<0&&a(e,d(e))}}function j(a){var b=d(a);h(a),h(b)}function k(a){var b=d(a),c=f(b);if(c){var g=parseInt(c,q);if(e()>=g)return h(a),h(b),!0}}function l(a,b){u&&"console"in window&&"function"==typeof window.console.warn&&(window.console.warn("lscache - "+a),b&&window.console.warn("lscache - The error was: "+b.message))}var m,n,o="lscache-",p="-cacheexpiration",q=10,r=6e4,s=Math.floor(864e13/r),t="",u=!1,v={set:function(k,m,n){if(a()){if("string"!=typeof m){if(!c())return;try{m=JSON.stringify(m)}catch(o){return}}try{g(k,m)}catch(o){if(!b(o))return void l("Could not add item with key '"+k+"'",o);var p,r=[];i(function(a,b){var c=f(b);c=c?parseInt(c,q):s,r.push({key:a,size:(f(a)||"").length,expiration:c})}),r.sort(function(a,b){return b.expiration-a.expiration});for(var t=(m||"").length;r.length&&t>0;)p=r.pop(),l("Cache is full, removing item with key '"+k+"'"),j(p.key),t-=p.size;try{g(k,m)}catch(o){return void l("Could not add item with key '"+k+"', perhaps it's too big?",o)}}n?g(d(k),(e()+n).toString(q)):h(d(k))}},get:function(b){if(!a())return null;if(k(b))return null;var d=f(b);if(!d||!c())return d;try{return JSON.parse(d)}catch(e){return d}},remove:function(b){a()&&j(b)},supported:function(){return a()},flush:function(){a()&&i(function(a){j(a)})},flushExpired:function(){a()&&i(function(a){k(a)})},setBucket:function(a){t=a},resetBucket:function(){t=""},enableWarnings:function(a){u=a}};return v});
var ga_events = {
"prechat": 'PreChat Form Displayed',
"chat": "Chat Opened",
"answered": "Chat Answered",
"postchat": "Survey Displayed",
"email": "Email Form (Unavailable)",
"no-operators": "Unavailable Chat",
"chat-sent": "Survey Completed or Transcript",
"message-sent": "Unavailable Email Sent",
"final": "Chat Ended without Survey or Transcript"
}
The following code achieves the following:
Note how individual events are stored in the browser localStorage with a CID, a unique identifier for Chat windows that survives page re-loads, browser closing/reopening as well as navigation on different tabs under the same domain.
The code also ensures that the user is able to start multiple simultaneous chats on different domains while events are accounted for separately and accurately.
function listener(event) {
if (event.origin !== "https://" + bcConfig.host) return;
var pmessage = JSON.parse(event.data);
if (pmessage.hasOwnProperty('gacomm')) {
window.console && console.log("Received: " + event.data);
var received = pmessage.gacomm + "---" + bcConfig.cid;
var found = false;
lscache.flushExpired();
CIDs = lscache.get('CIDs');
if (CIDs !== null) {
var arrayLength = CIDs.length;
for (var i = 0; i < arrayLength; i++) {
if (CIDs[i] == received) {
found = true;
break;
};
};
} else {
CIDs = [];
}
if (!found) {
CIDs.push(received);
lscache.set('CIDs', CIDs, 60);
window.console && console.log("Sending new event to GA: " + received);
try {
ga('send', 'event', {
eventCategory: 'Live Chat',
eventAction: ga_events[pmessage.gacomm],
eventLabel: 'Chat Window'
});
} catch (err) {
window.console && console.error("Google Analytics UA code not found on page");
}
}
}
}
if (window.addEventListener) {
addEventListener("message", listener, false)
} else {
attachEvent("onmessage", listener)
}
} catch (err) {
window.console && console.error(err);
}
Track video chat events by updating your Chat Frame and Chat Window Javascript Includes.
Tracking messages contain specific video chat events that are assigned to individual Event Categories. This data is appended to _tEvents objects.
/* Chat Frame Javascript Include */
try {
var VIDEOCHAT_CATEGORY = 'Video Chat';
var trackEventByVideoSessionStatus = {
3: { event: "videochat-started", initiatedBy: "By Visitor"},
4: { event: "videochat-started", initiatedBy: "By Operator"},
7: { event: "videochat-ended", initiatedBy: "By Operator"},
8: { event: "videochat-ended", initiatedBy: "By Visitor"}
};
function sendtxt(txt, category, parameter) {
var message = JSON.stringify({
gacomm: txt,
eventCategory: category || 'Live Chat',
eventParameter: parameter || 'Chat Window'
});
parent.parent.postMessage(message, "*");
}
sendtxt(bcConfig.chatOptions.page);
window.console && console.log("Sent Chat Window Page: " + bcConfig.chatOptions.page);
if (bcConfig.chatOptions.page == "chat") {
var _tEvents = {
"new-message": "bc_newHistoryMessageCallback",
"video-support": "bc_chatWindowLoadedEventCallback",
"video-statechange": "bc_videochatStatusChangedCallback"
},
_tFunction = function(i, type, fName, value) {
if ((i == "new-message") && (bc.$("#bc-status-prompt").prev().hasClass("bc-operator-message"))) {
sendtxt("answered");
}
if ((i == "video-support")) {
if (bcConfig.videoSupport) {
sendtxt("videochat-available", VIDEOCHAT_CATEGORY);
}
else {
sendtxt("videochat-unavailable", VIDEOCHAT_CATEGORY);
}
}
if ((i == "video-statechange")) {
var trackEvent = trackEventByVideoSessionStatus[value];
if (trackEvent) {
sendtxt(trackEvent.event, VIDEOCHAT_CATEGORY, trackEvent.initiatedBy);
}
if (bcConfig.videoSupport.isAudioOnly && trackEvent && trackEvent.event === "videochat-started") {
sendtxt("videochat-audio-only", VIDEOCHAT_CATEGORY);
}
}
}
}
for (var i in _tEvents) {
window[_tEvents[i]] = _tFunction.bind(window, i, "function", _tEvents[i]);
}
} catch (err) {
window.console && console.error(err);
}
var ga_events = {
"prechat": 'PreChat Form Displayed',
"chat": "Chat Opened",
"answered": "Chat Answered",
"postchat": "Survey Displayed",
"email": "Email Form (Unavailable)",
"no-operators": "Unavailable Chat",
"chat-sent": "Survey Completed or Transcript",
"message-sent": "Unavailable Email Sent",
"final": "Chat Ended without Survey or Transcript",
"videochat-available": "Video Chat Available",
"videochat-unavailable": "Video Chat Unavailable",
"videochat-started": "Video Chat Started",
"videochat-ended": "Video Chat Ended",
"videochat-audio-only": "Chat is Audio Only"
}
Update the ga message to send new tracking parameters.
function listener(event) {
if (event.origin !== "https://livechat.boldchat.com") return;
var pmessage = JSON.parse(event.data);
if (pmessage.hasOwnProperty('gacomm')
&& pmessage.hasOwnProperty('eventCategory')
&& pmessage.hasOwnProperty('eventParameter')) {
window.console && console.log("Received: " + event.data);
var received = pmessage.gacomm + "-" + bcConfig.cid;
var found = false;
lscache.flushExpired();
CIDs = lscache.get('CIDs');
if (CIDs !== null) {
var arrayLength = CIDs.length;
for (var i = 0; i < arrayLength; i++) {
if (CIDs[i] == received) {
found = true;
break;
};
};
} else {
CIDs = [];
}
if (!found) {
CIDs.push(received);
lscache.set('CIDs', CIDs, 60);
window.console && console.log("Sending new event to GA: " + received);
try {
ga('send', 'event', {
eventCategory: pmessage.eventCategory,
eventAction: ga_events[pmessage.gacomm],
eventLabel: pmessage.eventParameter
});
} catch (err) {
window.console && console.error("Google Analytics UA code not found on page");
}
}
}
}
if (window.addEventListener) {
addEventListener("message", listener, false)
} else {
attachEvent("onmessage", listener)
}
} catch (err) {
window.console && console.error(err);
}
Events are reported with a few seconds' delay under the Real-Time Events section and they are processed and made available within 24 hours under the Behavior section as well as Dimensions in Custom Reports, allowing maximum flexibility to be tied to any other Google Analytics dimension and metric.
For troubleshooting purposes and to ensure that events are transmitted correctly, the code above outputs three log lines for each chat event in the browser console, if available.
Similarly, in case the Google Analytics code is not found by BoldChat on the hosting website page, the following error is thrown in the browser console, if available:
<!-- BoldChat Live Chat Button HTML v5.00 (Type=Web,ChatButton=7.1 T,Website=Trenton -->
<div style="text-align: center; white-space: nowrap;">
<script type="text/javascript">
var bccbId = Math.random(); document.write(unescape('%3Cdiv id=' + bccbId + '%3E%3C/div%3E'));
var _bcvma = _bcvma || [];
_bcvma.push(["setAccountID", "2307475884"]);
_bcvma.push(["setParameter", "WebsiteID", "665123557559499"]);
_bcvma.push(["setParameter", "SecureParameters", function(callback){ callback("61D2774599ABE6B36086DB65A32571F8D43F0D57170CFDE5A9CCF49AB38DD235FC151FD15F2F557163C73155E031C0B401D9124A5297746381791D589F7E6273Type=chat&ChatButtonDefID=58444531713309044&CustomURL=http://boldchat.com&VisitRef=a ref&VisitInfo=info&VisitEmail=email@gmail.com&VisitPhone=3166704000&URL=http://boldchat.com&ChatKey=Something unique to chat 1400085276518&VisitorKey=something unique to visitor&Expiration=1400085306518"); }]);
_bcvma.push(["addStatic", {type: "chat", bdid: "58444531713309044", id: bccbId}]);
var bcLoad = function(){
if(window.bcLoaded) return; window.bcLoaded = true;
var vms = document.createElement("script"); vms.type = "text/javascript"; vms.async = true;
vms.src = ('https:'==document.location.protocol?'https://':'http://') + "vmss.boldchat.com/aid/2307475884/bc.vms4/vms.js";
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(vms, s);
};
if(window.pageViewer && pageViewer.load) pageViewer.load();
else if(window.addEventListener) window.addEventListener('load', bcLoad, false);
else window.attachEvent('onload', bcLoad);
</script>
<span style="font-family: Arial; font-size: 8pt; color: black;"><a href="http://www.boldchat.com" style="text-decoration: none; color: black;">Live chat</a> by BoldChat</span>
</div>
<!-- /BoldChat Live Chat Button HTML v5.00 -->
<!-- BoldChat Live Chat Button HTML v5.00 (Type=HTML,ChatWindow=7.1 T,Department=Billing,Website=Trenton 2 -->
<div style="text-align: center; white-space: nowrap;">
<script type="text/javascript">
var bccbId = Math.random(); document.write(unescape('%3Cdiv id=' + bccbId + '%3E%3C/div%3E'));
window._bcvma = window._bcvma || [];
_bcvma.push(["setAccountID", "2307475884"]);
_bcvma.push(["setParameter", "WebsiteDefID", "665123557559499"]);
_bcvma.push(["setParameter", "SecureParameters", function(callback){ callback("61D2774599ABE6B36086DB65A32571F8D43F0D57170CFDE5A9CCF49AB38DD235FC151FD15F2F557163C73155E031C0B401D9124A5297746381791D589F7E6273Type=chat&DepartmentID=2401021351553992858&ChatWindowID=8972751348093551233&CustomURL=http://boldchat.com&VisitRef=a ref&VisitInfo=info&VisitEmail=email@gmail.com&VisitPhone=3166704000&URL=http://boldchat.com&ChatKey=Something unique to chat 1400085276518&VisitorKey=something unique to visitor&Expiration=1400085306518"); }]);
_bcvma.push(["addText", {type: "chat", department: "2401021351553992858", window: "8972751348093551233", available: "Chat is Available", unavailable: "Chat is Unavailable", id: bccbId}]);
var bcLoad = function(){
if(window.bcLoaded) return; window.bcLoaded = true;
var vms = document.createElement("script"); vms.type = "text/javascript"; vms.async = true;
vms.src = ('https:'==document.location.protocol?'https://':'http://') + "vmss.boldchat.com/aid/2307475884/bc.vms4/vms.js";
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(vms, s);
};
if(window.pageViewer && pageViewer.load) pageViewer.load();
else if(window.addEventListener) window.addEventListener('load', bcLoad, false);
else window.attachEvent('onload', bcLoad);
</script>
<span style="font-family: Arial; font-size: 8pt; color: black;"><a href="http://www.boldchat.com" style="text-decoration: none; color: black;">Live chat</a> by BoldChat</span>
</div>
<!-- /BoldChat Live Chat Button HTML v5.00 -->
<!-- BoldChat Visitor Monitor HTML v5.00 (Website=Trenton ,Ruleset=7.1 My Custom Chat Invitation (Ryan),Floating Chat=7.1 (Ryan) floating,Floating Call=- None - -->
<script type="text/javascript">
var _bcvma = _bcvma || [];
_bcvma.push(["setAccountID", "2307475884"]);
_bcvma.push(["setParameter", "WebsiteID", "665123557559499"]);
_bcvma.push(["setParameter", "SecureParameters", function(callback){ callback("7F305427D701DB665E5A273F259C9B1E6EFED73B512CCB779E7D31FCA789FE8488AA179278ED2F0DF5845F209FD1CC6A0FF6E27BD2151F218F73F4BFF8BF375FType=chat&FloatingChatButtonDefID=660128588754890&VisitName=floating&CustomURL=http://boldchat.com&VisitRef=a ref&VisitInfo=info&VisitEmail=email@gmail.com&VisitPhone=3166704000&URL=http://boldchat.com&ChatKey=Something unique to chat 1400085276518&VisitorKey=something unique to visitor&Expiration=1400085306518"); }]);
_bcvma.push(["addFloat", {type: "chat", id: "660128588754890"}]);
_bcvma.push(["setParameter", "SecureParameters", "1AC03C6EF0B1C46A96DE1CD9250D40EB4DF5C105837162AA063FC2B2424DA4870B34F1FB17BC35EB60A6576B32E092F6153BD1F9219BBAB388571FFAA183EB64Type=visit&InvitationID=2076721744768832302&VisitName=invite&VisitRef=a ref&VisitInfo=info&VisitEmail=email@gmail.com&VisitPhone=3166704000&URL=http://boldchat.com&ReferrerURL=https://google.com&VisitorKey=something unique to visitor&Expiration=1400085306518"]);
_bcvma.push(["pageViewed"]);
var bcLoad = function(){
if(window.bcLoaded) return; window.bcLoaded = true;
var vms = document.createElement("script"); vms.type = "text/javascript"; vms.async = true;
vms.src = ('https:'==document.location.protocol?'https://':'http://') + "vmss.boldchat.com/aid/2307475884/bc.vms4/vms.js";
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(vms, s);
};
if(window.pageViewer && pageViewer.load) pageViewer.load();
else if(window.addEventListener) window.addEventListener('load', bcLoad, false);
else window.attachEvent('onload', bcLoad);
</script>
<noscript>
<a href="http://www.boldchat.com" title="Live Chat Software" target="_blank"><img alt="Live Chat Software" src="https://vms.boldchat.com/aid/2307475884/bc.vmi?&wdid=665123557559499&secured=1AC03C6EF0B1C46A96DE1CD9250D40EB4DF5C105837162AA063FC2B2424DA4870B34F1FB17BC35EB60A6576B32E092F6153BD1F9219BBAB388571FFAA183EB64Type%3Dvisit%26InvitationID%3D2076721744768832302%26VisitName%3Dinvite%26VisitRef%3Da%20ref%26VisitInfo%3Dinfo%26VisitEmail%3Demail%40gmail.com%26VisitPhone%3D3166704000%26URL%3Dhttp%3A%2F%2Fboldchat.com%26ReferrerURL%3Dhttps%3A%2F%2Fgoogle.com%26VisitorKey%3Dsomething%20unique%20to%20visitor%26Expiration%3D1400085306518" border="0" width="1" height="1" /></a>
</noscript>
<!-- /BoldChat Visitor Monitor HTML v5.00 -->
<!-- BoldChat Conversion Tracking HTML v5.00 (Website=Trenton ,ConversionCode=account) -->
<script type="text/javascript">
var _bcvma = _bcvma || [];
_bcvma.push(["setAccountID", "2307475884"]);
_bcvma.push(["addConversion", {
SecureParameters: "53D52AC941C774AB8A0D0F575D12FE873A2CB861D57172A4E54BE897583E294E3B6B665129AF19DEAD041C6975E84D160B2B4FD0EC825A69FE606729F1F81776Type=conversion&ConversionCodeID=33221100&ConversionAmount=100.0&ConversionInfo=conversion info&ConversionRef=123456&Expiration=1400085306518",
WebsiteDefID: "665123557559499"
}]);
if(window.pageViewer && pageViewer.conversion) pageViewer.conversion(_bcct[_bcct.length-1]);
var bcLoad = function(){
if(window.bcLoaded) return; window.bcLoaded = true;
var vms = document.createElement("script"); vms.type = "text/javascript"; vms.async = true;
vms.src = ('https:'==document.location.protocol?'https://':'http://') + "vmss.boldchat.com/aid/2307475884/bc.vms4/vms.js";
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(vms, s);
};
if(window.pageViewer && pageViewer.load) pageViewer.load();
else if(window.addEventListener) window.addEventListener('load', bcLoad, false);
else window.attachEvent('onload', bcLoad);
</script>
<noscript>
<a href="http://www.boldchat.com" title="Live Chat Software" target="_blank"><img alt="Live Chat Software" src="https://vms.boldchat.com/aid/2307475884/bc.vci?wdid=665123557559499&secured=53D52AC941C774AB8A0D0F575D12FE873A2CB861D57172A4E54BE897583E294E3B6B665129AF19DEAD041C6975E84D160B2B4FD0EC825A69FE606729F1F81776Type%3Dconversion%26ConversionCodeID%3D33221100%26ConversionAmount%3D100.0%26ConversionInfo%3Dconversion%20info%26ConversionRef%3D123456%26Expiration%3D1400085306518" border="0" width="1" height="1" /></a>
</noscript>
<!-- /BoldChat Conversion Tracking HTML v5.00 -->
Here we use the Bouncy Castle APIs for performing PGP encryption: https://www.bouncycastle.org/
The methods illustrated in the samples below validate the parameter data by either encrypting it with the given PGP key or hashing it with the given hash key. The samples can be either embedded inline in jsp/asp.net or pulled out into utility classes/packages.
In the PGP examples that follow, the encryptionKey variable contains the public PGP key of the server, which is found in the Website setup. The signingKey variable contains your private PGP key.
Java PGP
import java.util.Date;
import java.util.Iterator;
import java.net.URLEncoder;
import java.security.KeyPairGenerator;
import java.security.SecureRandom;
import java.security.Security;
import java.security.MessageDigest;
import org.bouncycastle.openpgp.*;
import org.bouncycastle.openpgp.operator.*;
import org.bouncycastle.openpgp.operator.bc.*;
import org.bouncycastle.bcpg.*;
import java.io.*;
public class PGPUtil {
public static void main(String[] args) throws Exception {
Long accountID = 2307475884L;
Long websiteID = 665123557559499L;
Long chatButtonID = 58444531713309044L;
Long floatingChatButtonID = 660128588754890L;
String url = "http://boldchat.com";
String referrer = "http://google.com";
String chatKey = "Something unique to chat " + String.valueOf(System.currentTimeMillis());;
String visitorKey = "something unique to visitor";
String appendData = "&ChatKey=" + chatKey + "&VisitorKey=" + visitorKey + "&Expiration=" + String.valueOf(System.currentTimeMillis()+30000);
String customData = "&CustomURL=http://boldchat.com&VisitRef=a ref&VisitInfo=info&VisitEmail=email@gmail.com&VisitPhone=3166704000&URL="
+ URLEncoder.encode(url, "UTF-8") + "&ReferrerURL=" + URLEncoder.encode(referrer, "UTF-8");
String chat = "ChatButtonDefID=" + chatButtonID + customData + appendData;
String invite = "FloatingChatButtonDefID=" + floatingChatButtonID + "&InvitationDefID=2076721744768832302&VisitName=floating" + customData + appendData;
String conversion = "ConversionCodeID=33221100&ConversionAmount=100.0&ConversionInfo=conversion info" + appendData;
byte[] encryptionKey = "-----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EL+PbI9kEy08YiYE7qWC5JEwS2mhXiuAEFwst1P\r\n2sJmSsT9+mY=\r\n=tUYw\r\n-----END PGP PRIVATE KEY BLOCK-----\r\n".getBytes("UTF-8");
char[] password = "boldchat".toCharArray();
String encryptedChat = new String(PGPUtil.encrypt(chat.getBytes("UTF-8"), encryptionKey, signingKey, password), "UTF-8");
String encryptedInvite = new String(PGPUtil.encrypt(invite.getBytes("UTF-8"), encryptionKey, signingKey, password), "UTF-8");
String encryptedConversion = new String(PGPUtil.encrypt(conversion.getBytes("UTF-8"), encryptionKey, signingKey, password), "UTF-8");
System.out.println("Encrypted Chat SecureParameters: " + encryptedChat);
System.out.println("Encrypted Invite SecureParameters: " + encryptedInvite);
System.out.println("Encrypted Conversion SecureParameters: " + encryptedConversion);
}
public static byte[] encrypt(byte[] data, byte[] publicKeyData, byte[] privateKeyData, char[] passwd) throws Exception
{
ByteArrayOutputStream baos = new ByteArrayOutputStream();
OutputStream out = new ArmoredOutputStream(baos);
PGPPublicKey publicKey = null;
InputStream inputStream = org.bouncycastle.openpgp.PGPUtil.getDecoderStream(new ByteArrayInputStream(publicKeyData));
PGPPublicKeyRingCollection pgpPub = new PGPPublicKeyRingCollection(inputStream);
OUTER1: for (Iterator i=pgpPub.getKeyRings(); i.hasNext();){
for(Iterator j=((PGPPublicKeyRing)i.next()).getPublicKeys(); j.hasNext(); ){
PGPPublicKey k = (PGPPublicKey) j.next();
if(k.isEncryptionKey()) {
publicKey = k;
break OUTER1;
}
}
}
if(publicKey == null) throw new Exception("Can't find encryption key in key ring.");
PGPSecretKeyRingCollection pgpSec = new PGPSecretKeyRingCollection(org.bouncycastle.openpgp.PGPUtil.getDecoderStream(new ByteArrayInputStream(privateKeyData)));
PGPPrivateKey privateKey = null;
PGPSecretKey secretKey = null;
OUTER2: for(Iterator i=pgpSec.getKeyRings(); i.hasNext();){
PGPSecretKeyRing keyRing = (PGPSecretKeyRing) i.next();
for(Iterator j=keyRing.getSecretKeys(); j.hasNext();){
secretKey = (PGPSecretKey) j.next();
privateKey = secretKey.extractPrivateKey(new BcPBESecretKeyDecryptorBuilder(new BcPGPDigestCalculatorProvider()).build(passwd));
break OUTER2;
}
}
if(secretKey == null) throw new Exception("Can't find signature key in key ring.");
ByteArrayOutputStream cb = new ByteArrayOutputStream();
PGPCompressedDataGenerator compressedGenerator = new PGPCompressedDataGenerator(PGPCompressedData.ZIP);
OutputStream compressedOut = compressedGenerator.open(cb);
PGPSignatureGenerator signatureGenerator = new PGPSignatureGenerator(new BcPGPContentSignerBuilder(secretKey.getPublicKey().getAlgorithm(), HashAlgorithmTags.SHA512));
signatureGenerator.init(PGPSignature.BINARY_DOCUMENT, privateKey);
for(Iterator i=secretKey.getPublicKey().getUserIDs(); i.hasNext();){
PGPSignatureSubpacketGenerator spGen = new PGPSignatureSubpacketGenerator();
spGen.setSignerUserID(false, (String) i.next());
signatureGenerator.setHashedSubpackets(spGen.generate());
}
signatureGenerator.generateOnePassVersion(true).encode(compressedOut);
PGPLiteralDataGenerator lgen = new PGPLiteralDataGenerator();
OutputStream finalOut = lgen.open(compressedOut, PGPLiteralData.BINARY, "", new Date(), new byte[4096]);
finalOut.write(data);
signatureGenerator.update(data);
finalOut.close();
lgen.close();
signatureGenerator.generate().encode(compressedOut);
compressedGenerator.close();
compressedOut.close();
byte[] compressedData = cb.toByteArray();
PGPEncryptedDataGenerator encryptedDataGenerator = new PGPEncryptedDataGenerator(new BcPGPDataEncryptorBuilder(PGPEncryptedData.AES_256).setWithIntegrityPacket(true).setSecureRandom(new SecureRandom()));
encryptedDataGenerator.addMethod(new BcPublicKeyKeyEncryptionMethodGenerator(publicKey));
OutputStream encryptedOut = encryptedDataGenerator.open(out, compressedData.length);
encryptedOut.write(compressedData);
encryptedOut.close();
encryptedDataGenerator.close();
out.close();
return baos.toByteArray();
}
}
Java SHA-512
import java.net.URLEncoder;
import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
public class SHA512Util {
public static void main(String[] args) throws Exception {
Long chatButtonID = 58444531713309044L;
Long floatingChatButtonID = 660128588754890L;
Long expiration = System.currentTimeMillis();
String url = "http://boldchat.com";
String referrer = "http://google.com";
String chatKey = "Something unique to chat " + expiration;
String visitorKey = "something unique to visitor";
String appendData = "&ChatKey=" + chatKey + "&VisitorKey=" + visitorKey + "&Expiration=" + expiration;
String customData = "&CustomURL=http://boldchat.com&VisitRef=a ref&VisitInfo=info&VisitEmail=email@gmail.com&VisitPhone=3166704000&URL=" + URLEncoder.encode(url, "UTF-8") + "&ReferrerURL=" + URLEncoder.encode(referrer, "UTF-8");
String chat = "ChatButtonDefID=" + chatButtonID + customData + appendData;
String invite = "FloatingChatButtonDefID=" + floatingChatButtonID + "&InvitationDefID=2076721744768832302&VisitName=floating" + customData + appendData;
String conversion = "ConversionCodeID=33221100&ConversionAmount=100.0&ConversionInfo=conversion info" + appendData;
String hashKey = "uWalJOJ8sOqcVuobDSwBIr7+KofZAq0K9/b0h/JviTYFqjpS/d0uIeewf/kgQLEM";
String hashedChat = appendHash(chat, hashKey);
String hashedInvite = appendHash(invite, hashKey);
String hashedConversion = appendHash(conversion, hashKey);
System.out.println("Hashed Chat SecureParameters: " + hashedChat);
System.out.println("Hashed Invite SecureParameters: " + hashedInvite);
System.out.println("Hashed Conversion SecureParameters: " + hashedConversion);
}
final protected static String HMAC_SHA512 = "HmacSHA512";
public static String appendHash(String data, String hash) throws Exception {
SecretKeySpec keySpec = new SecretKeySpec(hash.getBytes("UTF-8"), HMAC_SHA512);
Mac hmac = Mac.getInstance(HMAC_SHA512);
hmac.init(keySpec);
byte[] hashBytes = hmac.doFinal(data.getBytes("UTF-8"));
String hashText = bytesToHex(hashBytes);
return hashText + data;
}
final protected static char[] hexArray = "0123456789ABCDEF".toCharArray();
public static String bytesToHex(byte[] bytes) {
char[] hexChars = new char[bytes.length * 2];
for(int j = 0; j < bytes.length; j++) {
int v = bytes[j] & 0xFF;
hexChars[j * 2] = hexArray[v >>> 4];
hexChars[j * 2 + 1] = hexArray[v & 0x0F];
}
return new String(hexChars);
}
}
C# PGP
using System;
using System.Collections;
using System.Linq;
using System.Text;
using System.IO;
using System.Security.Cryptography;
using Org.BouncyCastle.Bcpg;
using Org.BouncyCastle.Bcpg.OpenPgp;
class PgpUtil
{
static void Main(string[] args)
{
long accountID = 2307475884L;
long websiteID = 665123557559499L;
long chatButtonID = 58444531713309044L;
long floatingChatButtonID = 660128588754890L;
long expiration = (long)((DateTime.Now - DateTime.Parse("1/1/1970 0:0:0 GMT", System.Globalization.DateTimeFormatInfo.InvariantInfo, System.Globalization.DateTimeStyles.None).ToUniversalTime()).TotalMilliseconds + 30000);
string url = "http://boldchat.com";
string referrer = "http://google.com";
string chatKey = "Something unique to chat";
string visitorKey = "something unique to visitor";
string appendData = "&ChatKey=" + chatKey + "&VisitorKey=" + visitorKey + "&Expiration=" + expiration;
string customData = "&CustomURL=http://boldchat.com&VisitRef=a ref&VisitInfo=info&VisitEmail=email@gmail.com&VisitPhone=3166704000&URL="
+ Uri.EscapeUriString(url) + "&ReferrerURL=" + Uri.EscapeUriString(referrer);
string chat = "ChatButtonDefID=" + chatButtonID + customData + appendData;
string invite = "FloatingChatButtonDefID=" + floatingChatButtonID + "&InvitationDefID=2076721744768832302&VisitName=floating" + customData + appendData;
string conversion = "ConversionCodeID=33221100&ConversionAmount=100.0&ConversionInfo=conversion info" + appendData;
byte[] encryptionKey = Encoding.UTF8.GetBytes("-----BEGIN PGP PUBLIC KEY BLOCK-----\r\nVersion: BCPG v1.50\r\n\r\nmQENBFNnvrgDCACe2sn+PAHxG/fhfHgFNu4ClODlvrduchKS49AsILEsgB+ie1Yf\r\n3gz1j2JrIcwsEg1AAVPOHJvoXBjLJMoA0TfJbtVXP9S/9Q6XGuQgtOb/HVP5mDTZ\r\nwEGDQH5l6Oxob/xWBD8SAjlQoHzPwEsJMigZiFdQMDCUMIlpcSje3Om2ZGhZ7Qc0\r\ncw0PgR9Wk3NWzX38RqMkxlL+l2UPHvRU3e3nPEDvJSbFORz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jm\r\nKfc3fjDTYE5vi52ahphIFwgj3Vu6CmA7hb1WAuNR3C/oc+C0tXlqtX4joEpdkjwf\r\noNMyEOttiy3Nd2Y2toJ0lGN2LvVbune4JthBrP9oNGoTGS+amk9s2BFLQz+QUdzL\r\nERe+X1ovTuGV0LgILWG32c55b3hJXNwgZeqnGGoPw7+XgSFUb0AzYmDmZWrvPMUJ\r\nnM/bLLEtVsipGdYuBcopLuq9stxSxfXpyugXkuwmLd9GkUIaCup1f7Um+FTy9q8c\r\nAyjFkOojM9V2Zooft2AHHesvm6HGwfyiLKd20WXtv8jBmmx7C44Q9LJksM5zzTeH\r\n97EHMM5TEZu6BjyMCwOrhnYNOae9AIrNFB+Dr6ynm0R6Fn+1xO82RG1VXK6i3di/\r\nh1r8t6jBiQEfBBgDCgAJBQJT
Data obfuscation, or also known as data masking, is a security feature that allows you to replace potentially sensitive data with generic characters to ensure that sensitive information is safe. You can set data (for example, credit card numbers, social security or personal ID numbers, telephone numbers) to be replaced by generic characters either in real-time or once the chat has ended.
Result: The New Custom Chat Window is displayed.
Option | Description |
---|---|
When to Conceal |
|
What to Conceal |
Note: Currently, the following numbers are concealed as they are considered to be credit card numbers:
|
You can define the maximum period of waiting time for your customers before telling them that none of your agents is free to chat.
Enterprise subscribers can set Digital DX to validate all chats, visits, and conversions. Use this feature to ensure that incoming chats originate from the Website associated with the chat button and that chat and visit parameters provided by the visitor cannot be viewed or modified by any third party. When visitor monitoring and/or conversion tracking is enabled, this feature also ensures that the visit/conversion data originates from the website with the monitoring/conversion HTML code.
Data validation is set for a Website definition.
When enabled and required, all chat, visit, or conversion data must be validated as originating from your server before reaching an operator.
By selecting the All HTML must be associated with a Website definition option in General Account > Settings > Extra Security, and ensuring that all Website definitions require validation, every chat assigned to an agent of the account is guaranteed to be validated.
Data Validation Methods:
Both methods rely on a new parameter in the HTML: SecureParameters. This replaces custom variable parameters such as VisitRef and VisitInfo. Any visit, chat or conversion related data when validation is enabled that are not passed into the SecureParameters variable will be ignored by the server. Additionally, if security fails, the chat, visit or conversion will fail as well.
For browsers with JavaScript disabled, Digital DX loads an image inside the noscript tag to register the visit/conversion. In this case, use the parameter secured to pass the secured parameters.
Passed parameters should be URL-form encoded into a single string (for example, VisitName=Robert%20Smith&VisitEmail=r.smith%40gmail.com). This is what you will PGP encrypt, sign and pass as the SecureParameters variable. The final string passed in as the SecureParameters variable will look like this:
"-----BEGIN PGP MESSAGE-----\nVersion: BCPG v1.50\n\nhQEMA9/66abKVXSZAQf/UT+3OtVApwD0H+Fv2S5bXqMfkvHEQgbvXLwMiLPRy2gs\nv3L4EbMGMoIjt8Leg1D/M8bgbovYEs546LwXdAcOQt/n4c2+9WB8mph9lDW4+z9U\n5eWwwDjatrF8yKvpVM+g0+y8SEtuuBr2xrNfXBaCXRSyEN/88tl7drvIjzAg5lUV\nuPMtDvLnE9bAhu02FQx04Dc0lKGDROPlXCp/6tW6rXRmdvZfPRe4GDCzkHoZVOGR\nByNMD1swSIWC60IL5so4wWvmOqgP/fU57W2QNz7wmF9RtSG+L8zdhYX0BKdQAOVL\nKzhRtoMbBpNcT1m0prFhw40sfGDcVnPLJhD4RvLv79LBpwE2HeW3LNm6ZH45ou1A\nmIzik8ZGExDVLY4N9tax6goP1tYXTOq2Zc/XuwIQHhXMdEZaxeLppsjt1cOym/BV\n/2y8uPO8DPQa4jTXDPOsmLJpzAJMnk3EhMMaDDzOIS32i8IyY2sYPgd651ifXrO7\n38zCnPC6zMByBuwqvoT5xlELYE0KFRvm7fmYhYK2KHQrazneESRX0TnLrI3k6mSR\ndK/MSLVb5v6aNY6f/RySADE/XqhEJ8DVXRyN8Qum+vtl1PMGOothaFemT4bZbZ+8\nw7PKCZSFWqKcEZyk1eJl02V8u1VgmYkaya2vvLGFqTGxSVk6jALrPcIyCxW7z1XV\nVSwdraDtqMyJ6aAOkUEF5qidyupoajpyjxWRsaM5Al/VJOjR6u97fu9aSNtGNW73\nmmpqBh2MwbPvO5wWTadN3VLRowlkzNWIX0pdKvdA69fQ4NlGLra9bmH0ofjQuCl9\nNTRAqn5pbyb8aCyWtxMTtgxZwgNsdWMg0yYMLV+HdH3zVT6Bc+lExzOl5rxOXxbz\nQxj3Bqil615AQP2JIi4A6FQ0+Om1xNtm+t6eIFAR3GDYjaw+GgBv+r4mdXRfz/6I\nOQysntG1rMgCHjXg6B2y46PAp2tdVptJVcUhyz93m99MBT3nKtUmmb5sVHJRnmIg\nQjQv+3SKjVnMwncHveNXosBBeem2Vdrb+lVbI3eQ0XD/fEi43oQdl8hSNuqfw1jy\nDz4Gi2EaYyaDqrRMS6nEMaOujfD6zcPpbR8MSbmQTvmi5eOWPQZhopXrN2ogxtea\n5jUabllMN5PxGkXWBAhWG1hUVkYH8SMucQ==\n=/htM\n-----END PGP MESSAGE-----"
You can provide your public signing key on the New/Edit Website window. Digital DX uses it to generate a new server key in the back-end for encrypting the data and providing you a public key for encrypting the data. The server-side generated keys are 2048-bit, and we recommend you use the same key size for your signing key.
Data validation relies on asymmetrical cryptography: parameters are encrypted using your private key and the public key of the server. Digital DX decrypts parameters using its private server key and your public key.
For your first test, you can encrypt your data and pass it into the website setup data verification area. The server will decrypt it, verify the signature, and return the plain-text data or any error messages encountered.
The most secure method of validating chats is the full PGP encryption. However, for ease of implementation, we also support the SHA-512 hashing algorithm.
The parameters you want to pass should be URL-form encoded into a single string (for example, VisitName=Robert%20Smith&VisitEmail=r.smith%40gmail.com). The private hashing key will be concatenated in front of this value, and then hashed using the SHA-512 algorithm. The hashed value should then be hex-encoded and appended to the front of the SecureParameters variable. The final string passed in as the SecureParameters variable will look like this:
"1939D964B68EBFA61DE8C0B45D0C3C4836169C87DAB362116474A3B67B113B65F0172D3FA3191EC3525DA3E50B11A09B00B0A2869A1585EF148420347DE17A9EVisitName=Robert%20Smith&VisitEmail=r.smith%40gmail.com"
On the New/Edit Website window, you can create and delete the private hashing keys used to validate the visitor data.
For your first test, you can hash the key and data to append the data to the hash and pass it to the data verification area of the New/Edit Website window . The server will parse out and verify the hash, returning plain-text data or any error messages.
Once validation is enabled, you can use both original parameter names ("vr", "vn", etc.) and human-readable versions:
Friendly Name | Original | Meaning |
URL | url | The current page of the visitor (also the chat launch url when a chat is launched) |
ReferrerURL | referrer | The referring page of the visitor |
VisitName | vn | The name of the visitor |
VisitRef | vr | A reference value for the visitor |
VisitInfo | vi | An information value for the visitor |
VisitEmail | ve | The email address of the visitor |
VisitPhone | vp | The phone number of the visitor |
CustomURL | curl | The custom URL for the chat |
VisitorIcon | vicon | The chat icon for the visitor |
OperatorIcon | oicon | The default chat icon for the operator |
LastName | ln | The last name of the visitor |
FirstName | vn | The first name of the visitor (synonymous with VisitName) |
InitialQuestion | iq | The initial question for the visitor in chat |
ConversionRef | cr | The conversion reference value for the conversion (must be unique per conversion code) |
ConversionInfo | ci | An information value for the conversion |
ConversionAmount | ca | The amount of the conversion (should be a number simply as 1000.15 for one thousand and fifteen one hundredths) |
LanguageCode | lc | The language code for the chat |
customField_[name] | Value of the custom field with the given name |
Additional fields that require validation:
Friendly Name | Original | Meaning |
ChatButtonID | cbdid | The ID of the chat button used to launch the request (which will additionally set the department and chat window if not overridden with another parameter) |
FloatingChatButtonID | cbdid | The ID of the floating chat button used to launch the request (synonymous with ChatButtonDefID) |
ChatWindowID | cwdid | The ID of the chat window to show to the visitor in chat |
DepartmentID | rdid | The ID of the department to which the chat should be assigned |
OperatorID | roid | The ID of the operator to whom the chat should be assigned |
ConversionCodeID | ccid | The ID of the conversion code |
InvitationID | idid | The ID of the associated Auto-Invite Ruleset |
Finally, there are several validation-related fields for enhancing chat functionality once the chat is validated:
Friendly Name | Original | Meaning |
Type | type | The type of the request to enforce. Chat, visit, or conversion. Recommended on all requests. |
Expiration | expires | The time when the request should no longer be considered valid. Recommended on all requests. Counted in milliseconds from midnight 1970-01-01 UTC.
Note: The expiration should allow for a realistic duration of a session, and not too short.
|
ChatKey | ck | A unique identifier for this chat request. Repeated chat launches with this key will fail. Recommended on all chat-type requests.
Note: Assign this parameter to a session ID or similar to allow for launching more than a single validated chat during a session.
|
VisitorKey | vk | A unique identifier for this visitor. If an operator blocks the chat, it blocks any chat/visitor with this VisitorKey from re-launching chat. |
Unsecured | unsecured | An & separated list of parameter names. These parameters when not present in the validated data can be pulled from the query string of the request normally and/or changed/populated without server validation. For example: VisitName&InitialQuestion&VisitPhone (note the & must be URI encoded to %26 when it is part of the secure parameter string.) |
If you are using the chat API, the following parameters are required when the chat is created:
Friendly Name | Original | Meaning |
APIKey | APIKey | The API key being used. This must match the API key passed in through the authentication header. |
Data | Data | Pre-populated data passed into the chat. (Note: Individual fields must be listed in the 'Unsecured' parameter to not require validation.) |
Do not modify the HTML code generated by Digital DX as it may result in receiving errors. When you click Generate HTML on the Channels > Chat Buttons > HTML page, copy the complete generated code as is into the HTML source of the website that visitors see. Improper setup can result in the following errors:
If visitor monitoring or conversion tracking is not being generated correctly, use the verification area of the New/Edit Website window to verify that the data has not expired and that type is set correctly.
Sample generated HTML is given below. When HTML is generated with an associated Website definition that has Data validation enabled, the generated HTML includes the comment /* Requires Authentication */. This provides sample data that has not been validated. You can add or remove what is needed from the data on your server, then validate the data and replace the value (either with the hash appended in the case of SHA-512, or just the raw encrypted PGP data).
For chat launches, it is best to use the function callback method to make an asynchronous call to your server to validate the chat and return the validated data.
Set your site to monitor visitor activity without displaying a chat button upon entry. Use this solution when you want to be able to invite visitors to chat manually or according to certain criteria.
With this solution the primary connection between BoldChat and your site is a snippet of code called Visitor Monitor HTML.
This ensures that no button is displayed to visitors upon entering a site with Visitor Monitoring HTML.
BoldChat?s Visitor Monitoring tracks visitors on your website in real time and provides detailed information.
Gather information about visitors and pass it to BoldChat to help operators achieve business goals.
You can pass custom info and custom variables from the HTML code for a Chat Button, Visitor Monitoring, or Conversion Tracking. This article covers the variables that are available per HTML code type.
Select the Pass Custom Visitor Information option when generating Chat Button HTML.
Values are passed when the visitor initiates a chat. Values are shown on the operator grid together with the incoming chat.
Select the Pass Custom Visitor Information option when generating Visitor Monitoring HTML.
All variables are passed from one page to the next and remain set until a new value is passed. This allows for the Visitor Monitoring to maintain the associated value throughout the visit, as well as passing those values to the Conversion Code (see below).
Select the Pass Custom Conversion Information and Pass Custom Visitor Information options when generating Conversion Code HTML.
This section helps you implement custom variables and put them to use to solve business needs.
Variable values remain the same from page to page unless changed. With this in mind, we do not recommend using both Chat Button custom variables and Visitor Monitoring custom variables on the same page. A good example of why this is not necessary would be when a customer comes to your site and signs into their account. The Visitor Monitoring code sets the custom variables appropriate to the information from the customer's account. The customer then decides to launch a chat, these variable are then passed into the Pre-Chat form and pre-populate the form for the customer. By having the variables also available in the Chat button code, it opens the possibility of having the values from the Visitor Monitoring code overwritten by the Chat Button variable assignment.
Once the code containing your custom variable has been generated, you must edit the script to set the variable assignment. This is easily accomplished with a little JavaScript or with your preferred scripting language via the getPageViewer directive.
In the above highlighted example, customerId is a variable that you would create and associate the desired value from the page. Please notice that both vi variables have been set, this is necessary to ensure the variable assignment functions for both JavaScript enable and Non JavaScript enable browsers.
Now, let's take look at how you would set the value for customerId using a little JavaScript. Once the value is set it will then be passed to the vi variable, this occurs because we have set vi=customerId or more specifically, the value of customerId will be assigned to vi.
Assuming the value of the customer number is exposed in some way, such as an element identifier on the web page. For example, we used a div tag with an Id set to CustomerNumber; this identifies it and enables us to extract the inner value and then assign it to our variable. See below for a full code example.
The code above extracts the value from the div element (123456789) and then assigns it to customerId which in turn is then assigned to vi. Once this is assigned, it is available to be viewed in the visit grid within BoldChat.
You can pass custom information to BoldChat using custom variables via Chat Button or VMS code with the WindowParameters directive. The number of custom variables is not limited.
Let's say that you need to pass the following additional variables:
In this case, construct the WindowParameters directive as follows, where value1, value2 and value3 are the respective values:
var WindowParameters="customField_CampaignID=value1&customField_VisitorFromID=value2&customField_CreativeID=value3";
_bcvma.push(["setParameter", "WindowParameters", WindowParameters]);
Result: The custom variable and the new values now appear in the Chat Details window.
The primary connection between BoldChat and your site is always a snippet of HTML code that you generate in BoldChat and insert to your site.
The HTML snippet tells BoldChat servers how you are using BoldChat. When choosing an HTML snippet for your site, you are asking yourself the following questions:
Regardless of your reason for using BoldChat and the details of your exact implementation, you must integrate a BoldChat HTML snippet to create a "gate" between visitors and BoldChat servers.
When pasting the HTML code to your site, consider the following in light of your actual site architecture:
You must re-copy and re-insert your HTML code after making any of the following changes:
If you no longer want to display a chat window on a specific web page, remove the chat button code from the HTML source of that page.
The term chat button is used generally to refer to both Custom Chat Button definitions and Custom Floating Chat Button definitions.
It is important to understand that "chat button" does not refer to a simple button (as in the actual graphical user interface element a visitor clicks), but rather a complex group of settings associated with an actual button, buttons, or string of text. Together these settings make up a definition.
We recommend creating and managing Custom (static) Chat Button definitions and Floating Chat Button definitions from the following location: Setup > Account Setup > Chats.
A static chat button is a standard HTML button that is always displayed on your website as a static element. Whether it's a button or just a clickable string of text depends on how you configure your chat button definition.
Floating buttons are animated by default and they slide into view when the visitor moves the mouse over these buttons. When the button slides in, it covers part of your website, essentially creating an extra layer on top of your website content. You can define where the initial shrunk version of the button should appear on your website and how much it should shrunk before a visitor moves the mouse over it.
Chat button definitions can be associated with the following:
The direction of the relationship is from HTML snippet to chat button, and from chat button to window or department.
An HTML snippet can only be associated with one chat button definition. A chat button definition can only launch one specific chat window and can only be associated with one department, while a chat window can be launched from multiple buttons or invitations and a department can be associated with multiple buttons.
The chat button definition controls the following:
The following settings help determine when your chat button is shown to visitors:
This feature is part of the Custom Chat Button definition process for both floating and fixed-position buttons.
Result: The New Custom Button window is displayed.
Result: The settings are applied to the custom chat button definition.
To activate a newly created button definition as a chat entry point on your website, you must paste the HTML code to your site. When editing an existing button, you do not need to paste the code since these settings are not in the HTML code itself, but rather on the BoldChat server.
Associate a chat button with a department to allow chats originating from the button to be tagged with department metadata, which can then be used to assign and organize chats.
This feature is part of the Custom Chat Button definition process for both floating and fixed-position buttons.
Result: The New Custom Button window is displayed.
Result: The settings are applied to the custom chat button definition.
To activate a newly created button definition as a chat entry point on your website, you must paste the HTML code to your site. When editing an existing button, you do not need to paste the code since these settings are not in the HTML code itself, but rather on the BoldChat server.
Set a button that a visitor clicks to initiate a chat session.
When implementing chat, your visitors need something to click in order to start a chat session. The term chat entry point refers to the interface element that a visitor clicks to initiate a chat. You set a chat entry point as part of the procedure of generating and inserting an HTML snippet to your site.
Result: The Generate Chat Button HTML window is displayed.
See Collecting visitor data with Custom Visitor Info and Variables.
To ensure that visitors are properly informed about operator availability, you can choose to show a specific chat button image when at least one operator is available and another (or none) when no operators are available.
This feature is part of the Custom Chat Button definition process for both floating and fixed-position buttons.
Result: The New Custom Button window is displayed.
Result: The settings are applied to the custom chat button definition.
To activate a newly created button definition as a chat entry point on your website, you must paste the HTML code to your site. When editing an existing button, you do not need to paste the code since these settings are not in the HTML code itself, but rather on the BoldChat server.
Set a floating button that a visitor clicks to initiate a chat session.
When implementing chat, your visitors need something to click in order to start a chat session. The term chat entry point refers to the interface element that a visitor clicks to initiate a chat. You set a chat entry point as part of the procedure of generating and inserting an HTML snippet to your site.
Result: The Generate Visitor Monitor HTML window is displayed.
Take advantage of events and extend chat window features using JavaScript.
A layered chat window can trigger events during its life-cycle and allows you to work with JavaScript without restrictions.
Includes allow you to inject JavaScript code and attach event listeners to chat windows with different scopes:
Every layered chat window comprise a window and a frame object.
There are two ways to attach event listeners:
Can I remove a registered listener? Calling the addListener method prevents the listener to be cleared. Global functions can be removed.
Event | Global function name | Description | Arguments |
---|---|---|---|
new-message | bc_newHistoryMessageCallback | New message added to chat history |
|
chat-ended | bc_chatEndedEventCallback | Chat ended | |
push-page | bc_pushPageEventCallback | A PushPage request sent by the operator and the visitor accepts to be redirected to the target URL |
|
page-loaded | bc_chatWindowLoadedEventCallback | Page loaded | |
resize | bc_resizeEventCallback | Elements resized |
Event | Global function name | Description | Arguments |
---|---|---|---|
new-message | bc_newHistoryMessageCallback | New message added to chat history |
|
page-loaded | bc_chatWindowLoadedEventCallback | Page loaded | |
chat-ended | bc_chatEndedEventCallback | Chat ended | |
chat-closed | bc_chatClosedEventCallback | Chat closed | |
push-page | bc_pushPageEventCallback | A PushPage request sent by the operator and the visitor accepts to be redirected to the target URL |
|
resize | bc_resizeEventCallback | Elements resized | |
maximized | bc_chatWindowMaximizedEventCallback | Frame maximized | |
minimized | bc_chatWindowMinimizeEventCallback | Frame minimized |
The following snippets provide two different implementations of the same functionality.
iFrame object snippet (addListener method)
var _tEvents = {
"new-message": "bc_newHistoryMessageCallback",
"chat-closed": "bc_chatClosedEventCallback",
"chat-ended": "bc_chatEndedEventCallback",
"push-page": "bc_pushPageEventCallback",
"page-loaded": "bc_chatWindowLoadedEventCallback",
"resize": "bc_resizeEventCallback"
},
_tFunction = function(i, type, fName) {
console.warn("event \"" + i + "\" captured inside the frame with " + type + (fName ? " (function name is '" + fName + "')" : ""));
};
for (var i in _tEvents) {
mobileChat.addListener(i, _tFunction.bind(window, i, "listener"));
window[_tEvents[i]] = _tFunction.bind(window, i, "function", _tEvents[i]);
}
window object snippet (global function)
var _tEvents = {
"new-message": "bc_newHistoryMessageCallback",
"resize": "bc_resizeEventCallback",
"chat-closed": "bc_chatClosedEventCallback",
"chat-ended": "bc_chatEndedEventCallback",
"minimized": "bc_chatWindowMinimizeEventCallback",
"maximized": "bc_chatWindowMaximizedEventCallback",
"page-loaded": "bc_chatWindowLoadedEventCallback",
"push-page": "bc_pushPageEventCallback"
},
_tFunction = function(i, type, fName) {
console.warn("event \"" + i + "\" captured outside the frame with " + type + (fName ? " (function name is '" + fName + "')" : ""));
};
for (var i in _tEvents) {
mobileChat.addListener(i, _tFunction.bind(window, i, "listener"));
window[_tEvents[i]] = _tFunction.bind(window, i, "function", _tEvents[i]);
}
Pop-up chat windows open in a new browser window.
Branding options are grouped by complexity into Simple and Custom types, allowing you to customize:
A pop-up window has the following variables of individual elements:
Window texts, messages and labels are language-dependent, and not listed here. For more information, see The Website Definition (managing multiple sites).
Setting group | Key | Variable | Default value |
---|---|---|---|
Simple | Content Background Color (R,G,B) | content_background_color | #F0F0F0 |
Header Background Color | header_background_color | url('https://genesyscustomercare.nanorep.co/storage/nr1/kb/8AF2B933/8AF2BA4B/8C810D27/531/lightbulb_bg.png') | |
Text Color | text_color | #000000 | |
Text Font | text_font | verdana, arial, helvetica, sans-serif | |
Text Size | text_size | 12px |
Setting group | Key | Default value |
---|---|---|
Simple | Logo - Favicon URL | https://genesyscustomercare.nanorep.co/storage/nr1/kb/8AF2B933/8AF2BA4B/8C810D27/531/lightbulb_bg.pnghat.com/favicon.ico |
Logo Link URL | http://www.boldchat.com | |
Logo URL | https://genesyscustomercare.nanorep.co/storage/nr1/kb/8AF2B933/8AF2BA4B/8C810D27/531/lightbulb_bg.pnghat.com/ext/images/BoldChat_logo.png |
Includes allow you to inject custom JavaScript code, redesign the layout and fine-tune CSS settings in one place.
How can I determine the scope of CSS classes and their effect?
To customize your CSS code, you can inspect chat window elements to determine their scope using Chrome, Firefox, or a professional development tool. For more information, see Advanced features for chat window customization.
Group | Key | Type | Description |
---|---|---|---|
ActiveAssist | Cobrowse Stylesheet | CSS | |
Header/Footer | Footer Include | CSS | Defines the appearance of the footer bar |
Header/Footer | Head Include | CSS | Defines global styles |
Header/Footer | Header Include | CSS | Defines the appearance of the header bar |
Header/Footer | Navigation Include | HTML | Defines the structure of the navigation bar |
Header/Footer | Side Bar Left Include | HTML | |
Header/Footer | Side Bar Right Include | HTML |
Chat with visitors even when you don't share the same language. Messages are auto-translated in real time, if the language pair is available.
The image below shows auto-translation in action. Hover your mouse over the elements to see their function.
The left panel shows messages in your language. Translated messages are marked with a red asterisk.
The right panel shows messages in the visitor's language. Translated messages are marked with a red asterisk.
Visitors are notified in a system chat message when you are not chatting in the same language.
The language you are expected to use for outgoing messages is indicated at the bottom left of the Chat tab (?You are expected to type in X?). To chat in a different language, you must disable auto-translation before typing. Otherwise BoldChat will attempt to translate your conversation.
The language you are expected to use for outgoing messages is indicated in the status bar. If you want to chat with a visitor in a different language than indicated, remember to disable auto-translation before typing. Otherwise BoldChat will attempt to translate your conversation.
Click Translate > Set Language... and adjust the preferred language.
Click Preview in [language] to preview the message. To edit and format the translated message before sending, click Edit Preview.
Click Translate > Enable Auto-translation to switch real time translation on or off.
Contact your administrator to update the list of languages you speak.
Click to mark the selected text of your message as not translatable.
Yes. Once the chat is reassigned, the operator language is adjusted by the new operator's settings.
If you neither share a common language with the visitor nor any of your language pairs are supported by auto-translate, you and the visitor may not be able to understand each other. Contact your administrator to address the issue.
Result: The New Custom Chat Window is displayed.
What are the default fields? They are shown in the left panel of the Transcript Fields window.
Advanced customization options provide further flexibility to design and script your chat windows.
To customize your CSS code, you can inspect chat window elements to determine their scope using Chrome, Firefox, or a professional development tool.
Every layered chat window comprise a window and a frame object with different scopes.
When linking to external images, you can use the following HTTP protocol formats:
You can set a chat window to be displayed in any of seven pre-translated languages or 35 custom languages. There is no need to create multiple chat windows for multiple languages.
Result: The New Custom Chat Window is displayed.
Result: The Available Languages window is displayed with only pre-translated languages listed.
Don't see the language you want to add? Click List all languages to display languages for that have not been pre-translated.
The default language is shown to visitors when no translation is available in their own language.
Example: For example, if English is your default language, then a visitor from Poland will see the chat window in English unless you specifically selected Polish as a provided language and added a Polish translation.
Can I allow visitors to choose a language? Yes. Go to New Custom Chat Window > Pre-Chat Form > Enable > Language Selector.
How does BoldChat know which language to show to a visitor?Visitor language is determined as follows:
BoldChat looks for a branded (localized, translated) chat window for the chosen or detected language. If no branding exists, the default language is shown.
To choose the actual interface seen by visitors upon clicking a chat button, you must associate your Chat Button definition with a Chat Window definition.
This feature is part of the Custom Chat Button definition process for both floating and fixed-position buttons.
Result: The New Custom Button window is displayed.
Result: The settings are applied to the custom chat button definition.
To activate a newly created button definition as a chat entry point on your website, you must paste the HTML code to your site. When editing an existing button, you do not need to paste the code since these settings are not in the HTML code itself, but rather on the BoldChat server.
You can adapt the appearance, layout, content, and behavior of chat windows to match your branding.
This feature is part of the Custom Chat Window definition process. A chat window definition controls the look and feel and advanced behavior of the interface that is opened when a visitor clicks an associated button or link.
Option | Description |
---|---|
Simple | Simple settings control the basic appearance of the chat window, including your logo, window size and primary colors.
Tip: Select Simple if you are satisfied with the default texts, functionality and layout, but need to adjust the look of the chat window quickly and easily.
|
Custom | Custom settings provide access to every detail of the chat window and allows you to use advanced features, such as variables and key chaining. Simple settings are retained.
Tip: Select Custom if you need to customize an element of your window not available in simple mode. Options include window texts and messages, style sheets, color refinements and scripting.
|
Result: You are ready to set up your Layered Chat Window or Pop-up Chat Window.
A Chat Window or Custom Chat Window definition controls the look and feel and advanced behavior of the interface that is opened when a visitor clicks an associated button, link, or invitation. Chat windows can be layered or pop-up, and can be customized in a number of ways.
We recommend creating and managing chat windows from the following location: Setup > Account Setup > Chats > Custom Chat Windows.
Any chart window can be associated with any chat entry point or invitation:
The direction of the relationship is from button/invitation to window.
A button can only launch one specific chat window, while a chat window can be launched from multiple buttons or invitations.
It is important to understand that "chat window" does not refer to a simple window (as in the actual graphical user interface element a visitor sees), but rather a complex group of settings associated with that interface element. Together these settings make up a definition.
The chat window definition controls the following aspects of your visitors experience:
As the name suggests, a layered chat window appears as a new element on your page instead of as a new window. Layered windows are optimized for display on mobile devices, but many users prefer them for desktop browsers, as well.
A pop-up chat windows opens in a new browser window.
Each new BoldChat version comes with improvements or new features to chat windows. To avoid any adverse effects to your existing definitions, you can control when the upgrade process occurs and verify any changes.
To check if an upgrade is available, follow these steps:
Why would you upgrade your chat window definition?
The purpose of the Upgrade feature is to prevent a new release from breaking previously made customizations. You can copy your existing chat window definition to create a backup version. Then you can upgrade the backup to preview changes and see if you need to adjust your code customizations.
Even without seeing the Upgrade button, sometimes you may want to update the chat window or create a new one to apply newer features. This does not involve redeploying code, only creating new chat windows and linking those to chat buttons.
As the name suggests, a layered chat window appears as a new element on your page instead of as a new window. Layered windows are optimized for display on mobile devices, but many users prefer them for desktop browsers, as well.
Branding options are grouped by complexity into Simple and Custom types, allowing you to customize the following interface elements:
Hover your mouse over the image to see the corresponding variable of individual elements.
A layered window has the following variables of individual elements:
Window texts, messages and labels can be customized per language. See How to provide a chat window in multiple languages.
Key | Variable | Description |
---|---|---|
Content Background Color (R,G,B) | content_background_color
Default: 35, 35, 35 |
The background color of the inner chat window, where visitors see the messages. |
Content Background Transparency | background_transparency
Default: 0.65 |
The transparency of the inner chat window. |
General Text Color | text_color
Default: white |
The color of system messages and labels. |
General Text Font | text_font
Default: sans-serif |
The font family of system messages and labels. |
General Text Size | text_size
Default: 1em |
The font size of system messages and labels. |
Header Background Color | header_background_color
Default: #01A5EE |
The background color of the chat window's header. |
Header Font Color | header_font_color
Default: #FFFFFF |
The color of the label in the chat window's header. |
Message Input Container Background Color | message_input_container_background_color
Default: #232323 |
The border color of the message input field and the Send button at the bottom of the chat window. |
Operator Message - Message - Font Color | operator_message_font_color
Default: #E7E7E7 |
The color of operator messages. |
Operator Message - Name - Font Color | operator_message_sender_color
Default: #B2B2B2 |
The color of the operator's name. |
Operator Message - Time - Font Color | operator_message_sent_color
Default:#3DC8F3 |
The color of the time stamp when the operator sent the message. |
Operator Message Background Color | operator_background
Default: #232323 |
The background color of the operator message container. |
Visitor Message - Message - Font Color | visitor_message_font_color
Default: #FFFFFF |
The color of the visitor's message. |
Visitor Message - Name - Font Color | visitor_message_sender_color
Default: #FFFFFF |
The color of the visitor's name. |
Visitor Message - Time - Font Color | visitor_message_sent_color
Default: #FFFFFF |
The color of the time stamp when the visitor sent the message. |
Visitor Message Background Color | visitor_background
Default: #3DC8F3 |
The background color of the visitor message container. |
Key | Variable | Description |
---|---|---|
ActiveAssist Activity Background Color | aa_background
Default: ${form_background} |
The background color of the message that describes the ActiveAssist activity. |
ActiveAssist Activity Font Color | aa_color
Default: ${text_color} |
The color of the message that describes the co-browse activity. |
ActiveAssist Message - Message - Font Color | aa_message_font_color
Default: ${operator_message_font_color} |
The color of co-browse system messages. |
ActiveAssist Message - Name - Font Color | aa_message_sender_color
Default: ${operator_message_sender_color} |
The color of the agent's name who started the co-browse session. |
ActiveAssist Message - Time - Font Color | aa_message_sent_color
Default: ${operator_message_sent_color} |
The color of the time stamp when the agent started the co-browse activity. |
ActiveAssist Message Background Color | aa_message_background
Default: ${operator_background} |
The background color of the co-browse message container. |
Button Font Color | button_font_color
Default: ${text_color} |
The color of button labels. |
Dialog Background Color | dialog_background
Default: ${text_color} |
The background color of dialogs, such as when the agent asks the customer for remote control permission. |
Dialog Button Font Color | dialog_button_font_color
Default: ${text_color} |
The color of the button labels in chat window dialogs. |
Dialog Cancel Button Background Color | dialog_cancel_background
Default: ${form_background} |
The background color of the Cancel button in dialogs. |
Dialog Font Color | dialog_font_color
Default: ${form_background} |
The color of dialog texts. |
Dialog OK Button Background Color | dialog_ok_background
Default: ${button_background} |
The background color of the OK button in dialogs. |
Form Background Color | form_background
Default: ${message_input_container_background_color} |
The background color of the pre-chat and post-chat forms. |
Form Input Background Color | form_input_background
Default: ${form_background} |
The background color of the input fields in pre-chat and post-chat forms. |
Form Input Border Color | form_input_border_color
Default: #6F6F6F |
The border color of the pre-chat and post-chat forms. |
Form Input Error Border Color | form_input_error_border_color
Default: #FF0000 |
The border color of error messages in pre-chat and post-chat forms. For example, when the customer enters an invalid email address. |
Form Input Font Color | form_input_font_color
Default: ${text_color} |
The font color of the input field content in pre-chat and post-chat forms that the customer types. |
Form Input Placeholder Color | form_input_placeholder_color
Default: #666666 |
The font color of placeholders in the input fields of forms. |
Link Font Color | link_color
Default: #9F9F9F |
The color of links. |
Link Font Hover Color | link_hover_color
Default: #CFCFCF |
The color of links when the customer hovers over a link. |
Message Input Background Color | message_input_background
Default: #FFFFFF |
The background color of the input field, where customers type their messages. |
Message Input Font Color | message_input_font_color
Default: #000000 |
The color of customer messages as they type. |
Operator Activity Font Color | activity_color
Default: ${text_color} |
The color of the message about agent activity. |
Required Text Font Color | required_font_color
Default: #C9C9C9 |
The color of the "Required" label in forms. |
Status Message Background Color | status_background
Default: #FFFFFF |
The background color of status messages. |
Status Message Font Color | status_font_color
Default: #000000 |
The color of status messages. |
Key | Variable | Description |
---|---|---|
Icons - Header - Menu | icon_header_menu
Default: https://genesyscustomercare.nanorep.co/storage/nr1/kb/8AF2B933/8AF2BA4B/8C810D27/531/lightbulb_bg.png |
|
Icons - Header - Minimize | icon_header_minimize
Default: https://genesyscustomercare.nanorep.co/storage/nr1/kb/8AF2B933/8AF2BA4B/8C810D27/531/lightbulb_bg.pngs.boldchat.com/images/floating/minimize-arrow.png |
|
Icons - Menu - Minimize | icon_menu_minimize
Default: https://genesyscustomercare.nanorep.co/storage/nr1/kb/8AF2B933/8AF2BA4B/8C810D27/531/lightbulb_bg.pngs.boldchat.com/images/floating/minimize.png |
|
Icons - Menu - Close | icon_menu_close
Default: https://genesyscustomercare.nanorep.co/storage/nr1/kb/8AF2B933/8AF2BA4B/8C810D27/531/lightbulb_bg.pngs.boldchat.com/images/floating/close.png |
The Genesys DX (Bold360) platform will end of life on January 31st, 2024. This difficult decision was announced in March, 2023.
Genesys continues to make a strong commitment to Genesys Cloud, while tightening the portfolio to further accelerate feature growth on the platform. Part of that included bringing over key Genesys DX features to Genesys Cloud CX, such as Knowledge Optimizer that focuses on ease-of-use knowledge management. Digital only licenses for Genesys Cloud were also introduced late last year, which are suitable to those who are not looking for voice capabilities or who need agent seats that only feature support for digital channels.
As of January 31st, 2024, access to Genesys DX product interfaces and customer-deployed components stop to function. Users will no longer be able to log into product interfaces, and all of the boldchat/bold360/nanorep domains will become unavailable for use. If you are curious on what the code on your website related to this might look like and how to remove it, we encourage referencing this post on the DX community.
After January 31st, 2024, admins will still be able to get access for an additional 30 days. This period is meant to allow for extracting the necessary data from the platform. Historical data extraction from your account will be available to retrieve by data extraction APIs (Bold360 APIs and Nanorep APIs).
Every year, Genesys® orchestrates billions of remarkable customer experiences for organizations in more than 100 countries. Through the power of our cloud, digital and AI technologies, organizations can realize Experience as a Service℠, our vision for empathetic customer experiences at scale. With Genesys, organizations have the power to deliver proactive, predictive, and hyper personalized experiences to deepen their customer connection across every marketing, sales, and service moment on any channel, while also improving employee productivity and engagement. By transforming back-office technology to a modern revenue velocity engine Genesys enables true intimacy at scale to foster customer trust and loyalty.
Copyright © 2022 Genesys. All rights reserved.
Terms of Use | Privacy Policy | Email Subscription | Accessibility Feedback | Cookie Preferences