Introduction
RTE (Real-Time Engine) is a component providing real-time data updates to browsers or native clients. It enables the clients to receive updated information about user availabilities, queue statuses, new callback items, etc. with a real-time notification instead of having to constantly poll the API. This produces a better user experience and greatly decreases the load inflicted on our infrastructure.
RTE is a based on Microsoft .NET Core 3.1 SignalR library (see docs.microsoft.com).
Note that Benemen was renamed to Enreach in 2022, and corresponding naming changes were applied to technical products and documentation as well. Some documentation and technical details (XML namespaces, domain names) may still contain Benemen references.
Client authentication
RTE authenticates clients with a JWT generated by EnreachAPI. The client gets the RTE token from EnreachAPI and passes it as a parameter to establish a connection with the RTE hub. If the user got authenticated successfully a WebSocket connection will be established, otherwise, the client will get 401 (Unauthorized) as a response. JWT is validated only when a new connection is established. Token lifetime is limited and clients must get a new token if reconnection is needed.

Interface
RTE provides public interface to establish connection and manage the subscriptions.
Establishing a connection
A new connection can be created using HubConnectionBuilder with a designated route. RTE url and authentication token are obtained via EnreachAPI.
Please note that HubConnectionBuilder class is a part of 3rd party library provided by Microsoft.
//signalr.js from Microsoft must be referenced on the page
var connection = new signalR.HubConnectionBuilder()
.withUrl(rteUrl, { accessTokenFactory: () => GetToken() })
.withAutomaticReconnect()
.build();
using Microsoft.AspNetCore.SignalR.Client;
...
...
var RTEHubConnection = new HubConnectionBuilder()
.WithUrl(rteUrl, options =>
{
options.Transports = Microsoft.AspNetCore.Http.Connections.HttpTransportType.WebSockets;
options.AccessTokenProvider = () => Task.FromResult(RTEToken);
}).Build();
Subscribing to events
When connection is established it is possible to subscribe for the specific events and define handlers to process subscription results and arrived event’s data. 'Subscribe' method accepts an array of json objects containing EntityId and EventName:
[
{ EntityId: "a1eeb030-ff4b-ea11-ac9c-00155d4fdcf3", EventName: "UserAvailability" },
{EntityId: "cbeeb190-ff4b-ea11-ac9c-00155d4fdcf3", EventName: "QueueCallIncoming"}]
Event name list can be retrieved by calling AvailableSubscriptions method.
Subscription validation and authorization
Every subscription item is validated with the following logic:
- Is EntityId a valid Guid type. If not - validation failed, "Invalid EntityId" will be returned as validation result.
- Does EventName have a valid name. If not - validation failed, "Invalid event name" will be returned as validation result.
- Does the current user have permission to subscribe to this event. If not - validation failed, "Unauthorized" will be returned as validation result.
Validation result example:
[{"subscribed":true,"message":null,"entityId":"c9eeb030-ff4b-ea11-ac9c-00155d4fdcf3","eventName":"usercallincoming"},{"subscribed":false,"message":"Unauthorized","entityId":"c9eeb030-ff4b-ea11-ac9c-00155d4fdcf3","eventName":"queuecallinuserallocated"}]
var subscriptions = new Array();
subscriptions.push({
EntityId: "a1eeb030-ff4b-ea11-ac9c-00155d4fdcf3",
EventName: "UserAvailability"
});
subscriptions.push({
EntityId: "c9eeb030-ff4b-ea11-ac9c-00155d4fdcf3",
EventName: "UserCallIncoming"
});
// This will call 'Subscribe' method.
connection.invoke("Subscribe", subscriptions).then(function (payload) {
console.log("Subscription result: " + JSON.stringify(payload));
}).catch(function (err) {
return console.error(err.toString());
});
// Handler to process subscription data
connection.on("MessageReceived", function (message) {
console.log("Message details: " + message.subscription);
});
public class ClientSubscriptionModel
{
public string EntityId { get; set; }
public string EventName { get; set; }
}
public class RTEMessage
{
public ClientSubscriptionModel Subscription { get; set; }
public dynamic Data { get; set; }
}
RTEHubConnection.On<RTEMessage>("MessageReceived", (message) =>
{
RTE_Message_Received(message.subscription, message.data);
});
ClientSubscriptionModel[] subscriptions = new ClientSubscriptionModel[2];
subscriptions[0] = new ClientSubscriptionModel
{
EntityId = "a1eeb030-ff4b-ea11-ac9c-00155d4fdcf3",
EventName = "UserAvailability"
};
subscriptions[0] = new ClientSubscriptionModel
{
EntityId = "c9eeb030-ff4b-ea11-ac9c-00155d4fdcf3",
EventName = "UserCallIncoming"
};
RTEHubConnection.InvokeAsync("Subscribe", subscriptions);
public void RTE_Message_Received(ClientSubscriptionModel subscription, dynamic payload)
{
}
Unsubscribing
it is possible to unsubscribe from a specific events or all events at once. 'Unsubscribe' method accepts an array of json objects containing EntityId and EventName:
[{ EntityId: "a1eeb030-ff4b-ea11-ac9c-00155d4fdcf3", EventName: "UserAvailability" },{EntityId: "cbeeb190-ff4b-ea11-ac9c-00155d4fdcf3", EventName: "QueueCallIncoming"}]
Unsubscribe result example:
[{"subscribed":false,"message":null,"entityId":"c9eeb030-ff4b-ea11-ac9c-00155d4fdcf3","eventName":"useravailability"},{"subscribed":false,"message":null,"entityId":"c9eeb030-ff4b-ea11-ac9c-00155d4fdcf3","eventName":"queuecallincoming"}]
var subscriptions = new Array();
subscriptions.push({
EntityId: "a1eeb030-ff4b-ea11-ac9c-00155d4fdcf3",
EventName: "UserAvailability"
});
connection.invoke("Unsubscribe", subscriptions).then(function (payload) {
console.log("Unsubscription result: " + JSON.stringify(payload));
}).catch(function (err) {
return console.error(err.toString());
});
//This will delete all subscriptions and return true on success.
connection.invoke("UnsubscribeAll", subscriptions).then(function (payload) {
console.log("UnsubscribeAll result: " + JSON.stringify(payload));
}).catch(function (err) {
return console.error(err.toString());
});
Available subscription events
All available subscription events can be retrieved by calling "AvailableSubscriptions" method. The result will be presented as an array of strings where each item is an event name.
connection.invoke("AvailableSubscriptions", subscriptions).then(function (payload) {
console.log("Available subscriptions " + JSON.stringify(payload));
}).catch(function (err) {
return console.error(err.toString());
});
Client library
Data access client libary is a typescript library that provides a public interface to access Enreach data via EnreachAPI and RTE. Latest package can be found in gittab: ( https://gitlab.com/benemen/core/da-client-lib) .
Usage
DA service constructor requires 2 manadatory parameters: RTE serever url and JWT (can be retrieved via EnreachAPI)
let daService = new DAClientLib.DAService(rteUrl, jwt);
Connect
Establishes connection to RTE Server. Returns a promise that is resolved with 'true' boolean on connection success.
daService.Connect().then(function (result) {
if (result) console.log("connected") else console.log("connection error");
});
Subscribe
Method accepts an array of json objects containing EntityId and EventName:
[
{ EntityId: "a1eeb030-ff4b-ea11-ac9c-00155d4fdcf3", EventName: "UserAvailability" },
{EntityId: "cbeeb190-ff4b-ea11-ac9c-00155d4fdcf3", EventName: "QueueCallIncoming"}]
daService.Subscribe(subscriptions).then(function (payload) {
console.log("Subscription result: " + JSON.stringify(payload));
}).catch(function (err) {
return console.error(err.toString());
});
SubscriptionDataChanged event
When any subscription data was changed the client will get a result if it is subscribed for OnSubscriptionDataChanged event.
daService.OnSubscriptionDataChanged.on((message) => {
console.log("Subscription result: " + JSON.stringify(message.subscription, null, 2) + ". Data: " + JSON.stringify(message.data, null, 2));
});
Get active subscriptions
Method return list of active subscriptions
daService.GetActiveSubscriptions().then(function (payload) {
console.log("GetActiveSubscriptions result: " + JSON.stringify(payload));
}).catch(function (err) {
return console.error(err.toString());
});
Unsubscribe
it is possible to unsubscribe from a specific events or all events at once. 'Unsubscribe' method accepts an array of json objects containing EntityId and EventName:
` [{ EntityId: "a1eeb030-ff4b-ea11-ac9c-00155d4fdcf3", EventName: "UserAvailability" },{EntityId: "cbeeb190-ff4b-ea11-ac9c-00155d4fdcf3", EventName: "QueueCallIncoming"}]
Returns a promise that is resolved with a list of the specified events statuses ('subscribed' true or false) on success.
daService.Unsubscribe(subscriptions).then(function (payload) {
console.log("Unsubscription result: " + JSON.stringify(payload));
}).catch(function (err) {
return console.error(err.toString());
});
UnsubscribeAll
Unsubscribe from all events. Returns a promise that is resolved with 'true' boolean value on success.
daService.UnsubscribeAll().then(function (payload) {
console.log("Unsubscription result: " + JSON.stringify(payload));
}).catch(function (err) {
return console.error(err.toString());
});
Get Available subscription events
All available subscription events can be retrieved by calling "AvailableSubscriptions" method. The result will be presented as an array of strings where each item is an event name.
daService.GetAvailableSubscriptionEvents().then(function (payload) {
console.log("AvailableSubscriptionEvents result: " + JSON.stringify(payload));
}).catch(function (err) {
return console.error(err.toString());
});
User
Event: UserActionMobileCall
This is produced via the API. It instructs the users mobile app to initiate a call to given number.
| Property name | Value type | Description |
|---|---|---|
| OrganizationId | Guid | Id of related organization. |
| PhoneNumber | string | PhoneNumber where to call. |
| UserId | Guid | Id of target user. |
Event: UserAlert
This is emitted when a service pool alert defined by the user is triggered.
| Property name | Value type | Description |
|---|---|---|
| AlertId | Guid | Id of alert. |
| ConditionExpression | string | Expression of the triggered condition. |
| ConditionName | string | Name of the triggered condition. |
| ConditionValue | string | Value of the triggered condition. |
| OrganizationId | Guid | Id of related organization. |
| UserId | Guid | Id of target user. |
| Value | string | Actual value for the triggered condition. |
Event: UserAssistedCallbackRequest
Produced when a call event has happened for a callback request.
| Property name | Value type | Description |
|---|---|---|
| CallBackId | Guid | CallBack Id this event relates to. |
| CallbackRelatedItems | List<CallbackRelatedItem> | All related items |
| CallEvent | string | Call event: currently "init" (call our or allocation). Optional if needed: "connected" and "terminate" |
| CallId | Guid | Call id request was generated from |
| CallListId | Guid | Corresponding list id |
| CallType | string | Call type: currently possible "userout", "userin", "servicein" |
| ContactNumber | string | Callback's contact number |
| OrganizationId | Guid | Id of related organization. |
| TargetUser | Guid | Id of target user. |
Event: UserAvailability
User's current availability state
| Property name | Value type | Description |
|---|---|---|
| Availability | string | Availability state, possible values: Available, Busy, DoNotDisturb, OffWork |
| EndTime | DateTime | End time of the state, DateTime.MaxValue if the state is continuous |
| EventSource | String | Availability event source from db |
| Note | String | User-defined message or description |
| OrganizationId | Guid | Id of related organization. |
| ProfileId | Guid | Id of the availability profile in database. |
| StartTime | DateTime | Start time of the state |
| UserId | Guid | Id of target user. |
| UserName | string | Username of target user. |
Event: UserCallbackChanged
Transformed from a generic CallbackChanged event to a user-specific callback change notification. This is used to push changes relevant to a specific user directly to that user's notification channels.
| Property name | Value type | Description |
|---|---|---|
| AssignedUserId | Guid? | Id of user the callback is currently assigned |
| CalculatedPriority | string | Calculated priority |
| CallbackAttempts | List<CallbackAttempt> | All attemps |
| CallbackExtras | List<CallbackExtra> | All extras |
| CallBackId | Guid | CallBack Id this event relates to. |
| CallbackRelatedItems | List<CallbackRelatedItem> | All related items |
| CallId | Guid? | Call id request was generated from |
| CallListId | Guid | Id of the CallList for this CallBack |
| ChannelIn | string | Channel request came from (queue number dialled, web form, ..) |
| ClassificationId | Guid? | Id of possibly existing classification instance. |
| ContactMessage | string | Request contact message |
| ContactName | string | Request contact name |
| ContactNumber | string | Request contact phone number |
| CreationTime | DateTime | Datetime of the creation of the request |
| DueDate | DateTime? | When request is due |
| ExpiryDate | DateTime? | When request expires |
| LastAttemptNote | string | Note in last callbackattempt |
| LastAttemptTimestamp | DateTime? | Timestamp of last callbackattempt |
| LastAttemptTypeId | int? | Id of the last attempt's type |
| LastAttemptUserId | Guid? | Id of user that made the last attempt |
| LastModifiedUserId | Guid? | Id of user that made the last change, null if new or admin |
| Modified | DateTime | Modified date |
| NotBefore | DateTime? | This should not be handled before this time |
| Note | string | Internal note about the request |
| OrganizationId | Guid | Id of related organization. |
| RecordingId | Guid? | Call recording relating to this request |
| TargetUser | Guid | Id of target user. |
| TranscriptId | Guid? | Id of possibly existing transcript made from related recording |
| TypeId | short | Request type id |
Event: UserCallInArrived
Incoming call. Current target is user. Call entered for allocation.
| Property name | Value type | Description |
|---|---|---|
| CallerNumber | string | Original caller number. |
| CallId | Guid | Id of core call event relates to. |
| LegId | string | Id of core call leg event relates to. |
| OrganizationId | Guid | Id of related organization. |
| TargetNumber | string | Original called number. |
| UserId | Guid | Id of current target user. |
| UserName | string | Username of current target user. |
Event: UserCallInComing
Incoming direct call to user entered BeneController.
| Property name | Value type | Description |
|---|---|---|
| CallerNumber | string | Original caller number. |
| CallId | Guid | Id of core call event relates to. |
| LegId | string | Id of core call leg event relates to. |
| OrganizationId | Guid | Id of related organization. |
| TargetNumber | string | Original called number. |
| UserId | Guid | Id of target user. |
| Username | string | Username of target user |
Event: UserCallInDisconnected
User call was disconnected.
| Property name | Value type | Description |
|---|---|---|
| CallerNumber | string | Original caller number. |
| CallId | Guid | Id of core call event relates to. |
| LegId | string | Id of core call leg event relates to. |
| OrganizationId | Guid | Id of related organization. |
| Reason | string | Reason for the disconnect. 'remote' or 'local' |
| TargetNumber | string | Original called number. |
| TechReason | string | Technical reason (e.g SIP cause code) for the disconnect. |
| UserId | Guid | Id of current target user. |
| Username | string | Username of target user |
Event: UserCallInOverflow
Incoming call, currently for user, overflows to next routing target.
| Property name | Value type | Description |
|---|---|---|
| CallerNumber | string | Original caller number. |
| CallId | Guid | Id of core call event relates to. |
| ConnectedTarget | string | Currently connected target. |
| LegId | string | Id of core call leg event relates to. |
| OrganizationId | Guid | Id of related organization. |
| OverflowApplet | string | Overflow Applet name. |
| TargetNumber | string | Original called number. |
| TechEvent | string | Technical event. |
| TechNumber | string | Technical source type. |
| TechQueueId | Guid | Id of current technical queue. |
| TechQueueName | string | Name of current technical queue. |
| TechSource | string | Overflow source type. |
| UserId | Guid | Id of current user. |
| Username | string | Username of target user |
Event: UserCallInTransferCancelled
Incoming call, currently targeted to user. Transfer cancelled.
| Property name | Value type | Description |
|---|---|---|
| CallerNumber | string | Original caller number. |
| CallId | Guid | Id of core call event relates to. |
| DetailedReason | string | Detailed cancellation reason. |
| LegId | string | Id of core call leg event relates to. |
| OrganizationId | Guid | Id of related organization. |
| Reason | string | Cancellation reason. |
| TargetNumber | string | Original called number. |
| TechQueueId | Guid | Id of current technical queue. |
| TechQueueName | string | Name of current technical queue. |
| TechSource | string | Technical source type. |
| TransferApplet | string | Transferring Applet name. |
| UserId | Guid | Id of current user. |
| Username | string | Transferring user's username |
Event: UserCallInTransferConnected
Incoming call, currently targeted to user. Transfer to overflow target connected.
| Property name | Value type | Description |
|---|---|---|
| CallerNumber | string | Original caller number. |
| CallId | Guid | Id of core call event relates to. |
| ConnectedTarget | string | Connected target. |
| LegId | string | Id of core call leg event relates to. |
| OrganizationId | Guid | Id of related organization. |
| TargetNumber | string | Original called number. |
| TechQueueId | Guid | Id of current technical queue. |
| TechQueueName | string | Name of current technical queue. |
| TechSource | string | Technical source type. |
| TransferApplet | string | Transferring Applet name. |
| TransferSource | string | Transfer source. |
| UserId | Guid | Id of transferring current user. |
| Username | string | Transferring user's username |
Event: UserCallInTransferStarted
Incoming call, currently targeted to user. Transfer to overflow target started.
| Property name | Value type | Description |
|---|---|---|
| CallerNumber | string | Original caller number. |
| CallId | Guid | Id of core call event relates to. |
| LegId | string | Id of core call leg event relates to. |
| OrganizationId | Guid | Id of related organization. |
| TargetNumber | string | Original called number. |
| TechQueueId | Guid | Id of current technical queue. |
| TechQueueName | string | Name of current technical queue. |
| TechSource | string | Technical source type. |
| TransferApplet | string | Transferring Applet name. |
| TransferSource | string | Transfer source. |
| TransferTarget | string | Transfer target, guid or phone number. |
| UserId | Guid | Id of current transferring user. |
| Username | string | Transferring user's username |
Event: UserCallInUserAllocated
Incoming call, currently targeted to user. Call allocated to user.
| Property name | Value type | Description |
|---|---|---|
| CallerNumber | string | Original caller number. |
| CallId | Guid | Id of core call event relates to. |
| DetailedReason | string | Optional detailed reason for allocation. |
| LegId | string | Id of core call leg event relates to. |
| OrganizationId | Guid | Id of related organization. |
| TargetNumber | string | Original called number. |
| UserId | Guid | Id of allocating User. |
| UserName | string | Allocation target username |
| UserNumber | string | Number of allocating User. |
Event: UserCallInUserCancelled
Incoming call, currently targeted to user. Call allocation to user cancelled.
| Property name | Value type | Description |
|---|---|---|
| CallerNumber | string | Original caller number. |
| CallId | Guid | Id of core call event relates to. |
| DetailedReason | string | Detailed cancellation reason. |
| LegId | string | Id of core call leg event relates to. |
| OrganizationId | Guid | Id of related organization. |
| Reason | string | Cancellation reason. |
| TargetNumber | string | Original called number. |
| UserId | Guid | Id of allocated user. |
| UserName | string | Username of cancelling user. |
Event: UserCallInUserConnected
Incoming call, currently targeted to user. Call allocation to user connected.
| Property name | Value type | Description |
|---|---|---|
| CallerNumber | string | Original caller number. |
| CallId | Guid | Id of core call event relates to. |
| LegId | string | Id of core call leg event relates to. |
| OrganizationId | Guid | Id of related organization. |
| TargetNumber | string | Original called number. |
| UserId | Guid | Id of connected User. |
| UserName | string | Username of connected User. |
| UserNumber | string | Number of connected User. |
Event: UserCallInUserOverflow
Worknumber call is overflowing to other destination
| Property name | Value type | Description |
|---|---|---|
| CallerNumber | string | Original caller number |
| CallId | Guid | Id of core call event relates to |
| LegId | string | Id of core call leg event relates to. |
| OrganizationId | Guid | Id of related organization |
| Reason | string | Reason for the overflow: AVAActiveProfile, BusyForTechnicalError, DND, OffWork, NoAnswer, InterruptOverflow BusyOnBusy, TransferAll, BlindTransfer |
| Target | string | Transfer target. Guid or phone number, or list of targets. |
| TargetNumber | string | Original called number |
| UserId | Guid | Id of transferring "responsible" user |
| Username | string | Username |
Event: UserCallOutConnected
Outgoing call
| Property name | Value type | Description |
|---|---|---|
| CallerNumber | string | Original caller number. |
| CallId | Guid | Id of core call event relates to. |
| LegId | string | Id of core call leg event relates to. |
| OrganizationId | Guid | Id of related organization. |
| TargetNumber | string | Original called number. |
| UserId | Guid | Id of calling User. |
| UserName | string | Username of calling User. |
Event: UserCallOutDisconnected
User call was disconnected.
| Property name | Value type | Description |
|---|---|---|
| CallerNumber | string | Original caller number. |
| CallId | Guid | Id of core call event relates to. |
| LegId | string | Id of core call leg event relates to. |
| OrganizationId | Guid | Id of related organization. |
| Reason | string | Reason for the disconnect. 'remote' or 'local' |
| TargetNumber | string | Original called number. |
| TechReason | string | Technical reason (e.g SIP cause code) for the disconnect. |
| UserId | Guid | Id of current calling user. |
| UserName | string | Username of current calling user. |
Event: UserCallOutGoing
Outgoing direct call initiated by a user
| Property name | Value type | Description |
|---|---|---|
| CallerNumber | string | Original caller number. |
| CallId | Guid | Id of core call event relates to. |
| LegId | string | Id of core call leg event relates to. |
| OrganizationId | Guid | Id of related organization. |
| TargetNumber | string | Original called number. |
| UserId | Guid | Id of calling user. |
| UserName | string | Username of calling user. |
Event: UserConfigurationSetNextCLI
Event produced via the API, intended towards call routing core. Indicates that the user request their outgoing calls to use given CLI for the specified time.
| Property name | Value type | Description |
|---|---|---|
| Number | string | CLI = caller number to use, should be a known number for route (beneuser) |
| OrganizationId | Guid | Id of related organization. |
| Permanent | bool | If the activation is permanent instead of time-scoped |
| TimeToLive | int | How long will this request be valid. |
| UserId | Guid | Id of target user. |
Event: UserMissedCallNotification
Send notification to user about a rejected call (not only DND cases, the name is a bit legacy)
| Property name | Value type | Description |
|---|---|---|
| CallerName | string | Caller name |
| CallerNumber | string | Caller number |
| CallId | Guid? | Call id |
Event: UserQueueAlert
User's queue alert
| Property name | Value type | Description |
|---|---|---|
| QueueId | Guid | Id of related Queue. |
| QueueName | string | Name of the related Queue. |
Event: UserStatus
This is emitted when a service pool alert defined by the user
| Property name | Value type | Description |
|---|---|---|
| ActiveQueues | int | Number of active queues |
| Available | bool | If AVA status is "available" |
| CanBeAllocatedTo | bool | If it is possible to allocate a call to the user |
| OrganizationId | Guid | Id of related organization. |
| ParkedCalls | int | Number of parked calls |
| Schedule | bool | If AVA availability code is not OffWork |
| ServiceTerminals | int | Number of active terminals |
| Serving | bool | User is serving in queues |
| ServingCallback | bool | User is serving in callback list "queues" |
| Talking | bool | If the user us talking right now |
| UserId | Guid | Id of user. |
| WrapUpEnd | DateTime? | If wrap up time is active then the end time, otherwise null |
Event: UserVoiceMailNotification
Send notifications to user about received VoiceMail message
| Property name | Value type | Description |
|---|---|---|
| CalledNumber | string | Called number |
| CallId | Guid? | Call id that generated this message |
| EmailTranscript | bool |
Queue
Event: QueueAttachedUsers
Incoming call was accepted into service queue.
| Property name | Value type | Description |
|---|---|---|
| AttachedUsers | List<QueueAttachedUser> | List of attached users |
| OrganizationId | Guid | Id of related organization. |
| QueueId | Guid | Id of service queue. |
Event: QueueCallInArrived
Incoming call was accepted into service queue.
| Property name | Value type | Description |
|---|---|---|
| CallerNumber | string | Original caller number |
| CallId | Guid | Id of core call event relates to. |
| LegId | string | Id of core call leg event relates to. |
| OrganizationId | Guid | Id of related organization. |
| QueueId | Guid | Id of allocating service queue. |
| QueueName | string | Name of allocating service queue. |
| QueueNumber | string | Number of allocating service queue |
| TargetNumber | string | Original called number |
Event: QueueCallInComing
New incoming call to service or technical queue entered BeneController.
| Property name | Value type | Description |
|---|---|---|
| CallerNumber | string | Original caller number |
| CallId | Guid | Id of core call event relates to |
| LegId | string | Id of core call leg event relates to. |
| OrganizationId | Guid | Id of related organization |
| QueueId | Guid | Id of service queue |
| QueueName | string | Name of target service or technical queue |
| QueueNumber | string | Number of target service or technical queue |
| TargetNumber | string | Original called number |
Event: QueueCallInDisconnected
Incoming call. Current target is service or technical queue. Call was disconnected.
| Property name | Value type | Description |
|---|---|---|
| CallerNumber | string | Original caller number |
| CallId | Guid | Id of core call event relates to. |
| LegId | string | Id of core call leg event relates to. |
| OrganizationId | Guid | Id of related organization |
| QueueId | Guid | Id of last allocating service queue. |
| QueueName | string | Name of last allocating service queue |
| Reason | string | Reason for the disconnect. 'remote' or 'local' |
| TargetNumber | string | Original called number |
| TechReason | string | Informative technical local reason for the disconnect. E.g "busy_on_busy", "ivr_menu_failure" etc. |
Event: QueueCallInOverflow
Incoming call. Current target is service or technical queue. Call overflows to next routing point.
| Property name | Value type | Description |
|---|---|---|
| CallerNumber | string | Original caller number |
| CallId | Guid | Id of core call event relates to. |
| LegId | string | Id of core call leg event relates to. |
| OrganizationId | Guid | Id of related organization. |
| OverflowApplet | string | Technical name of the current applet. |
| QueueId | Guid | Id of service queue responsible for overflow. |
| QueueName | string | Name of the service queue. |
| TargetNumber | string | Original called number |
| TechEvent | string | Technical event name. |
| TechNumber | string | Technical source number if any. |
| TechQueueId | Guid | Id of then current technical queue, may be different to the service queue. |
| TechQueueName | string | Name of the current technical queue. |
| TechSource | string | Technical source type. |
Event: QueueCallInTransferCancelled
Incoming call. Current target is service or technical queue. Transferring the call forward was cancelled.
| Property name | Value type | Description |
|---|---|---|
| CallerNumber | string | Original caller number. |
| CallId | Guid | Id of core call event relates to. |
| DetailedReason | string | Detailed cancellation reason. |
| LegId | string | Id of core call leg event relates to. |
| OrganizationId | Guid | Id of related organization |
| QueueId | Guid | Id of transferring service queue. |
| QueueName | string | Name of transferring servic equeue. |
| Reason | string | Cancellation reason. |
| TargetNumber | string | Original called number. |
| TechQueueId | Guid | Id of current technical queue, may differ from QueueId. |
| TechQueueName | string | Name of current transferring technical queue. |
| TechSource | string | Technical source type. |
| TransferApplet | string | Current transferring Applet name. |
Event: QueueCallInTransferConnected
Incoming call. Current target is service or technical queue. Transferring the call forward was connected.
| Property name | Value type | Description |
|---|---|---|
| CallerNumber | string | Original caller number. |
| CallId | Guid | Id of core call event relates to. |
| ConnectedTarget | string | Transfer target. Guid or phone number. |
| LegId | string | Id of core call leg event relates to. |
| OrganizationId | Guid | Id of related organization. |
| QueueId | Guid | Id of transferring queue. |
| QueueName | string | Name of transferring service queue |
| TargetNumber | string | Original called number. |
| TechQueueId | Guid | Id of current technical queue. May differ from QueueId. |
| TechQueueName | string | Name of current technical queue. |
| TechSource | string | Technical source type. |
| TransferApplet | string | Transferring Applet name. |
Event: QueueCallInTransferStarted
Incoming call. Current target is service or technical queue. Transferring the call forward was started.
| Property name | Value type | Description |
|---|---|---|
| CallerNumber | string | Original caller number. |
| CallId | Guid | Id of core call event relates to. |
| LegId | string | Id of core call leg event relates to. |
| OrganizationId | Guid | Id of related organization. |
| QueueId | Guid | Id of transferring queue. |
| QueueName | string | Name of transferring queue. |
| TargetNumber | string | Original called number. |
| TechQueueId | Guid | Id of current technical queue. May differ from QueueId. |
| TechQueueName | string | Name of current technical queue. |
| TechType | string | Technical source type. |
| TransferApplet | string | Transferring Applet name. |
| TransferSource | string | Transfer source. |
| TransferTarget | string | Transfer target. Guid or phone number. |
Event: QueueCallInUserAllocated
Incoming call. Current target is service or technical queue. Allocated to an agent.
| Property name | Value type | Description |
|---|---|---|
| CallerNumber | string | Original caller number. |
| CallId | Guid | Id of core call event relates to. |
| DetailedReason | string | Optional detailed reason for allocation. |
| LegId | string | Id of core call leg event relates to. |
| OrganizationId | Guid | Id of related organization. |
| QueueId | Guid | Id of allocating queue. |
| QueueName | string | Name of allocating queue. |
| QueueNumber | string | Number of allocating queue. |
| TargetNumber | string | Original called number. |
| UserId | Guid | Id of allocation target user. |
| UserName | string | Username of allocation target user. |
Event: QueueCallInUserCancelled
Incoming call. Current target is service or technical queue. Allocation to agent was cancelled.
| Property name | Value type | Description |
|---|---|---|
| CallerNumber | string | Original caller number. |
| CallId | Guid | Id of core call event relates to. |
| DetailedReason | string | Detailed cancellation reason. |
| LegId | string | Id of core call leg event relates to. |
| OrganizationId | Guid | Id of related organization. |
| QueueId | Guid | Id of allocating queue. |
| QueueName | string | Name of allocating service queue. |
| QueueNumber | string | Number of allocating service queue. |
| Reason | string | Cancellation reason. 'local' or 'remote'. |
| TargetNumber | string | Original called number. |
| UserId | Guid | Id of cancelling user. |
| UserName | string | Username of cancelling user. |
Event: QueueCallInUserConnected
Incoming call. Current target is service or technical queue. Answered by an agent.
| Property name | Value type | Description |
|---|---|---|
| CallerNumber | string | Original caller number. |
| CallId | Guid | Id of core call event relates to. |
| LegId | string | Id of core call leg event relates to. |
| OrganizationId | Guid | Id of related organization. |
| QueueId | Guid | Id of allocating queue. |
| QueueName | string | Name of allocating service queue. |
| QueueNumber | string | Number of allocating service queue. |
| TargetNumber | string | Original called number. |
| UserId | Guid | Id of connected user. |
| UserName | string | Username of connected user. |
| UserNumber | string | Connected target number. |
Event: QueueStatus
Service queue status message, contains various counter values.
| Property name | Value type | Description |
|---|---|---|
| MaxWaitTime | long | Maximum current wait time in queue |
| NbrOfAgentsCheckedInQueue | int | Total number agents that are serving in the queue (away or not). |
| NbrOfAgentsImmediatelyFree | int | Number agents that are immediately free for service. |
| NbrOfAgentsLongTermAway | int | Number agents that are not currently available for service in long term (e.g DND state). |
| NbrOfAgentsOnWrapUp | int | Total number agents that are serving in the queue (away or not). |
| NbrOfAgentsShortTermAway | int | Number agents that are not currently available for service in short term (e.g. already talking). |
| NbrOfAllocated | int | Number of current allocated calls in the queue. |
| NbrOfConnected | int | Number of current connected (served by agent) calls in the queue. |
| NbrOfNotServedRequesters | int | Number of calls currently not being served by an agent right now |
| NbrOfProviders | int | Total number of current providers (agents) in the queue. |
| NbrOfQueuingRequesters | int | Number of current queuing calls in the queue |
| NbrOfRequesters | int | Total number of current requesters (calls) in the queue. |
| NbrOfServingAgentsEstimate | int | Estimated number of current serving agents in the queue. |
| OpenStatus | int | Queue open status estimation NA = 0 NoActiveHandler = 1 : There are no active handling endpoints/numbers for the queue. So basically "Closed" NoActiveHandlerUncertain = 2 : There are no active handling endpoints/numbers for the queue. But uncertain due script on some handlers. Closed = 3 : The only active handler is "ServiceClosed". ClosedUncertain = 4 : The only active handler is "ServiceClosed". But uncertain due script on some handlers. Open = 5 : Queue is open. OpenUncertain = 6 : Queue is open. But uncertain due script on some handlers. |
| OrganizationId | Guid | Id of related organization. |
| QueueId | Guid | Id of service queue. |
| QueueName | string | Name of service queue. |
Misc: QueueAttachedUser
| Property name | Value type | Description |
|---|---|---|
| Active | bool | Active in queue |
| Priority | int | User's priority in queue |
| UserId | Guid | Attached UserId |
CallList
Event: CallbackChanged
Produced when a callback request changes (is created, updated, closed etc).
| Property name | Value type | Description |
|---|---|---|
| AssignedUserId | Guid? | Id of user the callback is currently assigned |
| CalculatedPriority | string | Calculated priority |
| CallbackAttempts | List<CallbackAttempt> | History of all handling attempts |
| CallbackExtras | List<CallbackExtra> | Extra name-value fields |
| CallBackId | Guid | CallBack Id this event relates to. |
| CallbackRelatedItems | List<CallbackRelatedItem> | List of cases related to this case |
| CallId | Guid? | The id of the original call that prompted the creation of this request |
| CallListId | Guid | Id of the CallList for this CallBack |
| ChannelIn | string | Name of the channel (usually service pool) the request came in through |
| ClassificationId | Guid? | If the case has been classified, id of the classification entry |
| ContactMessage | string | Any message left by the contact (usually empty) |
| ContactName | string | Contact name (usually empty) |
| ContactNumber | string | Contact number that is supposed to be calld |
| CreationTime | DateTime | WHen the request was initially created |
| DueDate | DateTime? | When the case is due to be handled |
| ExpiryDate | DateTime? | The date when the case automatically expires if not closed before it |
| LastAttemptNote | string | Note on the latest handling attempt |
| LastAttemptTimestamp | DateTime? | Timestamp of the latest handling attempt |
| LastAttemptTypeId | int? | Id of the last attempt's type |
| LastAttemptUserId | Guid? | Id of user that made the last attempt |
| LastModifiedUserId | Guid? | Id of user that made the last change, null if new or admin |
| Modified | DateTime | Modified date |
| NotBefore | DateTime? | Date before which the case should not be handled |
| Note | string | Internal notes on the case |
| OrganizationId | Guid | Id of related organization. |
| RecordingId | Guid? | Id of the corresponding audio recording (if any) |
| TranscriptId | Guid? | Id of the transcript created from the recording |
| TypeId | short | Type identifier. 1 - Explicit callback request 2 - Overflown call 3 - Call list item created manually |
Event: CallbackListStatus
Emitted with the latest status of each call list, if the status changed. Status changes are evaluated every 15 seconds. Can be used to construct alerts based on open items, automagically assign more agents to the lists or just simple dashboards.
| Property name | Value type | Description |
|---|---|---|
| CallListId | Guid | Corresponding list id |
| ExpiresIn24h | int | Number of requests that will expire today |
| IsAutoAllocate | bool | If the CallbackList is AutoAllocate list |
| NextHourOverDueDate | int | Total number of requests that will be past DueDate during next hour |
| NextHourRevealedNotBefore | int | Total number of requests that will be allocable during next hour |
| OrganizationId | Guid | Id of related organization. |
| TotalActiveAgents | int | Total "Active" ("checked" in the list, not necessary serving) agents in the queue. |
| TotalAssigned | int | Total number of requests that are currently assigned to an agent |
| TotalAutoAllocateAgents | int | Total number of Agents "Active" and "Serving_CallbackLists" |
| TotalFreeForAllocation | int | Total number of requests that can be allocated |
| TotalHidingNotBefore | int | Total number of requests that are not allocable due NotBefore has not elapsed |
| TotalOpenRequests | int | Total number open unhandled requests |
| TotalOverDueDate | int | Total number of requests that are already over DueDate |
| TotalServingAgents | int | Total number of agents having "Serving_CallbackLists" = 1 |
| TotalServingAutoAllocateAgents | int | Total immediately AutoAllocable agents. Agent must be "Active" and "Serving_CallbackLists", and the list must be "IsAutoAllocate" NOTE: Does not (at least YET) consider if agent already has an active allocated request, so a bit duplicate of TotalAutoAllocateAgents for now |
Event: CallbackRequestNotification
Notification sent to agent(s) when a new CBR has been added to a list
| Property name | Value type | Description |
|---|---|---|
| CalledNumber | string | Number called |
| CallerNumber | string | Phone number of the caller |
| CallId | Guid? | Call id |
| CBRId | Guid | CBR id |
| ContactMessage | string | Optional contact message |
| EmailAttach | bool? | If the recorded (if any) message should be attached with the email message |
| EmailTo | string | Send email to address |
| EmailTranscript | bool | If the transcript from the recorded message should be (first waited for and then) added to the message |
| ListId | Guid? | Callback List id |
| RecordingId | Guid? | Optional recording id in case also voice message was recorded |
| RUser | Guid? | Optional redirecting user Guid |
| SMSTo | string | Send SMS to address |
Event: CallbackRequestReceivedNotification
Send confirmation SMS message to the caller about successfully received CBR
| Property name | Value type | Description |
|---|---|---|
| CalledNumber | string | Called number |
| CallerNumber | string | Caller number |
| CallId | Guid? | Call id |
| CBRId | Guid | CBR id |
| ListId | Guid? | Callback List id |
| RUser | Guid? | Optional redirecting user id |
Event: CallListNotification
Notification sent to agent(s) when a new calllist entry is added via API
| Property name | Value type | Description |
|---|---|---|
| AssignedUserId | Guid? | Assigned user (if any) |
| CBRId | Guid | Related item |
| ContactMessage | string | Included contact message. May be fairly long in some cases. |
| ContactName | string | Included contact name (=who to call) |
| ContactNumber | string | Included contact number (=who to call) |
| ListId | Guid | Organization target list belongs to Callback list id |
Misc: CallbackAttempt
Helper for CallbackAttempt transportation
| Property name | Value type | Description |
|---|---|---|
| CallbackAttemptTypeId | int? | Attempt result type |
| Id | Guid | Attempt id |
| Note | string | User-provided note |
| Timestamp | DateTime? | Attempt timestamp |
| UserId | Guid? | UserId attempt relates to |
Misc: CallbackExtra
Helper for CallBackExtraData transportation
| Property name | Value type | Description |
|---|---|---|
| Id | int | Property name |
| Name | string | Property name |
| Value | string | Property value |
Misc: CallbackRelatedItem
Helper for CallbackRelatedItem transportation
| Property name | Value type | Description |
|---|---|---|
| Id | Guid | Related request id |
| IsClosed | bool | IsClosed : if the related request is already closed |
| ListId | Guid? | Related request list id |
| StatusId | int? | StatusId : Raw status id for the last Attempt |