myContactCenterManual

acdHub — check opening and availability

Use skill opening queries and calendars on a website through the SignalR acdHub.

Endpoint: /acdHub. Create a separate SignalR connection for this hub. Pass the skill name as skill.

Method Arguments Return value
IsOpen skill boolean opening state
IsManualOpen skill boolean manual opening state
IsCalendarOpen skill boolean state according to business hours
IsHolidayOpen skill boolean state according to holidays
NextOpenDate skill, testTime next opening time; the default value "0001-01-01T00:00:00" for testTime uses server time
GetHolidaysiCalendar skill holiday calendar as iCalendar text
GetHolidaysvCalendar skill holiday calendar as vCalendar text
GetBusinessHoursiCalendar skill business hours as iCalendar text
GetBusinessHoursvCalendar skill business hours as vCalendar text

Example after loading the SignalR library:

const acd = new signalR.HubConnectionBuilder()
    .withUrl("https://kontakt.example.org/acdHub")
    .build();
await acd.start();
const isOpen = await acd.invoke("IsOpen", "Support");
document.getElementById("serviceStatus").textContent =
    isOpen ? "Open" : "Closed";
await acd.stop();

Place this example in a JavaScript module or an asynchronous function. The website needs an element with ID serviceStatus.

Opening does not mean an agent is immediately free. Treat the display as a snapshot and consider business hours.

Other methods and limitations

The hub also contains GetNumberOfQualifiedAgents(skill, language, skillQualificationType), GetNumberOfAvailableAgents with the same arguments, and GetNumberOfAgents(skill, language, available, useEscalatableAgentsOnly, skillQualificationType). Each returns an integer. The qualification type is a numeric SkillQualificationType value. In the documented version, Chat = 5 and WebCallback = 6.

GetNumberOfConversations(skill, language, conversationState, conversationType) returns a count. The code applies filters in stages: a state filter without a corresponding type filter is ignored. Pass the appropriate default values explicitly for unfiltered arguments; omitted SignalR arguments do not automatically become default parameters.

The existing GetAVGWaitTime, GetAVGConnectTime and GetAVGTime methods call themselves in the documented version. Do not use them for a website display. They do not provide reliable average queries in this version.

    ↑ ↓ select · Enter open · Esc close