docs(task): add AI documentation for CallControl, IncomingTask, OutdialCall, TaskList widgets#577
Conversation
…alCall, TaskList widgets
|
This pull request is automatically being deployed by Amplify Hosting (learn more). |
|
|
||
| ## Props API | ||
|
|
||
| | Prop | Type | Default | Description | |
There was a problem hiding this comment.
a common query regarding the methods listed below, all of the do not have the arguement {task} here but in the code they do, so let me know if it is done intentionally,
There was a problem hiding this comment.
Thanks for catching this added the proper arguments
|
|
||
| | Prop | Type | Default | Description | | ||
| |------|------|---------|-------------| | ||
| | `onHoldResume` | `(isHeld: boolean) => void` | - | Callback when hold state changes | |
There was a problem hiding this comment.
as per the code, the onHoldResume method has two input arguements, (isHeld : boolean , task : ITask).
here the task parameter is missing, do let me know if it is done intentionally.
There was a problem hiding this comment.
Added the correct arguments
| |------|------|---------|-------------| | ||
| | `onHoldResume` | `(isHeld: boolean) => void` | - | Callback when hold state changes | | ||
| | `onEnd` | `() => void` | - | Callback when call ends | | ||
| | `onWrapUp` | `() => void` | - | Callback when wrapup completes | |
There was a problem hiding this comment.
onWrapUp({
task: currentTask,
wrapUpReason: wrapUpReason,
})
here the two parameters are missing
There was a problem hiding this comment.
Added the correct arguments
| - `TASK_RECORDING_PAUSED` - Recording paused | ||
| - `TASK_RECORDING_RESUMED` - Recording resumed | ||
|
|
||
| **Returns:** All functions and state for call control operations |
There was a problem hiding this comment.
are we not going to mention the returned functions and variables here?
There was a problem hiding this comment.
No, the plan is that that information will come from the knowledge base of the sdk
| U->>C: Click Transfer button | ||
| C->>C: Show transfer modal | ||
| U->>C: Select agent from list | ||
| C->>H: transferCall(agentId, name, 'AGENT') |
There was a problem hiding this comment.
In the Code, i am only able to see two parameters.
const transferCall = async (to: string, type: DestinationType)
There was a problem hiding this comment.
Added the correct arguments
| U->>C: Click Consult button | ||
| C->>C: Show consult modal | ||
| U->>C: Select agent | ||
| C->>H: consultCall(agentId, name, 'AGENT') |
There was a problem hiding this comment.
const consultCall = async (
consultDestination: string,
destinationType: DestinationType,
allowParticipantsToInteract: boolean
)
parameters not matching here, do let me know if it is done intentionally.
There was a problem hiding this comment.
Added the correct arguments
| U->>C: Click Conference button | ||
| C->>C: Show conference modal | ||
| U->>C: Select agent | ||
| C->>H: consultCall(agentId, name, 'AGENT') |
There was a problem hiding this comment.
here also the parameters are different from the one mentioned in the code
There was a problem hiding this comment.
Added the correct arguments
| C->>C: setSelectedWrapupReason(code) | ||
|
|
||
| U->>C: Click Submit Wrapup | ||
| C->>H: wrapupCall(reason, id, auxCode) |
There was a problem hiding this comment.
const wrapupCall = (wrapUpReason: string, auxCodeId: string)
in the code i am only able to see two arguement instead of the three mentioned here.
do let me know if it is done intentionally.
There was a problem hiding this comment.
Added the correct arguments
| - `accept()` - Accept task handler | ||
| - `reject()` - Reject task handler | ||
| - `isBrowser` - Boolean flag | ||
|
|
There was a problem hiding this comment.
The Parameter isDeclineButtonEnabled is missing here, could i please know is it done intentionally?
There was a problem hiding this comment.
Added the correct arguments
| **Returns:** | ||
| - `startOutdial(destination, origin)` - Start outdial function | ||
| - `getOutdialANIEntries()` - Fetch ANI entries async function | ||
|
|
There was a problem hiding this comment.
return {
startOutdial,
getOutdialANIEntries,
getAddressBookEntries,
isTelephonyTaskActive,
};
two parameters are not mentioned above
There was a problem hiding this comment.
Added the correct arguments
| H->>H: logger.error('Hold failed') | ||
| end | ||
|
|
||
| Note over U,B: Resume flow similar with task.resume() |
There was a problem hiding this comment.
For the Resume scenario, it is appropriate to mention the use of onHoldResume(false)
| H->>T: task.consultCall({targetAgentId, destinationType}) | ||
| T->>B: POST /task/consult | ||
| B-->>T: Consult call created | ||
| T-->>S: Emit TASK_CONSULT_STARTED |
There was a problem hiding this comment.
The TASK_EVENT named TASK_CONSULT_STARTED does not appear in the repository, while TASK_CONSULT_ACCEPTED and TASK_CONSULT are present . Please let me know if this was done intentionally.
There was a problem hiding this comment.
Updated to the correct version
| H-->>C: Hide timer | ||
| else Timer reaches 0 | ||
| H->>H: Auto-wrapup triggered | ||
| H->>H: wrapupCall(null, null, null) |
There was a problem hiding this comment.
Here we have three arguements instead of two.
There was a problem hiding this comment.
Added the correct arguments
|
|
||
| ## Overview | ||
|
|
||
| Provides call control functionality (hold, mute, transfer, consult, conference, end, wrapup) for active telephony tasks. Includes both standard and CAD (Customer Attached Data) variants. |
There was a problem hiding this comment.
Not just 'telephony tasks', we also have digital tasks
|
|
||
| ## Why This Widget? | ||
|
|
||
| **Problem:** Agents need comprehensive call control during active conversations. |
There was a problem hiding this comment.
The whole file is more specific for calls but this widget supports call and digital task so we can improve the prompt to be less call specific
| onHoldResume={(isHeld) => console.log('Hold:', isHeld)} | ||
| onEnd={() => console.log('Call ended')} | ||
| onWrapUp={() => console.log('Wrapup complete')} | ||
| onRecordingToggle={({ isRecording }) => console.log('Recording:', isRecording)} |
There was a problem hiding this comment.
For all the callbacks, there is task object that is returned. We need to confirm the correct params returned
There was a problem hiding this comment.
Added the correct arguments
| ```html | ||
| <widget-cc-call-control></widget-cc-call-control> | ||
| <widget-cc-call-control-cad></widget-cc-call-control-cad> |
| "@webex/cc-components": "workspace:*", | ||
| "@webex/cc-store": "workspace:*", | ||
| "@webex/cc-ui-logging": "workspace:*", |
There was a problem hiding this comment.
Lets put actual versions
| U->>C: Click Consult button | ||
| C->>C: Show consult modal | ||
| U->>C: Select agent | ||
| C->>H: consultCall(agentId, name, 'AGENT') |
There was a problem hiding this comment.
Added the correct arguments
| U->>C: Click Conference button | ||
| C->>C: Show conference modal | ||
| U->>C: Select agent | ||
| C->>H: consultCall(agentId, name, 'AGENT') |
There was a problem hiding this comment.
Added the correct arguments
| C->>C: setSelectedWrapupReason(code) | ||
|
|
||
| U->>C: Click Submit Wrapup | ||
| C->>H: wrapupCall(reason, id, auxCode) |
There was a problem hiding this comment.
Added the correct arguments
| - `accept()` - Accept task handler | ||
| - `reject()` - Reject task handler | ||
| - `isBrowser` - Boolean flag | ||
|
|
There was a problem hiding this comment.
Added the correct arguments
| **Returns:** | ||
| - `startOutdial(destination, origin)` - Start outdial function | ||
| - `getOutdialANIEntries()` - Fetch ANI entries async function | ||
|
|
There was a problem hiding this comment.
Added the correct arguments
COMPLETES N/A - Documentation Enhancement
This pull request addresses
Adding AI-optimized documentation for all task-related widgets to help AI assistants understand call handling and task management workflows.
by making the following changes
packages/contact-center/task/ai-docs/widgets/CallControl/AGENTS.mdandARCHITECTURE.mdpackages/contact-center/task/ai-docs/widgets/IncomingTask/AGENTS.mdandARCHITECTURE.mdpackages/contact-center/task/ai-docs/widgets/OutdialCall/AGENTS.mdandARCHITECTURE.mdpackages/contact-center/task/ai-docs/widgets/TaskList/AGENTS.mdandARCHITECTURE.mdChange Type
The following scenarios were tested
The GAI Coding Policy And Copyright Annotation Best Practices
Checklist before merging
Make sure to have followed the contributing guidelines before submitting.