Skip to main content

Commands

Installation​

npm install @wildix/wda-xcaracal-client

Commands​

GetAnsweredBreakdownCommand
Reads every call of the window on each request: nothing is pre-computed per user, agent, disconnect reason or talk time. Recommended to request it when the user asks for it, not on page open. Answered service calls grouped by service, by agent (the user as a member of one service), by user (across every service of the filter), by disconnect reason (outcome plus raw END reason) or by talk-time band. Every group carries its completed and transferred counts, wait and talk sums and the answering agent's two ring sums; percent of talk time is totalTalkMs over GetAnsweredSummary's totalTalkMs of the same filter. BY_TALK_TIME returns every band, zero-filled, using the talk ladder. Whole, not paginated; more than 1000 groups is rejected with 400. ### Allowed Auth Scopes - xcaracal:GetAnsweredBreakdown - xcaracal:read
GetAnsweredServiceLevelCommand
Cheap: closed days come from pre-computed daily rows. It reads the individual calls only for today and for yesterday until its daily rows exist (05:20 in the PBX's zone), and whenever the filter names extensions, outcomes, disconnect reasons, an hour range, days of week or a wait or talk band. Suitable for a page's first request. Cumulative service-level ladder over wait time for answered and transferred service calls: waitBandSteps bands of waitBandSeconds seconds, the last open-ended. Percentages are count / total, computed by the client. ### Allowed Auth Scopes - xcaracal:GetAnsweredServiceLevel - xcaracal:read
GetAnsweredSummaryCommand
Cheap: closed days come from pre-computed daily rows. It reads the individual calls only for today and for yesterday until its daily rows exist (05:20 in the PBX's zone), and whenever the filter names extensions, outcomes, disconnect reasons, an hour range, days of week or a wait or talk band. Suitable for a page's first request. Answered-calls KPIs over complete service calls that were answered or transferred. Talk includes on-call hold. ### Allowed Auth Scopes - xcaracal:GetAnsweredSummary - xcaracal:read
ListDashboardsCommand
The dashboards of the user (live wallboards and reports): the predefined dashboards every user gets first, then the user's own, oldest first. A user's dashboards are private to them, within the company. ### Allowed Auth Scopes - xcaracal:ListDashboards - xcaracal:read
DeleteDashboardCommand
Deletes a dashboard of the user. Deleting a dashboard that does not exist succeeds; deleting a predefined dashboard is rejected with 400. ### Allowed Auth Scopes - xcaracal:DeleteDashboard
PutDashboardCommand
Saves a dashboard of the user under the id the client chose: creates it when the id is new, otherwise replaces its name and blocks whole. createdAt is kept from the first save. The id of a predefined dashboard is rejected with 400. The kind of a dashboard is set when it is created and cannot change: a save with another kind is rejected with 400. A user can keep at most 50 dashboards of each kind: creating one more is rejected with 400. ### Allowed Auth Scopes - xcaracal:PutDashboard
GetDistributionByPeriodCommand
Cheap: closed days come from pre-computed daily rows. It reads the individual calls only for today and for yesterday until its daily rows exist (05:20 in the PBX's zone), and whenever the filter names extensions, outcomes, disconnect reasons, an hour range, days of week or a wait or talk band, or the hour granularity. Suitable for a page's first request. The metric block as a dense series of buckets cut in the request timezone; empty buckets carry zero counts. HOUR is the hour of the day (24 buckets) over the whole window. ### Allowed Auth Scopes - xcaracal:GetDistributionByPeriod - xcaracal:read
GetDistributionByServiceCommand
Cheap: closed days come from pre-computed daily rows. It reads the individual calls only for today and for yesterday until its daily rows exist (05:20 in the PBX's zone), and whenever the filter names extensions, outcomes, disconnect reasons, an hour range, days of week or a wait or talk band. Suitable for a page's first request. The metric block per service. Whole, not paginated; more than 1000 groups is rejected with 400. ### Allowed Auth Scopes - xcaracal:GetDistributionByService - xcaracal:read
GetDistributionSummaryCommand
Cheap: closed days come from pre-computed daily rows. It reads the individual calls only for today and for yesterday until its daily rows exist (05:20 in the PBX's zone), and whenever the filter names extensions, outcomes, disconnect reasons, an hour range, days of week or a wait or talk band. Suitable for a page's first request. One metric block over every service call in the filter. ### Allowed Auth Scopes - xcaracal:GetDistributionSummary - xcaracal:read
QueryServiceCallsCommand
Cheap: one page of calls, read through an index, however long the window. Pages are requested one at a time. The call list: one row per service call (one phone call's stay in one service), newest first, keyset-paginated; callId lists every service call of one phone call. The calls whose outcome could not be determined are listed with outcome unknown, as they are counted in offered; narrow with the outcomes filter. A value that matches few calls can read the whole window before a page fills. ### Allowed Auth Scopes - xcaracal:QueryServiceCalls - xcaracal:read
GetServiceCallEventsCommand
Cheap: one call, looked up by key. One service call in full: its call-list row and its raw lifecycle events (INIT, RING, CANCEL, ANSWER, END) in time order, whole, never paged (a service call reaches the database as one record, so its events always fit one response). An event here is one entry of the stream API's actions list per agent it concerns: an action without an agent is one event, an action naming several agents is one event per agent, and the events of one action share its time; the stream's own 'service call event' is the whole record. 404 when the service call does not exist for the company. callId is the phone call's id, shared by all its service calls; flowIndex picks the stay; serviceId disambiguates the rare case of one flow index entering two services. ### Allowed Auth Scopes - xcaracal:GetServiceCallEvents - xcaracal:read
GetUnansweredBreakdownCommand
Reads every call of the window on each request: nothing is pre-computed per service or disconnect reason. Recommended to request it when the user asks for it, not on page open. Unanswered service calls grouped by service or by disconnect reason (outcome plus raw END reason). Whole, not paginated; more than 1000 groups is rejected with 400. ### Allowed Auth Scopes - xcaracal:GetUnansweredBreakdown - xcaracal:read
GetUnansweredServiceLevelCommand
Cheap: closed days come from pre-computed daily rows. It reads the individual calls only for today and for yesterday until its daily rows exist (05:20 in the PBX's zone), and whenever the filter names extensions, outcomes, disconnect reasons, an hour range, days of week or a wait or talk band. Suitable for a page's first request. Cumulative ladder over wait time for the service calls nobody answered - abandoned and unanswered together - how long callers waited before they hung up or the wait ended; each band splits into lost and overflow. ### Allowed Auth Scopes - xcaracal:GetUnansweredServiceLevel - xcaracal:read
GetUnansweredSummaryCommand
Cheap: closed days come from pre-computed daily rows. It reads the individual calls only for today and for yesterday until its daily rows exist (05:20 in the PBX's zone), and whenever the filter names extensions, outcomes, disconnect reasons, an hour range, days of week or a wait or talk band. Suitable for a page's first request. Unanswered-calls KPIs over complete service calls that were not answered: abandoned (the caller hung up or was removed by a rule) and unanswered (the wait ended without an answer: a timeout, an empty queue, the caller leaving by a keypad option, a hand-off before anyone answered, or a reason the classification does not name). Waits are how long callers held before the call ended. ### Allowed Auth Scopes - xcaracal:GetUnansweredSummary - xcaracal:read