Hide Chat Icon when No Agents are Available

Administrators now have the ability to configure the chat launch icon to only be shown if there is an agent (presumably human, but not necessarily) available for at least one of the queues specified. If no agents are available, then the chat icon is hidden. Also, when configuring chat, many values, such as the wcfsCdnPath and i18n are defaulted so that no error occurs if those attributes are not explicitly defined.

This avoids the situation where employees launch the chat initiation page, expecting to be connected to a live agent, but the chat is queued indefinitely when no human agents are available.

Steps to enable and configure

Leverage the Visual Builder Studio to expose your applications. To learn more about extending your application using Visual Builder, visit Oracle Help Center > your apps service area of interest > Books > Configuration and Extension.

NOTE: You no longer need to explicitly define the "wcfsCdnPath" and recommend that it be removed. However, if you wish to explicitly define this, conditional chat will work only with version 25.10 or greater, so this value will need to be changed to:
"wcfsCdnPath": "https://ee.channels.ocs.oraclecloud.com/wcfs/25.10.0/wcfs-sdk.js"

To configure conditional chat:

  1. From the Navigator, go to Configuration -> Visual Builder, and open the appropriate project and workspace.
  2. Within Visual Builder Studio, navigate to App UIs -> Customer Experience (CX) -> Help Desk -> helpdesk in the left-hand panel.
  3. Click on the Variables tab.
  4. Click on the chatSetup variable and replace the JSON to set the enableChat variable to include the conditional chat launch attribute and specify those queues that should be considered when considering whether an agent is available or not, like so:
"conditionalLaunchButton":"liveAgent","conditionalLaunchButtonDetails":{"queueId":"<queueId1>, <queueId2>"},

An example that can be used directly when first setting up a chat with only a single default chat queue (whose value you would need to provide) is:

{
    "enableChat": true,
    "conditionalLaunchButton": "liveAgent",
    "conditionalLaunchButtonDetails": {
        "queueId": "<queueId>"
    },
    "launchForm": [
         {
            "name": "subject",
            "required": false,
            "relaunchValue": "clear"
        }
    ]
}

And, here is a more complex example, with example values being used for the queue IDs:

{
    "enableChat": true,
    "position": {
        "bottom": "10px",
        "right": "10px"
    },
    "conditionalLaunchButton": "liveAgent",
    "conditionalLaunchButtonDetails": {
        "queueId": "300100714595596,300100721412398,30100714595611,300100714595599,300100714595602"
    },
    "launchForm": [
        {
            "name": "serviceRequestNumber",
            "required": false,
            "relaunchValue": "keep"
        },
        {
            "name": "subject",
            "required": false,
            "relaunchValue": "clear"
        },
        {
            "name": "stripeCode",
            "required": true,
            "relaunchValue": "default",
            "options": [
                {
                    "value": "ORA_SVC_HRHD",
                    "text": "Personnel/Personal Issue (HRHD)"
                },
                {
                    "value": "ORA_SVC_ISR",
                    "text": "Business Issue (ISR)"
                }
            ]
        },
        {
            "name": "queueId",
            "required": true,
            "relaunchValue": "clear",
            "options": [
                {
                    "value": "300100714595596",
                    "text": "Benefits"
                },
                {
                    "value": "300100714595602",
                    "text": "Complaint/Grievance"
                },
                {
                    "value": "300100714595599",
                    "text": "Payroll"
                },
                {
                    "value": "300100714595605",
                    "text": "Employment Changes"
                },
                {
                    "value": "300100714595611",
                    "text": "Maintenance Requests"
                },
                {
                    "value": "300100721412398",
                    "text": "Sales Support"
                },
                {
                    "value": "300100714595608",
                    "text": "Other HR Question"
                }
            ]
        }
    ],
    "i18n": {
        "en": {
            "chatTitle": "Live Chat Agent\nAvailable M-F,\n 6AM-11PM ET",
            "postConversationMessage": "What's Next?",
            "postConversationPrintButtonLabel": "Save Chat Transcript"
        }
    },
    "postConversationMessageOptions": {
        "type": "message",
        "enablePrintButton": true
    }
}

Tips and considerations

It is highly recommended that you have chat enabled and working first, using the instructions found at How do I configure live chat for Help Desk?, before adding any additional attributes.

Key resources

For an example of how to configure live chat generally, refer to How do I configure live chat for Help Desk? and Live Chat with Multiple Queues (WN 24B) - Oracle Video Hub.

Access requirements

For Employees to have ability to chat with an agent, they should have the Help Desk User role.

Chat Agents must be given the privilege Use Chat Agent Features, which is given to the duty role Chat Agent by default.

All out-of-the-box agent roles are also given the privilege View Chat Transcript.

Administrators who are first configuring Chat should have the Service Request Administrator job role (at least temporarily while setting up the chat) and either the HR Service Request Administration or Internal Service Request Administration role or a similar role having the Setup Service privilege.