@xema/omni-protocol 0.1.101 → 0.1.102
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +70 -71
- package/dist/index.js +4 -4
- package/dist/testing.d.ts +19 -1
- package/dist/testing.js +161 -34
- package/dist/validation.d.ts +6 -3
- package/dist/validation.js +150 -150
- package/guide.md +252 -194
- package/package.json +1 -1
package/guide.md
CHANGED
|
@@ -22,7 +22,7 @@ are used precisely throughout and mean nothing looser here.
|
|
|
22
22
|
| **Agent application** | The software the agent uses, such as Omni, whether web or desktop. It presents provider tasks and controls and manages local audio where supported. Existing API names use `Host` and `host` for this role. |
|
|
23
23
|
| **Provider** | One independently connected external system: a voice platform, a chat platform, a mail platform. |
|
|
24
24
|
| **Adapter** | The package implementing this contract for one provider. One adapter is one provider, so the words are often interchangeable; *provider* names the system, *adapter* the code speaking for it. |
|
|
25
|
-
| **Agent** | The person signed in and taking work. On `onCall`, `agent` is a person on the call by user id;
|
|
25
|
+
| **Agent** | The person signed in and taking work. On `onCall`, `agent` is a person on the call by user id; a conference directory may include an agent when the provider publishes that directory item. |
|
|
26
26
|
| **Lead** | An agent whose login declares `capabilities.lead`. The flag alone turns on the team feature in the agent application: the lead sees their members with their tasks and stats, and acts on them with the authority the flag carries. While the feature is on, the provider publishes a `TeamMembers` object to them and to nobody else: **the login is the permission**. |
|
|
27
27
|
| **Local policy** | Rules configured by the agent application about this agent, outside the provider protocol and never sent to a provider. It gates whether an offer may be rejected, whether the agent goes ready on login, and whether tasks are auto-accepted. Where a capability and local policy disagree, the stricter wins. |
|
|
28
28
|
| **Call** | The caller’s complete phone call, which may continue through IVRs, queues and several agents. The protocol never describes the IVR or the queue; it carries the call's history and details to whichever agent holds it now. |
|
|
@@ -40,9 +40,9 @@ are used precisely throughout and mean nothing looser here.
|
|
|
40
40
|
| **Event** | One completed transaction reported after a snapshot established the baseline. |
|
|
41
41
|
| **Break** | A reported, supervised state in which the agent is not working — one with a reason, a decision behind it and a return. It covers what a platform may call *not-ready*, including equipment trouble. An agent who is merely at capacity is not on a break. |
|
|
42
42
|
| **Workspace** | What Omni shows the agent. The **task workspace** holds the selected task, its controls and its browsers; the **idle workspace** holds what a provider contributes when no task is selected — dialpad, contacts, calendar, team member list. |
|
|
43
|
-
| **Dial** | One outbound call the agent application asks a provider to place — from the idle dialpad, a
|
|
43
|
+
| **Dial** | One outbound call the agent application asks a provider to place — from the idle dialpad, a preview's Call, a conference add, or a connect-back. Identified by the agent application's `dialId`, accepted as `dialling`, and ended by exactly one `dial-outcome`. See **Every dial has an outcome**. |
|
|
44
44
|
| **Listen** | A lead's channel in a member's call, unasked, from the team member list: `listen` in silence, `coach` heard by the agent alone, `join-call` heard by everyone. It is a team act naming the member, never a task on the lead's desk; nothing of it reaches the member's task. A lead who wants the call takes it over. See **Listening to a call**. |
|
|
45
|
-
| **On the call** | Who a voice task's audio joins, or is bringing in, as the provider states it on `Task.onCall`: the party, the agents, and anyone
|
|
45
|
+
| **On the call** | Who a voice task's audio joins, or is bringing in, as the provider states it on `Task.onCall`: the party, the agents, and anyone conferenced in from the moment their dial is placed. |
|
|
46
46
|
|
|
47
47
|
These fields describe state within their containing objects. Both authentication and break
|
|
48
48
|
state use `status`; name the object when discussing them to avoid ambiguity.
|
|
@@ -313,7 +313,6 @@ type RecordingState =
|
|
|
313
313
|
type RecordingCommand = {
|
|
314
314
|
type: "recording";
|
|
315
315
|
source: RecordingSource;
|
|
316
|
-
requestId: string;
|
|
317
316
|
observationId: string;
|
|
318
317
|
} & (
|
|
319
318
|
| { action: "start"; recordingId?: never }
|
|
@@ -564,8 +563,7 @@ type TaskCapabilities<C extends Channel = Channel> =
|
|
|
564
563
|
endCall?: Lockable<true>;
|
|
565
564
|
terminateCall?: Lockable<true>;
|
|
566
565
|
connectBack?: Lockable<true>;
|
|
567
|
-
|
|
568
|
-
warmTransfer?: Lockable<DestinationDirectory>;
|
|
566
|
+
schedule?: Lockable<true>;
|
|
569
567
|
leadAssist?: Lockable<true>;
|
|
570
568
|
conference?: Lockable<DestinationDirectory>;
|
|
571
569
|
recording?: Lockable<TaskRecordingPolicy>;
|
|
@@ -675,7 +673,7 @@ type TaskCompletion =
|
|
|
675
673
|
| { completionMode: "agent-command"; wrapAllowance?: DurationSeconds }
|
|
676
674
|
| { completionMode: "provider-automatic"; wrapAllowance: DurationSeconds };
|
|
677
675
|
|
|
678
|
-
type OnCallRole = "party" | "agent" | "
|
|
676
|
+
type OnCallRole = "party" | "agent" | "conferenced";
|
|
679
677
|
|
|
680
678
|
type OnCallStage = "ringing" | "joined";
|
|
681
679
|
|
|
@@ -683,7 +681,7 @@ type OnCall = { since: IsoTimestamp; held?: true } & (
|
|
|
683
681
|
| { role: "party"; dialId?: never; stage?: never }
|
|
684
682
|
| { role: "party"; stage: OnCallStage; dialId?: DialId }
|
|
685
683
|
| { role: "agent"; userId: UserId }
|
|
686
|
-
| { role: "
|
|
684
|
+
| { role: "conferenced"; destinationId: string; stage: OnCallStage; dialId?: DialId; label?: string }
|
|
687
685
|
);
|
|
688
686
|
|
|
689
687
|
type TaskLeadAssist = { note?: string; since: IsoTimestamp } & (
|
|
@@ -725,7 +723,7 @@ type Task<C extends Channel = Channel> = {
|
|
|
725
723
|
party?: Contact;
|
|
726
724
|
phase: TaskPhase;
|
|
727
725
|
acceptance?: AcceptanceMode;
|
|
728
|
-
|
|
726
|
+
previewEndsInSeconds?: DurationSeconds;
|
|
729
727
|
atDeadline?: PreviewDeadline;
|
|
730
728
|
reference?: string;
|
|
731
729
|
attributes?: TaskAttribute[];
|
|
@@ -745,7 +743,6 @@ type AcceptanceMode =
|
|
|
745
743
|
|
|
746
744
|
type TaskOutcome =
|
|
747
745
|
| { type: "completed"; by: "agent" | "provider" }
|
|
748
|
-
| { type: "transferred"; destinationId?: string }
|
|
749
746
|
| { type: "taken-over"; leadId: UserId }
|
|
750
747
|
| { type: "cancelled"; by: "agent" | "provider" | "party"; reason?: string }
|
|
751
748
|
| { type: "expired"; phase: "pending" | "confirmed" | "preview" }
|
|
@@ -765,10 +762,10 @@ const TASK_COMMAND_NAMES = {
|
|
|
765
762
|
"end-call",
|
|
766
763
|
"terminate-call",
|
|
767
764
|
"connect-back",
|
|
768
|
-
"transfer",
|
|
769
765
|
"lead-assist",
|
|
770
766
|
"conference",
|
|
771
767
|
"recording",
|
|
768
|
+
"schedule",
|
|
772
769
|
"complete",
|
|
773
770
|
],
|
|
774
771
|
chat: ["accept", "decline", "pause", "resume", "complete"],
|
|
@@ -789,10 +786,7 @@ type VoiceTaskCommand =
|
|
|
789
786
|
| { type: "end-call" }
|
|
790
787
|
| { type: "terminate-call" }
|
|
791
788
|
| { type: "connect-back"; dialId: DialId }
|
|
792
|
-
| { type: "
|
|
793
|
-
| { type: "transfer"; action: "warm"; dialId: DialId; destinationId: string }
|
|
794
|
-
| { type: "transfer"; action: "complete" }
|
|
795
|
-
| { type: "transfer"; action: "cancel" }
|
|
789
|
+
| { type: "schedule"; at: IsoTimestamp; note?: string }
|
|
796
790
|
| { type: "lead-assist"; action: "request"; note?: string }
|
|
797
791
|
| { type: "lead-assist"; action: "cancel" }
|
|
798
792
|
| { type: "conference"; action: "add"; dialId: DialId; destinationId: string }
|
|
@@ -933,7 +927,7 @@ type BreakRequest = {
|
|
|
933
927
|
};
|
|
934
928
|
|
|
935
929
|
type ForcedBreak = {
|
|
936
|
-
by: UserId;
|
|
930
|
+
by: UserId | "provider";
|
|
937
931
|
expectedDurationMs?: number;
|
|
938
932
|
};
|
|
939
933
|
|
|
@@ -978,10 +972,10 @@ type TeamMember = {
|
|
|
978
972
|
tasks?: MemberTask[];
|
|
979
973
|
listening?: MemberListening;
|
|
980
974
|
shift?: MemberShift;
|
|
975
|
+
request?: MemberRequest;
|
|
981
976
|
};
|
|
982
977
|
|
|
983
|
-
type
|
|
984
|
-
memberId: UserId;
|
|
978
|
+
type MemberRequest = {
|
|
985
979
|
assignmentId: AssignmentId;
|
|
986
980
|
note?: string;
|
|
987
981
|
since: IsoTimestamp;
|
|
@@ -1031,7 +1025,6 @@ type MemberShift = {
|
|
|
1031
1025
|
|
|
1032
1026
|
type TeamMembers = {
|
|
1033
1027
|
members: TeamMember[];
|
|
1034
|
-
requests: LeadRequest[];
|
|
1035
1028
|
policies?: TeamPolicies;
|
|
1036
1029
|
};
|
|
1037
1030
|
|
|
@@ -1122,7 +1115,7 @@ type ProviderEvent =
|
|
|
1122
1115
|
| {
|
|
1123
1116
|
type: "task-offered";
|
|
1124
1117
|
task: Task;
|
|
1125
|
-
|
|
1118
|
+
expiresInSeconds?: DurationSeconds;
|
|
1126
1119
|
}
|
|
1127
1120
|
| { type: "task-updated"; task: Task }
|
|
1128
1121
|
| { type: "task-audio-started"; assignmentId: AssignmentId }
|
|
@@ -1133,6 +1126,9 @@ type ProviderEvent =
|
|
|
1133
1126
|
| { type: "queue-summary"; summary: QueueSummary }
|
|
1134
1127
|
| { type: "diagnostic"; expected: string; observed: string; assignmentId?: AssignmentId }
|
|
1135
1128
|
| { type: "team-updated"; team: TeamMembers }
|
|
1129
|
+
| { type: "team-member-updated"; member: TeamMember }
|
|
1130
|
+
| { type: "team-member-removed"; memberId: UserId }
|
|
1131
|
+
| { type: "team-policies-updated"; policies: TeamPolicies }
|
|
1136
1132
|
| { type: "contacts-updated"; contacts: Contact[] }
|
|
1137
1133
|
| { type: "calendar-updated"; calendar: ScheduledActivity[] };
|
|
1138
1134
|
|
|
@@ -1257,6 +1253,7 @@ const OMNI_FAILURE_CODES = [
|
|
|
1257
1253
|
"omni.rate-limited",
|
|
1258
1254
|
"omni.unavailable",
|
|
1259
1255
|
"omni.break-already-committed",
|
|
1256
|
+
"omni.recording-unsettled",
|
|
1260
1257
|
] as const;
|
|
1261
1258
|
type OmniFailureCode = (typeof OMNI_FAILURE_CODES)[number];
|
|
1262
1259
|
```
|
|
@@ -1428,8 +1425,8 @@ only where the corresponding capability is declared; an absent capability means
|
|
|
1428
1425
|
there is no separate permission flag.
|
|
1429
1426
|
|
|
1430
1427
|
The commands every task has are authorized by other fields the provider declared — a task that was
|
|
1431
|
-
offered can be accepted, one in `preview` can be called, one
|
|
1432
|
-
|
|
1428
|
+
offered can be accepted, one in `preview` can be called, one with a wrap can be completed.
|
|
1429
|
+
Nothing is issuable that the provider did not publish; only
|
|
1433
1430
|
which field says so varies. See **Which commands need a capability**.
|
|
1434
1431
|
|
|
1435
1432
|
### 5. Snapshots establish state; events report transactions
|
|
@@ -1623,11 +1620,11 @@ compile time.
|
|
|
1623
1620
|
| `taskTypePresentation` | Optional static adapter-defined presentation keyed by exact `taskType`. It names the item and its optional agent-facing reference. |
|
|
1624
1621
|
| `orgLevels` | The organisation's whole ladder as the provider calls it, each level with the label a desk shows for "who decided". Stated outright, `person` included: what it leaves out does not exist. Omitted for the typical four, `DEFAULT_LEVELS`. See **Who decides what an agent may do**. |
|
|
1625
1622
|
| `phones` | Voice only, and required there: the phones this platform can put an agent on, `softphone` (the call's audio lands in the agent application) and/or `deskPhone` (a handset the platform rings; the agent application shows the call and opens nothing). The agent application picks one per login. See **How the agent hears the call**. |
|
|
1626
|
-
| `dialOutcomes` | Voice only. How a dial can end on this platform, as it distinguishes them: `answered` and at least one way of not reaching the destination. Required of a provider that dials at all — an idle dialpad, or tasks that
|
|
1623
|
+
| `dialOutcomes` | Voice only. How a dial can end on this platform, as it distinguishes them: `answered` and at least one way of not reaching the destination. Required of a provider that dials at all — an idle dialpad, or tasks that conference or call back — and a `dial-outcome` carries only a declared member. See **Every dial has an outcome**. |
|
|
1627
1624
|
| `timeCheck` | Optional `true`: implements `checkTime` for fresh provider-clock samples; agent application polling is independently opt-in. |
|
|
1628
1625
|
| `timestampAuthority` | Optional `"provider"`: provider timestamps are final; agent application instants are advisory. Omission makes no trust promise. |
|
|
1629
1626
|
| `runningStepReports` | The provider takes running reports of an agent application-performed step — `recordStep` with `seconds` so far and no `ended`. Omitted, the agent application sends exactly two reports per leg, when it began and when it ended, and a running one is refused. See **The agent application records what it performs**. |
|
|
1630
|
-
| `completionSettleMs` | Required. How long after an applied `complete` the provider's `task-ended` is owed, a positive whole number of milliseconds (`manifest.completionSettleMs`).
|
|
1627
|
+
| `completionSettleMs` | Required. How long after an applied `complete` the provider's `task-ended` is owed, a positive whole number of milliseconds (`manifest.completionSettleMs`). Stated per provider, since platforms settle at different speeds. See **`task-ended`**. |
|
|
1631
1628
|
|
|
1632
1629
|
### Authentication methods
|
|
1633
1630
|
|
|
@@ -2162,7 +2159,7 @@ surface in one place, and what obliges an adapter to implement each one.
|
|
|
2162
2159
|
| `refused(report)` | Always. The agent application tells the adapter what it would not take -- a snapshot it did not replace its state with, an event it dropped -- with every rule broken, so a refusal is visible on both sides. See **What the agent application does with what it refuses**. |
|
|
2163
2160
|
| `setCapacity(capacity)` | Always. Nothing may be assigned until a capacity is stated, so there is no connection that does not receive it. |
|
|
2164
2161
|
| `execute(request)` | Always. Every channel has commands no capability gates — see **Which commands need a capability**. |
|
|
2165
|
-
| `getUserDetails(ids)` | The adapter publishes any `UserId`: on `ForcedBreak.by
|
|
2162
|
+
| `getUserDetails(ids)` | The adapter publishes any `UserId`: on `ForcedBreak.by` where a person forced it, a team member list, or `history[].by`. Each `User` carries its `timeZone`; a person whose zone the provider cannot name is omitted from the answer, as any unresolvable id is. |
|
|
2166
2163
|
| `dial(request)` | The manifest declares `idleCapabilities.dial`, and with it `dialOutcomes`. |
|
|
2167
2164
|
| `requestBreak(request)` | The login declares `capabilities.breaks`. |
|
|
2168
2165
|
| `commitBreak()` | The login declares `capabilities.breaks`. Commit and cancel are not optional halves of it. |
|
|
@@ -2217,8 +2214,8 @@ Turns `UserId` values into something an agent can read.
|
|
|
2217
2214
|
getUserDetails(ids: UserId[]): Promise<User[]>
|
|
2218
2215
|
```
|
|
2219
2216
|
|
|
2220
|
-
Required of any adapter that publishes a `UserId` — on `ForcedBreak.by
|
|
2221
|
-
`history[].by`. Publishing an identifier Omni cannot resolve puts a name on screen
|
|
2217
|
+
Required of any adapter that publishes a `UserId` — on `ForcedBreak.by` where a person forced it, a
|
|
2218
|
+
team member list, or `history[].by`. Publishing an identifier Omni cannot resolve puts a name on screen
|
|
2222
2219
|
that reads as a database key.
|
|
2223
2220
|
|
|
2224
2221
|
- **Omit an id you cannot resolve; do not invent a name for it.** A missing entry says *I do not
|
|
@@ -2322,7 +2319,7 @@ declare const task: Task;
|
|
|
2322
2319
|
const assignment = {
|
|
2323
2320
|
type: "task-offered",
|
|
2324
2321
|
task: { ...task, phase: "pending", acceptance: "consent" },
|
|
2325
|
-
|
|
2322
|
+
expiresInSeconds: 30,
|
|
2326
2323
|
} satisfies Extract<ProviderEvent, { type: "task-offered" }>;
|
|
2327
2324
|
```
|
|
2328
2325
|
|
|
@@ -2340,21 +2337,30 @@ on a desk phone — and is not in question per call. See **How the agent hears t
|
|
|
2340
2337
|
|
|
2341
2338
|
Automatic acceptance still begins with `task-offered`.
|
|
2342
2339
|
|
|
2343
|
-
`
|
|
2344
|
-
down and stops offering **Accept** once it
|
|
2345
|
-
`task-ended` and an `expired` outcome naming `pending`, since nobody
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2340
|
+
`expiresInSeconds` is how long the offer stands, in whole seconds from this event. Where present,
|
|
2341
|
+
Omni counts down from receipt and stops offering **Accept** once it runs out; the provider ends
|
|
2342
|
+
the lapsed offer with `task-ended` and an `expired` outcome naming `pending`, since nobody
|
|
2343
|
+
cancelled it. **Omit it unless the provider can observe it.** A provider that reports only elapsed
|
|
2344
|
+
ring time after the fact cannot say how long an offer has left, and a computed value would have
|
|
2345
|
+
Omni withdraw **Accept** from a task still pending.
|
|
2346
|
+
|
|
2347
|
+
**A deadline is seconds left, never an instant.** The agent application and the provider keep
|
|
2348
|
+
different clocks, and a countdown that compares one against the other is a countdown that runs
|
|
2349
|
+
fast or slow by their skew. Seconds from the publication that carries them are the provider's own
|
|
2350
|
+
arithmetic, counted down on the desk from the moment they arrive, and the transport delay is the
|
|
2351
|
+
only error. Restated on every publication that carries them, so a snapshot after a reconnect
|
|
2352
|
+
starts the countdown afresh from what is actually left (`event.taskOffered.expiresInSeconds`,
|
|
2353
|
+
`task.preview.previewEndsInSeconds`: a whole number, zero or more).
|
|
2354
|
+
|
|
2355
|
+
A preview's deadline is not on the offer. It travels on the task, as `previewEndsInSeconds` with
|
|
2350
2356
|
`atDeadline`, so a snapshot carries it too -- see **Preview: the agent presses Call**.
|
|
2351
2357
|
|
|
2352
2358
|
A provider may withdraw a pending task by emitting `task-ended` with a `cancelled` outcome, `by:
|
|
2353
2359
|
"provider"`. **`cancelled` says who called the work off**, as `completed` says who completed it:
|
|
2354
2360
|
`agent` for a decline, `provider` for a withdrawal or a re-route, `party` for a caller who abandoned
|
|
2355
2361
|
the ring. One word for the three left a supervisor's record unable to tell them apart, so `by` is
|
|
2356
|
-
required and closed (`event.taskEnded.outcome.cancelled.by`). An offer nobody acted on
|
|
2357
|
-
`
|
|
2362
|
+
required and closed (`event.taskEnded.outcome.cancelled.by`). An offer nobody acted on while
|
|
2363
|
+
`expiresInSeconds` ran is not cancelled by anyone: it lapses, and ends `expired` naming `pending`.
|
|
2358
2364
|
|
|
2359
2365
|
### Tasks already in progress
|
|
2360
2366
|
|
|
@@ -2390,14 +2396,14 @@ time. Runtime conformance checks also require the task channel to match its prov
|
|
|
2390
2396
|
| `phase` | Current canonical task phase: `pending`, `confirmed`, `preview`, `in-progress`, `paused`, or `completing`. `preview` is voice only. |
|
|
2391
2397
|
| `audio` | Voice only. The task's real-time audio as the provider holds it: `started` while audio is attached, `ended` once it ended, omitted while none is. The provider's word — see **`task-audio-started`**. Audio names a task whose work has begun, or whose party the agent application is dialling: on a `pending`, `confirmed` or `preview` task with nobody ringing it is refused (`task.audio.beforeWork`), on a snapshot as on the event, since an agent application opens the microphone on it; with the party ringing by an agent application dial or provider-triggered preview dial, actual ring-back audio may precede answer. |
|
|
2392
2398
|
| `acceptance` | How this offer is accepted — `no-preference`, `consent`, or `automatic` — stated on the pending task so a reconnect snapshot says it too. Required while `pending` when `autoAcceptTasks` was `true`, forbidden when it was `false`, and absent past `pending`. See **Acceptance modes**. |
|
|
2393
|
-
| `
|
|
2394
|
-
| `atDeadline` | Voice only, in `preview`, with `
|
|
2399
|
+
| `previewEndsInSeconds` | Voice only, in `preview`: how long the preparation has left, in whole seconds from this publication, restated on every publication that carries it. Absent, the agent has as long as they need without a preparation countdown. Always with `atDeadline`. See **Preview: the agent presses Call**. |
|
|
2400
|
+
| `atDeadline` | Voice only, in `preview`, with `previewEndsInSeconds`: what the system does when it runs out -- `provider-dials` makes the provider initiate dialing, `host-dials` makes the agent application issue Call, `waits` keeps the task in preview awaiting the agent. |
|
|
2395
2401
|
| `reference` | Optional agent-facing reference such as a case, call, conversation, ticket, or message number. It is distinct from the protocol `id`. |
|
|
2396
|
-
| `completionMode` | `agent-command` waits for the channel's `complete` command; `provider-automatic` completes without one. |
|
|
2397
|
-
| `wrapAllowance` | Fixed time allowed to complete the task after primary interaction ends. For real-time audio, it begins after `task-audio-ended`. Required under `provider-automatic`, where the provider acts on it. Optional under `agent-command`: omitted says the provider imposes no deadline, and Omni counts nothing down. |
|
|
2402
|
+
| `completionMode` | `agent-command` waits for the channel's `complete` command; `provider-automatic` completes without one, and takes the agent's `complete` as finishing early. A required outcome is the agent's to give, so it needs `agent-command` (`task.outcomes.required.mode`). |
|
|
2403
|
+
| `wrapAllowance` | Fixed time allowed to complete the task after primary interaction ends. For real-time audio, it begins after `task-audio-ended`. Required under `provider-automatic`, where the provider acts on it. Optional under `agent-command`: omitted says the provider imposes no deadline, and Omni counts nothing down. `0` is no wrap at all, so a task with it publishes no `outcomes` (`task.outcomes.wrapAllowance`). |
|
|
2398
2404
|
| `attributes` | Optional ordered, typed `TaskAttribute` entries with keys unique within the task. Each contact or timestamp is a separate array item; new attribute shapes require new union members. |
|
|
2399
2405
|
| `history` | The call record: `steps` — the ordered interaction history of this open task, one entry per occurrence, oldest first — and what they add up to before this agent, `interactionSeconds`, `holdSeconds`, `queueSeconds`, `transfers`, each present when the provider knows it. Live task data restated with the task, not a permanent archive. See **Interaction history**. |
|
|
2400
|
-
| `onCall` | Voice only. Who is on the call, or being brought onto it, as the provider states it, replaced whole with the task: `party` is the customer -- carrying a `stage` while being dialled again on the same task, a connect-back with the agent application's `dialId` or a platform's callback without, ringing from the moment the dial is placed and joined on its answered outcome --, `agent` a person by user id, `
|
|
2406
|
+
| `onCall` | Voice only. Who is on the call, or being brought onto it, as the provider states it, replaced whole with the task: `party` is the customer -- carrying a `stage` while being dialled again on the same task, a connect-back with the agent application's `dialId` or a platform's callback without, ringing from the moment the dial is placed and joined on its answered outcome --, `agent` a person by user id, `conferenced` somebody a dial is bringing in, listed from the moment the dial is placed -- with the `destinationId` dialled, the `dialId` where an agent application placed it, the `stage` reached (`ringing` until answered, `joined` after), and `held: true` on anyone joined and parked. `label` names a destination -- a person, a queue -- not a phrase; the agent application supplies the verb. Present when the provider knows the room, absent when it does not. See **Every dial has an outcome**. |
|
|
2401
2407
|
| `leadAssist` | Voice only. Present from the agent's request for a lead until the lead leaves or the request ends: `requested` while nobody has joined, `joined` with the lead's `leadId` once somebody has. See **Lead assist**. |
|
|
2402
2408
|
| `takenOver` | Voice only, on a task that reached this agent by a lead's take-over: which member the call was taken from, and when. It is an ordinary assignment with the call's history, offered whatever break the lead is on and counted against their capacity like any other call. See **Lead assist**. |
|
|
2403
2409
|
|
|
@@ -2435,12 +2441,10 @@ The canonical task transitions are:
|
|
|
2435
2441
|
| `preview` | The call goes out and nobody answers | `completing` |
|
|
2436
2442
|
| `preview` | The preparation target passes with `atDeadline: "waits"` | Remains `preview`, waiting for the agent to press Call |
|
|
2437
2443
|
| `pending` | Provider withdraws the assignment, the agent declines, or the party abandons the ring | Removed by `task-ended` with `cancelled` outcome, `by` saying which |
|
|
2438
|
-
| `pending` | The offer
|
|
2444
|
+
| `pending` | The offer's `expiresInSeconds` runs out | Removed by `task-ended` with `expired` outcome naming `pending` |
|
|
2439
2445
|
| No task | Snapshot reports work already underway | `in-progress` |
|
|
2440
2446
|
| `in-progress` | Provider or agent pauses the task | `paused` |
|
|
2441
|
-
| `in-progress` | Agent starts a warm transfer (`transfer` `warm`); the customer is parked | `paused` |
|
|
2442
2447
|
| `paused` | Provider or agent resumes the task | `in-progress` |
|
|
2443
|
-
| `paused` | Agent cancels a warm transfer (`transfer` `cancel`) | `in-progress` |
|
|
2444
2448
|
| `in-progress` or `paused` | Contact interaction ends and follow-up work remains | `completing` |
|
|
2445
2449
|
| `completing` | Agent connects back to the party (`connect-back`) | `in-progress` |
|
|
2446
2450
|
| Any phase | Provider emits `task-ended` | Removed |
|
|
@@ -2485,9 +2489,9 @@ const previewed = {
|
|
|
2485
2489
|
capabilities: {},
|
|
2486
2490
|
phase: "preview",
|
|
2487
2491
|
party: { name: "Maya Rao", number: "+919876543210" },
|
|
2488
|
-
|
|
2492
|
+
previewEndsInSeconds: 120,
|
|
2489
2493
|
atDeadline: "provider-dials",
|
|
2490
|
-
} satisfies Pick<Task<"voice">, "channel" | "capabilities" | "phase" | "party" | "
|
|
2494
|
+
} satisfies Pick<Task<"voice">, "channel" | "capabilities" | "phase" | "party" | "previewEndsInSeconds" | "atDeadline">;
|
|
2491
2495
|
|
|
2492
2496
|
// The agent presses Call. It is a dial like any other.
|
|
2493
2497
|
const pressed: TaskCommand<"voice"> = { type: "dial", dialId: "dial-7f2" };
|
|
@@ -2505,8 +2509,9 @@ is work, not a cancellation. A `preview` task therefore needs a manifest that sa
|
|
|
2505
2509
|
(`task.preview.dialOutcomes.required`).
|
|
2506
2510
|
|
|
2507
2511
|
**Preparation and trigger ownership are per task.** Unlimited preparation omits both
|
|
2508
|
-
`
|
|
2509
|
-
carries the provider
|
|
2512
|
+
`previewEndsInSeconds` and `atDeadline`: only an agent pressing Call starts dialing. Fixed
|
|
2513
|
+
preparation carries the seconds the provider says are left, counted down on the desk from the
|
|
2514
|
+
publication that carried them and restated on every later one, and exactly one trigger owner:
|
|
2510
2515
|
|
|
2511
2516
|
| Declaration | At preparation end |
|
|
2512
2517
|
| --- | --- |
|
|
@@ -2551,14 +2556,14 @@ Submission acceptance is never an answered outcome or permission to publish `in-
|
|
|
2551
2556
|
Unsupported source correlation/outcome/audio evidence remains an integration blocker.
|
|
2552
2557
|
|
|
2553
2558
|
**Drop both fields when the phase moves.** A provider that builds the `in-progress` task by
|
|
2554
|
-
spreading the `preview` one carries `
|
|
2559
|
+
spreading the `preview` one carries `previewEndsInSeconds` and `atDeadline` with it, and the agent application refuses
|
|
2555
2560
|
the update (`task.preview.deadline.unexpected`): the desk keeps the task as it last stood, and the
|
|
2556
2561
|
provider is told through `refused` exactly which rule, so the state that looked right on its side
|
|
2557
2562
|
is named on its side. The task past preview has no deadline to wait for, so it carries neither
|
|
2558
2563
|
field.
|
|
2559
2564
|
|
|
2560
|
-
**Provider execution and agent application controls are distinct.** Answer, hold/resume,
|
|
2561
|
-
|
|
2565
|
+
**Provider execution and agent application controls are distinct.** Answer, hold/resume, conference,
|
|
2566
|
+
lead assist and interaction completion are executed by the provider
|
|
2562
2567
|
through the adapter. The task's applicable capability, phase, completion mode and command-specific
|
|
2563
2568
|
prerequisites decide which controls are offered. Caller disconnect also executes at the provider. Microphone mute is agent application-owned, never a provider
|
|
2564
2569
|
TaskCommand or task capability. The separately declared agent application recording facility keeps its existing
|
|
@@ -2586,7 +2591,7 @@ become a caller-disconnect operation.
|
|
|
2586
2591
|
**A task is never its audio.** A voice task represents the agent’s interaction: the call is offered when it is
|
|
2587
2592
|
routed to the agent and accepted as its `acceptance` dictates, and its presence and phase follow
|
|
2588
2593
|
the provider's reports about the work — never the audio. Wherever audio moves — an offer, a hold, a
|
|
2589
|
-
|
|
2594
|
+
conference leg joining or leaving, a lead joining, a take-over, a connect-back — the audio follows
|
|
2590
2595
|
separately, arriving on `task-audio-started`, attaching through `openAudio` and ending with
|
|
2591
2596
|
`task-audio-ended`. Omni does not ring,
|
|
2592
2597
|
bridge, or hold a line. How the phone rings, whether it rings at all, and where legs join and leave
|
|
@@ -2610,6 +2615,19 @@ and `assertAudioFollowsTheTask` holds any sequence.
|
|
|
2610
2615
|
the task open until Omni sends the channel's `complete` command. With `provider-automatic`, the
|
|
2611
2616
|
provider may complete the task without receiving that command.
|
|
2612
2617
|
|
|
2618
|
+
**The agent may finish early under either mode.** `complete` is issuable wherever there is a wrap
|
|
2619
|
+
to cut short: under `agent-command` it is the end, and under `provider-automatic` it says the agent
|
|
2620
|
+
is done before the allowance ran out, and the provider is free to end the task at once. Only a task
|
|
2621
|
+
with no wrap at all -- `wrapAllowance: 0` -- has nothing to complete, and the command is refused
|
|
2622
|
+
there (`command.complete.wrapAllowance`). An ending the agent asked for says so, `completed` with
|
|
2623
|
+
`by: "agent"`, whichever mode the task was under.
|
|
2624
|
+
|
|
2625
|
+
**A required outcome is the agent's to give.** A task whose `outcomes` says `required: true` waits
|
|
2626
|
+
for a code the agent chooses, so it completes on the agent's command: `provider-automatic` cannot
|
|
2627
|
+
wait for it, and the pair is refused (`task.outcomes.required.mode`). Optional outcomes may ride on
|
|
2628
|
+
a task the provider completes itself; the agent gives one if in time. And a code is given in wrap,
|
|
2629
|
+
so a task with `wrapAllowance: 0` publishes no `outcomes` at all (`task.outcomes.wrapAllowance`).
|
|
2630
|
+
|
|
2613
2631
|
`wrapAllowance` is independent of that decision. It is fixed, and when it starts depends on
|
|
2614
2632
|
whether the channel carries real-time audio:
|
|
2615
2633
|
|
|
@@ -2626,8 +2644,9 @@ is optional: a conversation with nothing to wrap moves from `in-progress` to `ta
|
|
|
2626
2644
|
`completing` is never published. Under `provider-automatic` with a non-zero `wrapAllowance` it is
|
|
2627
2645
|
required, because the clock has to start somewhere: a chat or email task the provider completes
|
|
2628
2646
|
from `in-progress` with an allowance to run gave the agent none of it, and the stream refuses the
|
|
2629
|
-
ending (`stream.taskEnded.unwrapped`)
|
|
2630
|
-
|
|
2647
|
+
ending (`stream.taskEnded.unwrapped`); an ending the agent's own `complete` brought forward says
|
|
2648
|
+
`by: "agent"` and is not that. Under `agent-command` the agent's `complete` is the end, from
|
|
2649
|
+
`in-progress` or from `completing` alike.
|
|
2631
2650
|
|
|
2632
2651
|
```ts
|
|
2633
2652
|
const emailCompletion = {
|
|
@@ -2639,8 +2658,9 @@ const emailCompletion = {
|
|
|
2639
2658
|
In this example, the agent has two minutes after sending the email to add notes, select a
|
|
2640
2659
|
outcome, and complete the task.
|
|
2641
2660
|
|
|
2642
|
-
`0` means
|
|
2643
|
-
|
|
2661
|
+
`0` means there is no wrap: under `provider-automatic` the provider completes the task at the
|
|
2662
|
+
end of the interaction, and under `agent-command` it completes on the interaction's end without
|
|
2663
|
+
waiting for `complete`, which has nothing to cut short and is refused.
|
|
2644
2664
|
|
|
2645
2665
|
There is no value meaning "unlimited", because a number that is not a duration would be read as
|
|
2646
2666
|
one. A provider that imposes no deadline says so by **omitting** `wrapAllowance`, which
|
|
@@ -2680,7 +2700,7 @@ deadline.
|
|
|
2680
2700
|
|
|
2681
2701
|
**The room shows the party being dialled.** From the moment any agent application dial places the party -- a
|
|
2682
2702
|
dialpad call, a preview Call, a connect-back -- the `party` entry carries `stage: "ringing"` and
|
|
2683
|
-
the agent application's `dialId`, exactly as a
|
|
2703
|
+
the agent application's `dialId`, exactly as a conferenced entry does from its dial; `joined` on
|
|
2684
2704
|
the publication that follows the answered `dial-outcome` and never before it
|
|
2685
2705
|
(`stream.taskUpdated.stage`); and no stage from the next publication on, so `joined` is transient
|
|
2686
2706
|
and a later copy still carrying it is stale (`stream.taskUpdated.stage.lingering`). An agent application shows a
|
|
@@ -2742,7 +2762,7 @@ Migration from the earlier spellings:
|
|
|
2742
2762
|
| HANDLING_STEPS_WITH_A_PERSON, HANDLING_STEPS_THAT_DIAL, and their INTERACTION spellings | `HISTORY_STEPS_WITH_A_PERSON`, `HISTORY_STEPS_THAT_DIAL` |
|
|
2743
2763
|
| handlingStepExpectsAPerson, handlingStepDials, and their interaction spellings | `historyStepExpectsAPerson`, `historyStepDials` |
|
|
2744
2764
|
| handleSeconds | `interactionSeconds` |
|
|
2745
|
-
| Task.allocationId, AllocationId, allocationExpiresAt | `Task.assignmentId`, `AssignmentId`, `
|
|
2765
|
+
| Task.allocationId, AllocationId, allocationExpiresAt | `Task.assignmentId`, `AssignmentId`, `expiresInSeconds` |
|
|
2746
2766
|
| Task.id, TaskId, and `taskId` on every event, command, report and lead request | gone: a task is named by `assignmentId` alone, and `assignmentKey(providerId, assignmentId)` scopes it |
|
|
2747
2767
|
| taskKey, omni.task-not-found, PROVIDER_NAME__TASK_ID__TAB_NAME (ProviderName.TaskId.TabName) | `assignmentKey`, `omni.assignment-not-found`, `PROVIDER_NAME__ASSIGNMENT_ID__TAB_NAME` (`ProviderName.AssignmentId.TabName`) |
|
|
2748
2768
|
| Manifest.disposalSettleMs | `Manifest.completionSettleMs` |
|
|
@@ -2752,6 +2772,12 @@ Migration from the earlier spellings:
|
|
|
2752
2772
|
| Snapshot.scheduledActivities, and scheduledActivities on calendar-updated | `calendar` in both |
|
|
2753
2773
|
| availability reserved | `elsewhere` |
|
|
2754
2774
|
| recording destinationId, HostRecording.destinationIds | `storageId`, `storageIds` (`recording.storage`, `recording.host.storage`) |
|
|
2775
|
+
| coldTransfer, warmTransfer, the transfer command and its four actions, the consulted role, the transferred outcome | gone: help arrives by **Lead assist**; the `transferred` history step and the `transfers` total stay, since the platform's own routing still changes hands |
|
|
2776
|
+
| assignmentExpiresAt on task-offered, previewEndsAt on the task | `expiresInSeconds`, `previewEndsInSeconds`: seconds left from the publication, never an instant (`event.taskOffered.expiresInSeconds`, `task.preview.previewEndsInSeconds`) |
|
|
2777
|
+
| TeamMembers.requests, LeadRequest | `TeamMember.request` (`MemberRequest`): the ask rides on the member (`team.member.request.*`) |
|
|
2778
|
+
| team-updated on every change | `team-updated` whole once after the switch and on snapshots; `team-member-updated`, `team-member-removed`, `team-policies-updated` after (`stream.team.baseline`, `stream.teamMember.unknown`) |
|
|
2779
|
+
| RecordingCommand.requestId | gone: no request identity; a partial effect is a settled `failed` under `omni.recording-unsettled` |
|
|
2780
|
+
| command.complete.mode | `command.complete.wrapAllowance`: `complete` under either mode, refused only with no wrap |
|
|
2755
2781
|
|
|
2756
2782
|
Update producers, consumers, saved task snapshots, and validation-rule assertions together.
|
|
2757
2783
|
History and report rule names use `history` and `historyReport`; assignment rules use
|
|
@@ -2864,7 +2890,7 @@ observed. No other step has it (`task.history.mutedBy`, `.mutedBy.unexpected`).
|
|
|
2864
2890
|
**A step that dialled says which dial and where.** `transferred`, `conferenced` and `unanswered`
|
|
2865
2891
|
each end a dial, so the entry carries the `destinationId` it went to and, where an agent application placed it, the
|
|
2866
2892
|
`dialId` the agent application minted; no other step dialled, and either field on one is refused
|
|
2867
|
-
(`task.history.dialId.unexpected`). This is how a dial made before a
|
|
2893
|
+
(`task.history.dialId.unexpected`). This is how a dial made before a take-over is placeable
|
|
2868
2894
|
by whoever holds the task now: a `dial-outcome` naming a `dialId` the agent application never minted is looked
|
|
2869
2895
|
up in the record, not discarded.
|
|
2870
2896
|
|
|
@@ -2877,7 +2903,7 @@ Four rules a provider has to keep:
|
|
|
2877
2903
|
- **Omit `seconds` while it is unknown. Never send `0`.** A leg still talking is not a zero-second
|
|
2878
2904
|
conversation, and on live data that is the ordinary case rather than an edge. A zero is rejected.
|
|
2879
2905
|
- **`by` is a bare `UserId`, and not necessarily an agent.** A lead or a manager takes part
|
|
2880
|
-
during an interaction too — a
|
|
2906
|
+
during an interaction too — a call taken over, a call conferenced in — so the field names whoever it was,
|
|
2881
2907
|
the same way `ForcedBreak.by` does. It comes from this provider's own directory, the same
|
|
2882
2908
|
namespace as `AuthenticationState.identity.id` and the team member list, so entries pair
|
|
2883
2909
|
within a provider and never across one.
|
|
@@ -2948,12 +2974,13 @@ can be muted by the agent application, and answers `recorded` with the canonical
|
|
|
2948
2974
|
`.mutedBy.unexpected`). On a desk phone the microphone is the phone's:
|
|
2949
2975
|
the agent application mutes nothing and records nothing.
|
|
2950
2976
|
|
|
2951
|
-
**The
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2977
|
+
**The record is a record.** The microphone is the agent application's, and nothing in the
|
|
2978
|
+
history moves it: a `muted` entry the provider publishes, or closes with a final `seconds`, is the
|
|
2979
|
+
provider's account of a leg the agent application reported, and the mute itself ends only when the
|
|
2980
|
+
agent, or the station, ends it. The agent application keeps its own mute state, reports each leg
|
|
2981
|
+
as it begins and ends, and takes the provider's published entry as the closed account of that leg:
|
|
2982
|
+
it does not reopen the leg, replace the provider's timestamp, or overwrite the provider's final
|
|
2983
|
+
duration with a later report. A later agent mute is a new leg, never a reopening of the ended one.
|
|
2957
2984
|
|
|
2958
2985
|
Correlate the provider-published `muted` entry using the provider-selected `at` acknowledged
|
|
2959
2986
|
for the current report key; a final `seconds` closes that leg under the history contract.
|
|
@@ -3213,8 +3240,7 @@ See **Which commands need a capability**.
|
|
|
3213
3240
|
| `endCall` | Primary button: End call | The provider ends the agent's channel and every channel the agent added; the caller continues on the provider's path. The task goes to its wrap. See **Ending a call, and removing one person from it**. |
|
|
3214
3241
|
| `terminateCall` | Primary button: Terminate call | The provider ends the whole call: every channel on it, the agent's, the caller's, any colleague's and anyone else's. The task goes to its wrap. See **Ending a call, and removing one person from it**. |
|
|
3215
3242
|
| `connectBack` | Completing-task button: Connect back | Omni may have the provider connect the agent back to the task's party while the task is `completing`, returning it to `in-progress` on the same task. Not offered where there is no `completing` window: `provider-automatic` with a zero allowance completes the task at provider end. See **Connecting back during completion**. |
|
|
3216
|
-
| `
|
|
3217
|
-
| `warmTransfer` | Secondary menu item: Warm transfer | Omni may park the customer and call a destination first, then hand the customer over or cancel back. See **Warm transfer**. |
|
|
3243
|
+
| `schedule` | Secondary menu item: Schedule | Omni may put a follow-up for this party on the calendar, from the call or from its wrap: a time, and a note. See **Scheduling a follow-up**. |
|
|
3218
3244
|
| `leadAssist` | Secondary menu item: Lead assist | Omni may ask a lead to join this call, with a note. The lead's decision reaches the agent on `Task.leadAssist`. See **Lead assist**. |
|
|
3219
3245
|
| `conference` | Secondary button: Conference | Omni may dial a destination into the active call, and remove one person from it -- a conferenced entry, one still ringing included, which calls the dial off, or the party, leaving the agent with the colleague. See **Ending a call, and removing one person from it**. |
|
|
3220
3246
|
| `recording` | Overflow menu item: Recording | Per-task provider and agent application policies expose only their permitted recording actions; each has independent state and routing. |
|
|
@@ -3222,10 +3248,10 @@ See **Which commands need a capability**.
|
|
|
3222
3248
|
|
|
3223
3249
|
### Publishing codes and destinations
|
|
3224
3250
|
|
|
3225
|
-
|
|
3226
|
-
`outcomes
|
|
3227
|
-
|
|
3228
|
-
|
|
3251
|
+
Two capabilities accept an object when the provider wants Omni to render real choices. For
|
|
3252
|
+
`outcomes`, `true` remains valid and means "offer the control with nothing published"; the one
|
|
3253
|
+
directory control, `conference`, carries its directory or is refused, since once nothing is typed
|
|
3254
|
+
the directory is the control.
|
|
3229
3255
|
|
|
3230
3256
|
#### `outcomes`
|
|
3231
3257
|
|
|
@@ -3271,11 +3297,11 @@ capabilities: {
|
|
|
3271
3297
|
With `outcomes: true` Omni shows a Complete control and sends `complete` with no code, because
|
|
3272
3298
|
the provider published none.
|
|
3273
3299
|
|
|
3274
|
-
#### `
|
|
3300
|
+
#### `conference`
|
|
3275
3301
|
|
|
3276
3302
|
```ts
|
|
3277
3303
|
capabilities: {
|
|
3278
|
-
|
|
3304
|
+
conference: {
|
|
3279
3305
|
destinations: [
|
|
3280
3306
|
{ id: "tier2", label: "Tier 2 support" },
|
|
3281
3307
|
{ id: "main-menu", label: "Back to the main menu" },
|
|
@@ -3287,7 +3313,7 @@ capabilities: {
|
|
|
3287
3313
|
| Field | Contract |
|
|
3288
3314
|
| --- | --- |
|
|
3289
3315
|
| `destinations` | The items the control offers, at least one, with unique `id` values. Each is a button or a menu item on the desk. |
|
|
3290
|
-
| `id` | What Omni sends as `destinationId` on a `
|
|
3316
|
+
| `id` | What Omni sends as `destinationId` on a `conference` command, and what the provider executes. |
|
|
3291
3317
|
| `label` | What the agent reads. |
|
|
3292
3318
|
|
|
3293
3319
|
**The protocol does not say what an item does.** A queue, an IVR menu, an outside line, a
|
|
@@ -3299,7 +3325,7 @@ reason (`task.destinations.shape`): once nothing is typed, the directory is the
|
|
|
3299
3325
|
|
|
3300
3326
|
**The provider chooses the supported destinations.** A published item may route to an IVR,
|
|
3301
3327
|
queue, named agent or another configured destination. No destination kind is inferred from its
|
|
3302
|
-
label. The agent application offers only the directory attached to this task's
|
|
3328
|
+
label. The agent application offers only the directory attached to this task's `conference` capability,
|
|
3303
3329
|
and sends the exact destination ID; it does not invent an agent picker or arbitrary dial target.
|
|
3304
3330
|
The provider rechecks eligibility and executes the routing. Returning to an IVR or queue does not
|
|
3305
3331
|
end the caller journey; a later assignment to the same agent is a new interaction.
|
|
@@ -3317,7 +3343,7 @@ provider. Two of them end the agent's part; they differ in what happens to the c
|
|
|
3317
3343
|
```
|
|
3318
3344
|
|
|
3319
3345
|
**`end-call` ends my part.** The agent's channel and every channel the agent added -- a
|
|
3320
|
-
conferenced colleague, a
|
|
3346
|
+
conferenced colleague, a lead who joined -- end, and the caller continues on the path the
|
|
3321
3347
|
provider decides: another IVR, a queue, a survey, or the end of the call. Gated by `endCall`.
|
|
3322
3348
|
|
|
3323
3349
|
**`terminate-call` ends the whole call.** Every channel on it ends at the provider: the agent's,
|
|
@@ -3339,53 +3365,33 @@ when it acts.
|
|
|
3339
3365
|
for the rest; it is gated by `conference`, since it only means something with a third person on
|
|
3340
3366
|
the line. Removing the party leaves the agent with the colleague, a warm hand-over in reverse. A
|
|
3341
3367
|
remove that would leave the agent alone is not a remove but an `end-call`, and a provider answers
|
|
3342
|
-
it `failed`.
|
|
3343
|
-
`cancel` is its own step, which returns the agent to the parked customer, and a remove never
|
|
3344
|
-
promises that.
|
|
3368
|
+
it `failed`.
|
|
3345
3369
|
|
|
3346
|
-
|
|
3370
|
+
**There is no transfer.** The agent hands the call to nobody, cold or warm: help arrives by
|
|
3371
|
+
**Lead assist**, where a lead joins the call or takes it over, and a call that changes hands does
|
|
3372
|
+
so on the platform's own routing -- an IVR return, a queue, a lead's take-over -- with the record
|
|
3373
|
+
saying so in a `transferred` step and the `transfers` total. Nothing the agent commands moves the
|
|
3374
|
+
caller to somebody else.
|
|
3347
3375
|
|
|
3348
|
-
|
|
3349
|
-
then either hands the customer over or returns to them. Cold and warm are the words agents use;
|
|
3350
|
-
telephony says blind and consult. It is its own capability, distinct from `coldTransfer` (a
|
|
3351
|
-
hand-over with nobody spoken to first) and from `conference` (everybody on one call): a queue may
|
|
3352
|
-
offer any of the three without the others, and each is declared on its own.
|
|
3376
|
+
#### Scheduling a follow-up
|
|
3353
3377
|
|
|
3354
|
-
|
|
3355
|
-
|
|
3356
|
-
|
|
3357
|
-
// while the call to it stands.
|
|
3358
|
-
{ type: "transfer", action: "warm", dialId: "dial-7f2", destinationId: "tier2" }
|
|
3359
|
-
|
|
3360
|
-
// 2a. Hand the customer to the consulted destination and leave.
|
|
3361
|
-
{ type: "transfer", action: "complete" }
|
|
3378
|
+
An agent on a call promises to call back on Thursday, or in wrap writes up that the customer wants
|
|
3379
|
+
a callback once the refund lands. The follow-up goes on the calendar, and the platform owns the
|
|
3380
|
+
calendar: `schedule` asks the provider to put it there.
|
|
3362
3381
|
|
|
3363
|
-
|
|
3364
|
-
|
|
3382
|
+
```ts
|
|
3383
|
+
// From the call, or from its wrap: the time, and a note where the agent wrote one.
|
|
3384
|
+
{ type: "schedule", at: "2026-08-28T10:00:00Z", note: "Call back about the refund" }
|
|
3365
3385
|
```
|
|
3366
3386
|
|
|
3367
|
-
`
|
|
3368
|
-
|
|
3369
|
-
and
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
|
|
3374
|
-
|
|
3375
|
-
that offers `warmTransfer` implements all three.
|
|
3376
|
-
|
|
3377
|
-
`applied` on `complete` says the provider is bridging the customer to the destination and
|
|
3378
|
-
dropping the agent's leg. What follows is what follows any call the agent leaves: the agent's
|
|
3379
|
-
audio ends and the provider reports `task-audio-ended`, the task moves to `completing`, any wrap
|
|
3380
|
-
allowance runs, and the task ends `completed` as any call does. A warm complete is not a completion:
|
|
3381
|
-
the agent has a wrap to do, so nothing is owed within `completionSettleMs`. `transferred` names a
|
|
3382
|
-
cold transfer alone, where the agent had no wrap. `applied` on `cancel` says the destination is
|
|
3383
|
-
dropped; the task returns to `in-progress` with the `consulted` entry gone. Omni waits for the
|
|
3384
|
-
provider's report of both, as it does for every command.
|
|
3385
|
-
|
|
3386
|
-
A destination that does not answer is a dial that ended: the provider reports its `dial-outcome`,
|
|
3387
|
-
returns the task to `in-progress` with no `consulted` entry, and the agent is back with the
|
|
3388
|
-
customer.
|
|
3387
|
+
`schedule` is gated by the `schedule` capability and issuable in `in-progress`, `paused` or
|
|
3388
|
+
`completing` (`command.phase.interaction`): a follow-up is promised on the call and written up in
|
|
3389
|
+
wrap alike, and the task names the party it is for. `applied` says the provider has taken it; the
|
|
3390
|
+
activity itself arrives on `calendar-updated`, which is the provider's word that it stands, as
|
|
3391
|
+
every calendar entry does. The command carries a time and a note and nothing else
|
|
3392
|
+
(`command.schedule.at`, `command.schedule.note`, `command.field`): what the platform makes of a
|
|
3393
|
+
follow-up -- a campaign record, a reminder, a scheduled dial -- is its own, and the agent sees it
|
|
3394
|
+
on the calendar.
|
|
3389
3395
|
|
|
3390
3396
|
### Chat capabilities
|
|
3391
3397
|
|
|
@@ -3462,7 +3468,7 @@ inside Omni.
|
|
|
3462
3468
|
|
|
3463
3469
|
## Every dial has an outcome
|
|
3464
3470
|
|
|
3465
|
-
|
|
3471
|
+
Four commands place a call: `dial()` from the idle dialpad, the `dial` command from preview, a
|
|
3466
3472
|
`conference` `add`, and `connect-back`. Each is accepted or refused at once, and each then ends later
|
|
3467
3473
|
and apart from its answer -- the destination picks up, is busy, or never does -- and a dial placed
|
|
3468
3474
|
late in a call routinely outlives the call. Nothing in between is reported: the wire says
|
|
@@ -3484,13 +3490,13 @@ expect(result).toEqual({ status: "dialling", dialId: "dial-7f2" });
|
|
|
3484
3490
|
// 3. On the outcome, however late, against the task it belonged to.
|
|
3485
3491
|
const outcome: ProviderEvent<"voice"> = { type: "dial-outcome", dialId: "dial-7f2", assignmentId, destinationId: "tier2", outcome: "no-answer", reason: "No route to destination" };
|
|
3486
3492
|
|
|
3487
|
-
// 4. In the record, so a dial made before a
|
|
3493
|
+
// 4. In the record, so a dial made before a take-over is placeable by whoever holds the task now.
|
|
3488
3494
|
const step: TaskHistoryStep = { step: "unanswered", at: "2026-08-21T09:15:30Z", by: "A-12", dialId: "dial-7f2", destinationId: "tier2" };
|
|
3489
3495
|
```
|
|
3490
3496
|
|
|
3491
3497
|
The identity is a correlation handle between agent application and provider and **is never shown to the
|
|
3492
3498
|
agent**. An agent application holding several tasks places an outcome by the `dialId` it minted; one it did not
|
|
3493
|
-
mint -- a dial made by the previous agent before a
|
|
3499
|
+
mint -- a dial made by the previous agent before a take-over -- it finds on the task's `onCall` or in
|
|
3494
3500
|
its `history`, which is why the steps that dial carry it. The `dialId` is not a retry key:
|
|
3495
3501
|
Omni never repeats a dial, and a command still carries no key for that purpose.
|
|
3496
3502
|
|
|
@@ -3523,7 +3529,7 @@ call it belonged to and never against the next one.
|
|
|
3523
3529
|
The stream knows a dial from three places: `TaskStream.dialled(dialId)`, which an agent application calls when it
|
|
3524
3530
|
places one; an entry on a task's `onCall`; and a step in its `history`. Since a dialled entry
|
|
3525
3531
|
is listed from placement, `dialled()` is load-bearing only for a dial that never has an entry -- a
|
|
3526
|
-
|
|
3532
|
+
connect-back, an idle dialpad call -- or whose entry has already left the room; an
|
|
3527
3533
|
outcome for a dial nobody placed and no task mentions is what `stream.dialOutcome.unknown` refuses.
|
|
3528
3534
|
|
|
3529
3535
|
**`answered` says what happened to the dial; `onCall` says who is in the room.** They are two
|
|
@@ -3541,8 +3547,8 @@ provider does report -- `busy`, `no-answer`, `unreachable`, `rejected` or `cance
|
|
|
3541
3547
|
(`manifest.dialOutcomes.unexplained.alone`): a provider that reports causes may honestly say the
|
|
3542
3548
|
switch gave none, while one that reports none would be sending the generic failure this set exists
|
|
3543
3549
|
to refuse. A provider that dials at all declares it: an idle
|
|
3544
|
-
dialpad requires it (`manifest.dialOutcomes.required`), and a task that declares `connectBack
|
|
3545
|
-
|
|
3550
|
+
dialpad requires it (`manifest.dialOutcomes.required`), and a task that declares `connectBack`
|
|
3551
|
+
or `conference` under a manifest without it is refused
|
|
3546
3552
|
(`task.capability.dialOutcomes.required`). Off voice nothing dials, and the field is a compile
|
|
3547
3553
|
error there.
|
|
3548
3554
|
|
|
@@ -3560,10 +3566,10 @@ const onCall: OnCall[] = [
|
|
|
3560
3566
|
```
|
|
3561
3567
|
|
|
3562
3568
|
`party` is the customer and `agent` a person by user id; neither was dialled from anywhere, so
|
|
3563
|
-
neither carries a destination.
|
|
3569
|
+
neither carries a destination. A `conferenced` colleague was, so the entry carries the
|
|
3564
3570
|
`destinationId` of the directory item and, where an agent application's dial brought them, its `dialId`; a person
|
|
3565
3571
|
the platform added itself carries none. `held: true` is presence as claim. A snapshot establishes state, so an agent application that attaches
|
|
3566
|
-
after a
|
|
3572
|
+
after a take-over reads the room from here rather than inferring it from a sequence of outcomes it
|
|
3567
3573
|
never saw.
|
|
3568
3574
|
|
|
3569
3575
|
**`onCall` describes this agent's current interaction.** When the caller disconnects but the agent
|
|
@@ -3574,7 +3580,7 @@ agents' channels ended. A published room receives a final empty view for this in
|
|
|
3574
3580
|
task may remain open for wrap. Completion is a separate task action, not the caller's disconnect.
|
|
3575
3581
|
|
|
3576
3582
|
**A field that describes the present is cleared by the transition that ends it.** `onCall`,
|
|
3577
|
-
`
|
|
3583
|
+
`previewEndsInSeconds` and `atDeadline` are three instances of one shape, and there will be more: each
|
|
3578
3584
|
describes a state that is true now, and each is carried past the moment it stops being true by the
|
|
3579
3585
|
most natural implementation there is, building the next task by spreading the last one. The
|
|
3580
3586
|
provider's own state looks right, the claim on the wire is stale, and only the agent application sees it. An
|
|
@@ -3585,11 +3591,10 @@ describing the room live was never followed by one saying it had emptied, and ev
|
|
|
3585
3591
|
derived anything from it was wrong in a way that looked like its own bug.
|
|
3586
3592
|
|
|
3587
3593
|
**A dialled entry is listed from the moment the dial is placed, not from the answer.** The entry is
|
|
3588
|
-
what
|
|
3589
|
-
|
|
3590
|
-
`
|
|
3591
|
-
|
|
3592
|
-
still-ringing `destinationId` calls that dial off, with `cancelled` as its outcome.
|
|
3594
|
+
what `conference` `remove` names, and a destination the agent cannot call off while it rings is a
|
|
3595
|
+
customer kept waiting with no way back -- which is the very case `cancelled` exists for. The
|
|
3596
|
+
`conferenced` entry appears with its `dialId` when the dial is placed, and a `conference` `remove`
|
|
3597
|
+
naming a still-ringing `destinationId` calls that dial off, with `cancelled` as its outcome.
|
|
3593
3598
|
|
|
3594
3599
|
**The entry says where it stands.** A dialled entry carries `stage`: `ringing` until its dial is
|
|
3595
3600
|
answered, `joined` after. The `dial-outcome` is the transition and the stage is the state, the same
|
|
@@ -3602,9 +3607,8 @@ whose move the stream cannot hold to an outcome: a clean stream proves nothing a
|
|
|
3602
3607
|
than left to whoever placed the dial because that knowledge lives in one process: after a reload,
|
|
3603
3608
|
on a second session, or on a supervisor's screen the snapshot is the only source, and a room that
|
|
3604
3609
|
cannot tell ringing from joined says it contains someone who may never arrive. Nobody ringing is
|
|
3605
|
-
held (`task.onCall.held.ringing`). A
|
|
3606
|
-
|
|
3607
|
-
transfer** states, so the customer is never left parked by a conforming provider.
|
|
3610
|
+
held (`task.onCall.held.ringing`). A colleague who never answers is a dial that ended: the
|
|
3611
|
+
provider restates the room without the entry, and the agent is back with the customer.
|
|
3608
3612
|
|
|
3609
3613
|
The desk shows a dial as placed on `dialling`, never as reached; shows the person in the room when
|
|
3610
3614
|
they appear on `onCall`; and shows the outcome, with the switch's reason, against the call it
|
|
@@ -3764,7 +3768,16 @@ Without that evidence, show the duration without inventing a start or return tim
|
|
|
3764
3768
|
|
|
3765
3769
|
A break applies to the **agent**, not to one provider. When a provider forces one, Omni immediately
|
|
3766
3770
|
requests a break on every other connected provider, or they would keep routing work to somebody who
|
|
3767
|
-
is not there.
|
|
3771
|
+
is not there. On those providers it is the agent's own request, made through `requestBreak` like
|
|
3772
|
+
any other, and the provider grants or denies it as its policy says. **The agent application
|
|
3773
|
+
guarantees the agent cannot cancel those requests, or end the breaks they become,** while the
|
|
3774
|
+
forced break stands: the agent did not ask for them, and a break one provider imposed is not one
|
|
3775
|
+
the agent may lift on another. When the forcing provider ends the forced break, the agent
|
|
3776
|
+
application ends the follow-on breaks it made. Providers should expect that follow-on request.
|
|
3777
|
+
|
|
3778
|
+
`ForcedBreak.by` says who forced it: a lead, by user id, or `provider` where the platform itself
|
|
3779
|
+
did -- on its own rule, a schedule, a compliance hold. The agent sees who, and `getUserDetails()`
|
|
3780
|
+
is owed for a person, never for `provider` (`break.forced.by`).
|
|
3768
3781
|
|
|
3769
3782
|
## Capacity and break actions
|
|
3770
3783
|
|
|
@@ -4132,15 +4145,16 @@ with the authority the flag carries. Nothing the lead does here is a task on the
|
|
|
4132
4145
|
who also takes calls is an agent like any other on the agent side, and a lead who does not want
|
|
4133
4146
|
the agent role for now places themself on a break of a working kind and keeps the team feature on.
|
|
4134
4147
|
|
|
4135
|
-
|
|
4136
|
-
|
|
4137
|
-
|
|
4138
|
-
|
|
4148
|
+
The team reaches the lead whole once, on `team-updated` after the lead switches the feature on
|
|
4149
|
+
and on every snapshot while it is on, and from then on one member at a time: when a member is
|
|
4150
|
+
offered a call, answers, holds, mutes or is taken over, the provider publishes that member whole
|
|
4151
|
+
on `team-member-updated`, so the lead's screen moves when the member's does and a team of two
|
|
4152
|
+
hundred is never resent because one of them held. The agent application asks for nothing and
|
|
4153
|
+
computes nothing. See **`team-updated`** and its companions.
|
|
4139
4154
|
|
|
4140
4155
|
| Field | Contract |
|
|
4141
4156
|
| --- | --- |
|
|
4142
4157
|
| `members` | Every member of this lead's team, whatever their state, each with their open tasks. `[]` says the lead has a team with nobody in it; omitting the team member list says something else entirely — see **The login is the permission** below. |
|
|
4143
|
-
| `requests` | The members currently asking a lead to join their call, each naming the member, the assignment and the note. Always carried, `[]` when nobody is asking. See **Lead assist**. |
|
|
4144
4158
|
| `policies` | The team's policy per capability as it stands — the setting, who set it, and `lockedBy` where a level above the team made it theirs to keep. Present where the provider offers policy control; absent where it does not. See **Who decides what an agent may do**. |
|
|
4145
4159
|
|
|
4146
4160
|
| `TeamMember` field | Contract |
|
|
@@ -4151,6 +4165,7 @@ for nothing and computes nothing.
|
|
|
4151
4165
|
| `break` | Present only while the member has an outstanding break request. See **A member waiting for a break**. |
|
|
4152
4166
|
| `tasks` | The member's open tasks as `MemberTask`s: the same task the member's desk holds, trimmed by the provider. The assignment, title, task type, phase, party, room and audio are what the lead reads; the task's history is carried in the same shape as on the member's desk, as much of it as the provider chooses to send; the workspace — controls, their source, browsers, completion terms — is the member's and travels only if the provider sends it. `[]` when the member holds none; omitted only where the provider cannot see them. |
|
|
4153
4167
|
| `listening` | Present while this lead's channel is in this member's call — listening, coaching or joined — naming which of the member's calls by `assignmentId`, the `mode` they are heard in, and since when. Its appearance is what the lead's audio opens on. One member's call at a time (`team.listening.single`). |
|
|
4168
|
+
| `request` | Present while the member is asking a lead to join one of their calls: which assignment, the note they wrote, since when. The call named is one their `tasks` carry (`team.member.request.assignment`). Absent when they are not asking. See **Lead assist**. |
|
|
4154
4169
|
| `shift` | The member's own history for the day, about the person rather than any one call: `signedInAt`, `signedOutAt` once it has happened, today's totals as the provider counts them — `talkSeconds`, `holdSeconds`, `breakSeconds`, `tasksHandled`, each present only when the provider knows it — and the day's sign-in, sign-out and break `events`, oldest first. Omitted where the provider cannot say. |
|
|
4155
4170
|
|
|
4156
4171
|
Each availability value means one thing:
|
|
@@ -4163,11 +4178,16 @@ Each availability value means one thing:
|
|
|
4163
4178
|
| `elsewhere` | Signed in here, and the agent application holds this agent's capacity for another provider (`count: 0`, agent application-stopped): not receiving this provider's work, and not on a break. See **Capacity**. |
|
|
4164
4179
|
| `signed-out` | Known to this team but not signed in to this provider. |
|
|
4165
4180
|
|
|
4166
|
-
**
|
|
4167
|
-
adapter over a best-effort channel with no ordering and no delivery guarantee, so
|
|
4168
|
-
|
|
4169
|
-
|
|
4170
|
-
|
|
4181
|
+
**Publish the whole team once, then each member whole.** Team presence typically reaches an
|
|
4182
|
+
adapter over a best-effort channel with no ordering and no delivery guarantee, so the adapter
|
|
4183
|
+
reconciles against its own authoritative read before it publishes anything. What it publishes is
|
|
4184
|
+
the whole team on `team-updated` -- after the switch, and on every snapshot -- and after that one
|
|
4185
|
+
member at a time on `team-member-updated`, carrying the member whole: their availability, their
|
|
4186
|
+
tasks, their listening, their shift, their request, as they now stand. Applying the same member
|
|
4187
|
+
twice changes nothing, so a redelivery is harmless, and a member the team never carried is added
|
|
4188
|
+
by it, as a colleague signing in is. `team-member-removed` takes one off. Never a field of a
|
|
4189
|
+
member, never a task of theirs on its own: a hold on a member's desk is that member republished
|
|
4190
|
+
whole on the lead's, and nothing else on the lead's screen moves.
|
|
4171
4191
|
|
|
4172
4192
|
**Omit `since` rather than inventing one.** Omni renders it as a duration, so a timestamp
|
|
4173
4193
|
synthesised from the adapter's own clock at seed time reads as "on task for 0 seconds" for
|
|
@@ -4176,23 +4196,32 @@ knows when the state actually began. It times the current `availability`, so it
|
|
|
4176
4196
|
that value does.
|
|
4177
4197
|
|
|
4178
4198
|
**The login is the permission.** A team member list goes to a login that declares
|
|
4179
|
-
`capabilities.lead`,
|
|
4180
|
-
|
|
4181
|
-
|
|
4182
|
-
rendering for an agent who leads nobody (`team.required`, `team.unentitled`). What
|
|
4183
|
-
with it comes with the flag: there is no per-action permission on the login or on
|
|
4199
|
+
`capabilities.lead`, once the team feature is on, and to nobody else. Omni never decides who
|
|
4200
|
+
leads a team: the provider said so at sign-in, and the team member list agrees with it — owed,
|
|
4201
|
+
`members: []` included, once a lead has switched the feature on; absent for everybody else, which
|
|
4202
|
+
is the correct rendering for an agent who leads nobody (`team.required`, `team.unentitled`). What
|
|
4203
|
+
the lead may do with it comes with the flag: there is no per-action permission on the login or on
|
|
4204
|
+
the list.
|
|
4184
4205
|
|
|
4185
4206
|
**The lead switches the feature on and off, and the provider is told.** A lead may work as an
|
|
4186
4207
|
agent alone, as agent and lead, or as lead alone, and moves between them on the fly. The
|
|
4187
4208
|
agent application says which with `{ type: "lead-features", enabled }`: while it is on, the
|
|
4188
4209
|
provider sends team events scoped to the lead's team and the lead may act; while it is off, the
|
|
4189
|
-
lead is an ordinary agent,
|
|
4210
|
+
lead is an ordinary agent, nothing of the team is owed or expected (`team.unexpected`,
|
|
4190
4211
|
`event.team.features`), and no lead act is possible, since the lead learns their members'
|
|
4191
|
-
assignments only from the list.
|
|
4192
|
-
|
|
4193
|
-
**The
|
|
4194
|
-
|
|
4195
|
-
|
|
4212
|
+
assignments only from the list.
|
|
4213
|
+
|
|
4214
|
+
**The provider assumes nothing.** The switch is not remembered across connections: the agent
|
|
4215
|
+
application sends `lead-features` on every connect, after it has stated capacity, and until it has
|
|
4216
|
+
the provider treats the feature as off. The connect snapshot therefore carries no team, whatever
|
|
4217
|
+
the login declares; the whole team arrives on `team-updated` once the switch is on, and every
|
|
4218
|
+
snapshot after that carries it. A conformance run switches the feature on for a lead and holds the
|
|
4219
|
+
provider to that first `team-updated` (`team.required`); a team on the connect snapshot is the
|
|
4220
|
+
provider assuming (`team.unexpected`).
|
|
4221
|
+
|
|
4222
|
+
**The team member list never carries the agent it is published to.** A lead does not report to
|
|
4223
|
+
themself: their own break request and their own ask for a lead go up to whoever leads them and
|
|
4224
|
+
appear on *that* person's team member list, as a member with a `request`, while the requester sees
|
|
4196
4225
|
only their own `BreakState` and their task's `leadAssist` move. An adapter whose platform lists the lead
|
|
4197
4226
|
among their own members filters the signed-in identity out before publishing. **Being a lead is a
|
|
4198
4227
|
role the provider knows, never inferred from who is listed:** it is declared at sign-in, a lead
|
|
@@ -4248,8 +4277,8 @@ flow, in order:
|
|
|
4248
4277
|
execute({ assignmentId: "alloc-42", command: { type: "lead-assist", action: "request", note: "Refund dispute, needs approval" } })
|
|
4249
4278
|
// task.leadAssist = { stage: "requested", note: "Refund dispute, needs approval", since }
|
|
4250
4279
|
|
|
4251
|
-
// 2. Every lead with the team feature on sees the request on
|
|
4252
|
-
// team-updated:
|
|
4280
|
+
// 2. Every lead with the team feature on sees the request on the member.
|
|
4281
|
+
// team-member-updated: member: { id: "A-1", ..., request: { assignmentId: "alloc-42", note, since } }
|
|
4253
4282
|
|
|
4254
4283
|
// 3. A lead joins, or declines.
|
|
4255
4284
|
executeTeam({ command: { type: "join", memberId: "A-1", assignmentId: "alloc-42" } })
|
|
@@ -4341,13 +4370,13 @@ The flow, end to end:
|
|
|
4341
4370
|
// 2. The lead's channel joins it in silence. Conditions: the lead's voice channel is free --
|
|
4342
4371
|
// not on a call, not listening elsewhere. Capacity is not involved: nothing is assigned.
|
|
4343
4372
|
executeTeam({ command: { type: "listen", memberId: "A-1", assignmentId: "alloc-42" } })
|
|
4344
|
-
// 3. The provider
|
|
4373
|
+
// 3. The provider publishes the member whole on team-member-updated; the member carries
|
|
4345
4374
|
// listening: { assignmentId: "alloc-42", mode: "listen", since }
|
|
4346
4375
|
// -- the application opens openAudio({ assignmentId: "alloc-42" }) on the lead's connection.
|
|
4347
|
-
// 4. The lead changes how they are heard; the
|
|
4376
|
+
// 4. The lead changes how they are heard; the member is published again with the new listening.mode. The audio stays open.
|
|
4348
4377
|
executeTeam({ command: { type: "coach", memberId: "A-1" } })
|
|
4349
4378
|
executeTeam({ command: { type: "join-call", memberId: "A-1" } })
|
|
4350
|
-
// 5. The lead leaves: the provider
|
|
4379
|
+
// 5. The lead leaves: the provider publishes the member without listening; the application closes the audio.
|
|
4351
4380
|
executeTeam({ command: { type: "leave", memberId: "A-1" } })
|
|
4352
4381
|
// 6. The member's call ends: the same as leave, from the provider's side.
|
|
4353
4382
|
// 7. The lead takes the call: the member loses listening no later than the offer, the application
|
|
@@ -4357,8 +4386,8 @@ executeTeam({ command: { type: "leave", memberId: "A-1" } })
|
|
|
4357
4386
|
executeTeam({ command: { type: "take-over-call", memberId: "A-1" } })
|
|
4358
4387
|
// 8. A join on the member's request is the same flow entered at step 3 with mode: "join-call",
|
|
4359
4388
|
// and the member's task shows leadAssist: joined.
|
|
4360
|
-
// 9. A reload of the lead's application: the
|
|
4361
|
-
// so the audio is reopened.
|
|
4389
|
+
// 9. A reload of the lead's application: the switch is sent again, the team-updated that follows
|
|
4390
|
+
// still carries listening on the member, so the audio is reopened.
|
|
4362
4391
|
```
|
|
4363
4392
|
|
|
4364
4393
|
**`listening` on the member is the state**, restated on every change of mode, naming the call so
|
|
@@ -4423,7 +4452,7 @@ mode stays with the login rather than being inferred from a snapshot or a device
|
|
|
4423
4452
|
|
|
4424
4453
|
Nor does the audio ever stand in for the task: a task's presence and
|
|
4425
4454
|
phase follow the provider's reports about the work, and the audio — attaching, moving through a
|
|
4426
|
-
hold, a
|
|
4455
|
+
hold, a conference, a lead joining or a take-over, and ending — is transient beside it. See **A task is
|
|
4427
4456
|
never its audio** under **Task assignment lifecycle**.
|
|
4428
4457
|
|
|
4429
4458
|
### The agent application reports, the adapter decides
|
|
@@ -4627,7 +4656,7 @@ capability's `notes` setting. A task publishing no codes still receives `complet
|
|
|
4627
4656
|
### Where a command executes
|
|
4628
4657
|
|
|
4629
4658
|
Every command reaches the provider through `execute`, with no branch at the call site, and every
|
|
4630
|
-
command asks the provider to **perform** something: `hold`, `
|
|
4659
|
+
command asks the provider to **perform** something: `hold`, `conference`, `schedule`, `end-call`,
|
|
4631
4660
|
Provider-targeted `recording` commands and the rest act on the platform's own call leg, its bridge, or its record of the
|
|
4632
4661
|
task. Nothing has happened until the provider applies them, and `failed` means nothing happened.
|
|
4633
4662
|
|
|
@@ -4697,7 +4726,7 @@ as by a click. What a call-control headset sends, and what becomes of it:
|
|
|
4697
4726
|
| --- | --- | --- | --- |
|
|
4698
4727
|
| Mute button | The headset, on the HID Telephony usage page: a Phone Mute report on the press, a Mute LED the agent application writes back | A press of the agent application's Mute, performed the agent application's way; the LED follows the agent application's state, so button, light and control are one state with one owner | The `muted` leg, `mutedBy: "host"` |
|
|
4699
4728
|
| Hook switch | The headset, HID Telephony | A press of the agent application's Answer or End call, only where the task is in a phase that has one; the off-hook and ring lights follow the task | The existing `answer` and `end-call` commands |
|
|
4700
|
-
| Flash, redial, speed dial | Older headsets and desk-phone style devices | Flash is Hold and Resume where the task offers `hold`; redial and speed dial map to nothing on a desk
|
|
4729
|
+
| Flash, redial, speed dial | Older headsets and desk-phone style devices | Flash is Hold and Resume where the task offers `hold`; redial and speed dial map to nothing on a desk that never redials, and are ignored | Nothing new |
|
|
4701
4730
|
| Volume up and down | The headset's own amplifier, or the operating system through the consumer-control keys | Nothing: the device and the system handle it | Nothing, except that a speaker at nought is `audio.output.flowing: false` where the agent application can know it |
|
|
4702
4731
|
| Microphone gain and level | The operating system, the headset's own boost | A level meter, so the agent can see they are heard | Nothing: a level is a flicker, not a state |
|
|
4703
4732
|
| Hardware or operating-system mute | A slider on the headset, the system's input mute | Observes it, publishes `flowing: false, mutedBy: "station"`, records the leg during a call, and tells the agent which it is where it knows -- headset or system -- and what to do; an agent application whose mute is `station` clears a system mute itself, a browser can only say so | The report and the leg |
|
|
@@ -4727,18 +4756,17 @@ declared:
|
|
|
4727
4756
|
| `conference` with `action: "remove"` | The `conference` capability, and somebody else on the call: a remove that would leave the agent alone is `end-call`, and a provider answers it `failed`. |
|
|
4728
4757
|
| `decline` | The `decline` capability on any channel, **and** Omni local policy permitting it. One word for refusing an offer, whatever the channel. |
|
|
4729
4758
|
| `dial` | The `preview` phase. A record put in front of an agent is there to be called, so the phase is the gate and there is no capability. It is a dial, with a `dialId` and a `dial-outcome`. |
|
|
4730
|
-
| `complete` | `
|
|
4759
|
+
| `complete` | A wrap to cut short: any task but one with `wrapAllowance: 0`, under either completion mode (`command.complete.wrapAllowance`). The `outcomes` capability decides whether a code travels with the command, never whether the command exists — a task Omni cannot complete never ends. What travels is what the capability published: a code from its list where it has one (`command.complete.outcome.unknown`), a code at all where it requires one (`.outcome.required`), notes as it said (`.notes.required`, `.notes.unexpected`), and neither where the task declares no outcomes (`.outcome.unexpected`). |
|
|
4731
4760
|
| `connect-back` | The `connectBack` capability **and** the `completing` phase. It exists to reach the party again after the call, so it has no meaning while the call is up. |
|
|
4732
|
-
| `
|
|
4733
|
-
| `transfer` with `action: "complete"` or `"cancel"` | A consultation in progress -- a `consulted` entry on `Task.onCall`. Without one there is nothing to complete or cancel, and a provider that receives either answers `failed`. |
|
|
4761
|
+
| `schedule` | The `schedule` capability, in `in-progress`, `paused` or `completing`: a follow-up is promised on the call and written up in wrap alike. |
|
|
4734
4762
|
| `lead-assist` with `action: "request"` or `"cancel"` | The `leadAssist` capability. `cancel` needs a request standing -- `Task.leadAssist` with status `requested`. |
|
|
4735
|
-
| `
|
|
4763
|
+
| `conference` with `action: "add"` | Its capability, and a `destinationId` the directory offered: the id Omni sends is the id the provider published (`command.destination.unknown`). |
|
|
4736
4764
|
| `custom` | A control the task published under `capabilities.custom`, by its `id` (`command.capability.custom`), carrying a non-empty string for each `required` prompt field and strings for any optional fields supplied (`command.custom.prompt`). A toggle carries its target `on` boolean (`command.custom.on`). |
|
|
4737
4765
|
| Everything else | Its own named capability. |
|
|
4738
4766
|
|
|
4739
4767
|
**A control on the contact belongs to the interaction phases**, `in-progress` and `paused`:
|
|
4740
|
-
`hold`, `resume` and `pause`, `end-call` and `terminate-call`, every `
|
|
4741
|
-
every `lead-assist` action
|
|
4768
|
+
`hold`, `resume` and `pause`, `end-call` and `terminate-call`, every `conference` action, and
|
|
4769
|
+
every `lead-assist` action; `schedule` alone reaches into `completing`. These controls act within this agent's current interaction.
|
|
4742
4770
|
In `completing`, that interaction has ended and its wrap work remains. The caller may still be in
|
|
4743
4771
|
an IVR, queue or another agent's interaction, and other channels may remain connected. Completion
|
|
4744
4772
|
of this interaction does not establish that the caller or bridge ended. The capability stays
|
|
@@ -4842,7 +4870,7 @@ The current exceptions and their reasons are:
|
|
|
4842
4870
|
|
|
4843
4871
|
| Case | Exception and reason |
|
|
4844
4872
|
| --- | --- |
|
|
4845
|
-
| Agent application display of provider deadlines (`
|
|
4873
|
+
| Agent application display of provider deadlines (`expiresInSeconds`, `previewEndsInSeconds`, wrap deadline) | Each is seconds from the publication that carried it, counted down on the desk from receipt: the provider's own arithmetic, so no clock is compared and the transport delay is the only error. The countdown estimates the display only; it does not establish that the provider acted. Without usable time, show timing uncertainty. |
|
|
4846
4874
|
| Agent application-triggered preview deadline | A bounded clock estimate with monotonic aging may schedule the agent application's Call command because the provider owns the deadline but the agent application owns the trigger. Do not trigger before the deadline is known to have passed; invalidate on clock discontinuity and reconcile when uncertain. |
|
|
4847
4875
|
| Recording evidence expiry | A bounded observer-domain clock estimate with monotonic aging may assess freshness because observation and expiry belong to the recorder's clock. If time cannot be trusted, recording state is unknown; never renew evidence from receipt or replay. |
|
|
4848
4876
|
| Unknown recording state | `observedAt` and `validUntil` are absent because there is no confirmed observation. The containing provider event still has its own `occurredAt`; that publication is not a recorder observation. |
|
|
@@ -5087,9 +5115,15 @@ multi-provider break**.
|
|
|
5087
5115
|
Offers a task to Omni without a separate offer acknowledgement. An offer does not accept
|
|
5088
5116
|
the task: when its phase is `pending`, Omni applies `autoAcceptTasks` and the task's
|
|
5089
5117
|
`acceptance`. `task-offered` must not introduce a task as `in-progress`; only a reconnect or
|
|
5090
|
-
resync snapshot may report work already in progress. The provider
|
|
5118
|
+
resync snapshot may report work already in progress. The provider includes the task in later
|
|
5091
5119
|
snapshots until it ends.
|
|
5092
5120
|
|
|
5121
|
+
**Every offer is owed an ending.** An assignment the provider introduced is an assignment it ends,
|
|
5122
|
+
with `task-ended` and an outcome, whatever became of the call: answered and completed, declined,
|
|
5123
|
+
withdrawn, abandoned in the ring, lapsed, taken over. An offer that is simply never mentioned
|
|
5124
|
+
again leaves the desk holding a task nobody will close, and the conformance drive names it
|
|
5125
|
+
(`stream.taskOffered.unended`).
|
|
5126
|
+
|
|
5093
5127
|
### `task-updated`
|
|
5094
5128
|
|
|
5095
5129
|
Replaces the current representation of one provider-local task. It is a full task value, not a
|
|
@@ -5133,7 +5167,7 @@ Every outcome ends the task for this agent. On `task-ended`, Omni:
|
|
|
5133
5167
|
A `taken-over` outcome arrives at the member's own completion, after the wrap that follows a
|
|
5134
5168
|
take-over as it follows an `end-call` -- see **Lead assist**.
|
|
5135
5169
|
|
|
5136
|
-
A successful `complete`
|
|
5170
|
+
A successful `complete` command does not clear the task. Omni waits for `task-ended`,
|
|
5137
5171
|
and not for ever: `applied` to a `complete` says the
|
|
5138
5172
|
provider has completed the task, and its `task-ended` follows within the
|
|
5139
5173
|
manifest's `completionSettleMs`. A provider never answers `applied` for a completion it has not yet
|
|
@@ -5199,10 +5233,31 @@ each connected provider.
|
|
|
5199
5233
|
|
|
5200
5234
|
### `team-updated`
|
|
5201
5235
|
|
|
5202
|
-
|
|
5203
|
-
|
|
5204
|
-
|
|
5205
|
-
|
|
5236
|
+
The whole `TeamMembers`, replacing what the lead had. It is emitted once, after the lead switches
|
|
5237
|
+
the team feature on, and to nobody the provider does not publish a team to; every snapshot while
|
|
5238
|
+
the feature is on carries the same whole team. The changes that follow arrive one member at a
|
|
5239
|
+
time, below; the whole team is never resent for one of them. Nothing of the team goes to a login
|
|
5240
|
+
that no longer declares `capabilities.lead` on a republished `authenticated`, or to a lead who
|
|
5241
|
+
turned the feature off (`event.team.features`).
|
|
5242
|
+
|
|
5243
|
+
### `team-member-updated`
|
|
5244
|
+
|
|
5245
|
+
One member, whole, as they now stand: their availability, their tasks, their listening, their
|
|
5246
|
+
shift, their request. It replaces the member of that `id` on the lead's list, or adds them where
|
|
5247
|
+
the list did not carry them, so applying it twice changes nothing. It comes only after the whole
|
|
5248
|
+
team has (`stream.team.baseline`), and it is what a member's hold, answer, mute or take-over
|
|
5249
|
+
publishes to the lead.
|
|
5250
|
+
|
|
5251
|
+
### `team-member-removed`
|
|
5252
|
+
|
|
5253
|
+
One member taken off the lead's list, by `memberId`: somebody who left the team, not somebody who
|
|
5254
|
+
signed out, which is an availability the member is published with. It names a member the list
|
|
5255
|
+
carried (`stream.teamMember.unknown`).
|
|
5256
|
+
|
|
5257
|
+
### `team-policies-updated`
|
|
5258
|
+
|
|
5259
|
+
The team's policies, whole, replacing what the lead had -- as `TeamMembers.policies` carried them.
|
|
5260
|
+
Emitted where the provider offers policy control, after the whole team has (`stream.team.baseline`).
|
|
5206
5261
|
|
|
5207
5262
|
### `contacts-updated`
|
|
5208
5263
|
|
|
@@ -5263,7 +5318,7 @@ same exported checks are used by Omni and adapter tests so their interpretations
|
|
|
5263
5318
|
| `validateLoginStore(store)` | The login's store the agent application hands every connection: an object with `get`, `set` and `delete` (`store.shape`, `store.get`, `.set`, `.delete`). The harness holds `ConnectContext.store` to it. |
|
|
5264
5319
|
| `validateCapacity(capacity)` | What the agent application states as capacity: a whole number of zero or more (`capacity.count`), zero being agent application-stopped. The harness states one on connect and two, one and zero after the drive, each answered `applied`, and holds any offer to the count in force (`stream.taskOffered.overCapacity`). |
|
|
5265
5320
|
| `validateAuthenticationResult(result, method)` | What `start()` or `complete()` answered: a challenge or a rejection, a login or a rejection. A rejection's failure is held to its rules -- an `omni.` code the contract lists, and `omni.phone-not-permitted` never retryable, since the agent's station is configuration. `validateAuthenticationFailure(failure)` is the same check on a failure alone. |
|
|
5266
|
-
| `validateTaskCommand(command, task?)` | What a command needs to be issuable, against the task it names: its own shape -- a dial's `dialId`, a
|
|
5321
|
+
| `validateTaskCommand(command, task?)` | What a command needs to be issuable, against the task it names: its own shape -- a dial's `dialId`, a conference's item, a schedule's time, a remove naming exactly one person -- and, with the task, the capability the table above gates it on (`command.capability.<name>`, `.locked`), the phase it belongs to (`command.phase.*`, `command.phase.interaction` for every control on the call or the conversation), and the state that has to stand: a lead requested, somebody else still on the call (`command.conference.remove.alone`). An agent application validates before sending and an adapter before acting. |
|
|
5267
5322
|
| `validateResult(result, method)` | What a connection method answered: the status it gives, a failure where the status says so and nowhere else, the failure's shape, and that an `omni.` code is one this contract names. |
|
|
5268
5323
|
| `validateAuthenticationState(state)` | The identity each state must carry, the capabilities a usable login declares, and the expiry that only `authenticated` may. Omni applies it to every state a session publishes — the republished as much as the first. |
|
|
5269
5324
|
|
|
@@ -5274,12 +5329,11 @@ found at such as `snapshot.tasks[0].browsers[1].url`, and a `message`.
|
|
|
5274
5329
|
Some rules need to know who is reading. `validateTeamMembers`, `validateSnapshot`, and
|
|
5275
5330
|
`validateEventEnvelope` take an optional final `{ self, capabilities }` — the signed-in agent's
|
|
5276
5331
|
`AuthenticationState.identity.id` and their login's `capabilities`. Given `self`, a team member list that
|
|
5277
|
-
carries that agent reports `team.member.self`
|
|
5278
|
-
|
|
5279
|
-
|
|
5280
|
-
|
|
5281
|
-
`
|
|
5282
|
-
`exerciseAdapter` always passes both.
|
|
5332
|
+
carries that agent reports `team.member.self`, on a `team-member-updated` and a `team-member-removed` as on the list. Given `capabilities`, a team member list published to a login that does not lead
|
|
5333
|
+
reports `team.unentitled`, and a team event to such a login reports `event.team.capability`; given
|
|
5334
|
+
`leadFeatures: true`, a snapshot without a team reports `team.required`, and given `leadFeatures: false`,
|
|
5335
|
+
anything of the team reaching the lead reports `team.unexpected` or `event.team.features`. Without them those rules are not checked, because they cannot be.
|
|
5336
|
+
`exerciseAdapter` passes all three, holding the switch off until it has sent it.
|
|
5283
5337
|
|
|
5284
5338
|
`assertNoViolations(violations)` throws `ProtocolConformanceError` — which carries the full
|
|
5285
5339
|
`violations` array — when the list is non-empty.
|
|
@@ -5340,7 +5394,7 @@ A capability granted by a later login requires its methods just as one declared
|
|
|
5340
5394
|
|
|
5341
5395
|
`result.notExercised` lists what the run never reached — one subject per family of rules: each
|
|
5342
5396
|
optional part of a task (`task.browsers`, `task.history`, `task.leadAssist`, …), the break's
|
|
5343
|
-
`reasons` and `forced`, the team member list's `members` and `
|
|
5397
|
+
`reasons` and `forced`, the team member list's `members` and a member's `request`, each declared contribution, and
|
|
5344
5398
|
each event type (`event.task-ended`, …) — and so what a clean `violations` says nothing about.
|
|
5345
5399
|
Nothing there is a violation: an adapter with no team has nothing to exercise. But a fixture with
|
|
5346
5400
|
no tasks exercises no task rule, and a pass over it reads as coverage it is not.
|
|
@@ -5516,18 +5570,22 @@ effect. A recorder that cannot confirm completion must not offer Cancel; it can
|
|
|
5516
5570
|
Cancel never means cancelling an in-flight start request or deleting arbitrary past recordings.
|
|
5517
5571
|
Stop can be applied only after finalization/retention succeeds; Cancel only after both cessation
|
|
5518
5572
|
and completion of this recording's audio succeed under the recorder's storage contract.
|
|
5519
|
-
Partial success
|
|
5520
|
-
|
|
5521
|
-
|
|
5573
|
+
Partial success -- capture stopped but the storage outcome unknown, a start the recorder cannot
|
|
5574
|
+
vouch for either way -- is a settled `failed`, under the code `omni.recording-unsettled`: the
|
|
5575
|
+
command did not do what it promised, and the state the provider publishes with it is whatever
|
|
5576
|
+
capture state is actually known. It is never `applied`, and never an unsettled promise the agent
|
|
5577
|
+
application would be left to resync, since the provider knows exactly what it could not settle.
|
|
5578
|
+
There is no request identity on a recording command: the outcome is the state, and what the
|
|
5579
|
+
agent sees is the state. Retention is not a promise of sample-perfect audio.
|
|
5522
5580
|
|
|
5523
5581
|
Provider commands go exclusively to `Connection.execute`; agent application commands go exclusively to
|
|
5524
|
-
`HostRecording.execute`. Both include the assignment
|
|
5582
|
+
`HostRecording.execute`. Both include the assignment and observation identities; all
|
|
5525
5583
|
non-start commands identify the particular recording. IDs are opaque and scoped by provider login,
|
|
5526
5584
|
task and recorder owner. They are never inferred from filenames or current agent identity. A
|
|
5527
5585
|
recording ID survives pause/resume and reassignment only where the same recorder confirms continuity;
|
|
5528
5586
|
commands always name the current assignment. A later start gets a different ID. Reconnect does not
|
|
5529
5587
|
create a new recording or fresh evidence. After lost continuity, use unknown until reconciled.
|
|
5530
|
-
There is no automatic restart,
|
|
5588
|
+
There is no automatic restart, hand-over to another recorder, or stop on task hold/disconnect.
|
|
5531
5589
|
Task removal does not prove recording stopped: outstanding agent application recorders remain tracked by the
|
|
5532
5590
|
agent application until its executor reconciles/finishes them, with visible unresolved cleanup failures.
|
|
5533
5591
|
|