The below is what I am using, with my org info and queue. When I load this on the site, it works as it should, directs to the queue I have designated. I am just trying to remove the Agent Email from the web form, when I removed what I have striked out on the web form, the chat no longer works.
<form id="chatForm">
<h3>Participant Information- local</h3>
<table class="webchat-config">
<tbody>
<tr>
<th>First Name:</th>
<td><input type="text" id="first-name" value="" /></td>
</tr>
<tr>
<th>Last Name:</th>
<td><input type="text" id="last-name" value="" /></td>
</tr>
<tr>
<th>Agent Email:</th> <td><input type="text" id="agent-email" value="alex.agent@example.com" /></td> </tr>
</tbody>
</table>
<button type="button" id="chat-button">Start Chat</button>
</form>
<div id="chat-container" style="height:600px"></div>
<script src="https://code.jquery.com/jquery-3.2.1.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>
<script
id="purecloud-webchat-js"
type="text/javascript"
src="https://apps.mypurecloud.com/webchat/jsapi-v1.js"
region="us-east-1"
org-guid="MY ORG GUID"
deployment-key=""MY DEPLOYMENT KEY"
></script>
<script type="text/javascript">
$(document).ready(function initializeChat () {
var chatConfig = {
// Web chat application URL
webchatAppUrl: 'https://apps.mypurecloud.com/webchat',
// Web chat service URL
webchatServiceUrl: 'https://realtime.mypurecloud.com:443',
// organization GUID
orgGuid: '',
// Numeric organization ID
orgId: MY ORG ID ,
// Organization name. Replace with your org name.
orgName: '',
// Requested agent language skill (Agent must have this language skill to receive chat)
language: 'English - Written',
// Requested agent skills (Agent must have these skills to receive chat)
skills: ['Mike Test Chat'],
// OR
//skills: [],
// Priority
priority: 0,
// Queue Name
queueName : 'Z_Mike_Test_Queue 1',
------------------------------
Michael McQuaid
AdaptHealth LLC
------------------------------
Original Message:
Sent: 02-19-2020 15:59
From: George Ganahl
Subject: Genesys Cloud (PureCloud) Chat Widget
Did you try the recommended sample format instead?
(function(window) { var chatConfig = { webchatAppUrl: 'https://apps.mypurecloud.com/webchat', webchatServiceUrl: 'https://realtime.mypurecloud.com:443', orgGuid: 'YOUR_GUID_HERE', orgId: 'YOUR_ID_HERE', orgName: 'YOUR_ORGNAME_HERE', queueName : 'Support', chatNowElement: 'start-purecloud-chat', logLevel: 'INFO', reconnectEnabled: true, reconnectOrigins: [ 'https://example.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);
------------------------------
George Ganahl GCP (PureCloud), ICCE
Principal Technology Consultant
Genesys
Original Message:
Sent: 02-19-2020 15:21
From: Michael McQuaid
Subject: Genesys Cloud (PureCloud) Chat Widget
That makes sense, but when I use queue and remove the agent email form the web widget, it breaks the widget, this is what is strange to me, I would not want to specify an agent it goes to, just the queue.
------------------------------
Michael McQuaid
AdaptHealth LLC
Original Message:
Sent: 02-19-2020 15:12
From: George Ganahl
Subject: Genesys Cloud (PureCloud) Chat Widget
There is a lot more information on how to configure the Chat Widget in the Developer Center:
https://developer.mypurecloud.com/api/webchat/
Regarding the agent-email value:
-
queueName- The queue name that receives chat messages. Example: 'Support' Note: You must specify a queueName or agentEmail. If you specify both, agentEmail takes precedence.
-
agentEmail - The email address for the agent that receives chat messages. Example: 'john.smith@example.com' Note: You must specify a queueName or agentEmail. If you specify both, agentEmail takes precedence.
------------------------------
George Ganahl GCP (PureCloud), ICCE
Principal Technology Consultant
Genesys
Original Message:
Sent: 02-19-2020 15:00
From: Michael McQuaid
Subject: Genesys Cloud (PureCloud) Chat Widget
Hi,
I recently set up the basic chat widget that is provide on the Genesys site. There are 3 fields by default
1. First Name "John"
2. Last Name "Doe"
3. Agent Email "alex.agent@example.com"
I noticed then if I take the agent email portion out of the code, the chat no longer establishes a call to the queue it it set up to call to.
This works
<table class="webchat-config"> <tbody> <tr> <th>First Name:</th> <td><input type="text" id="first-name" value="John" /></td> </tr> <tr> <th>Last Name:</th> <td><input type="text" id="last-name" value="Doe" /></td> </tr> <tr> <th>Agent Email:</th> <td><input type="text" id="agent-email" value="alex.agent@example.com" /></td> </tr>
This does not
<table class="webchat-config"> <tbody> <tr> <th>First Name:</th> <td><input type="text" id="first-name" value="John" /></td> </tr> <tr> <th>Last Name:</th> <td><input type="text" id="last-name" value="Doe" /></td> </tr>
#PlatformAdministration
------------------------------
Michael McQuaid
AdaptHealth LLC
------------------------------