fix(cc-components): show dialed number instead of entrypoint for outdial calls#657
fix(cc-components): show dialed number instead of entrypoint for outdial calls#657bhabalan wants to merge 4 commits intowebex:nextfrom
Conversation
…ial calls When making an outdial call via dialpad, the incoming task, task list, and active task were incorrectly showing the entrypoint number (ANI) instead of the actual dialed number (DN). This fix checks for outboundType === 'OUTDIAL' and uses the DN field from callAssociatedDetails for the title display. CAI-7359
| }); | ||
| }); | ||
|
|
||
| describe('Outdial tasks', () => { |
There was a problem hiding this comment.
Add more comprehensive tests
There was a problem hiding this comment.
Added 8 comprehensive test cases (4 for IncomingTask, 4 for TaskList) covering:
- Empty
dnstring fallback toani CALLBACKoutboundType correctly usesani(notdn)- Social media outdial tasks use
customerName - Non-browser outdial button states (
Ringing..., disabled accept)
Also fixed 3 prettier lint errors in source files. All 646 tests passing.
|
This pull request is automatically being deployed by Amplify Hosting (learn more). |
…lint errors Add 4 new test cases each for IncomingTask and TaskList outdial scenarios: - Empty dn string fallback to ani - CALLBACK outboundType uses ani (not dn) - Social media outdial uses customerName - Non-browser outdial button states Fix prettier formatting in source files. CAI-7359
… ID and phone number for inbound and outdial calls Refactor logic to determine caller number based on call type, ensuring that for inbound calls, the caller ID is derived from ANI, while for outdial calls, it uses DN for caller ID and ANI for the phone number. Update tests to validate these changes and ensure accurate rendering in various scenarios.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: de91094576
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| const renderPhoneNumber = () => { | ||
| const phoneText = isSocial ? customerName || NO_CUSTOMER_NAME : dn || NO_PHONE_NUMBER; | ||
| const phoneText = isSocial ? customerName || NO_CUSTOMER_NAME : ani || NO_PHONE_NUMBER; |
There was a problem hiding this comment.
Limit phone-number override to telephony interactions
The new phoneText expression now uses ani for every non-social interaction, not just telephony. In CallControlCAD, chat/email/SMS tasks are non-social, so their ANI (often an email/handle or channel identifier) is now shown under the literal Phone Number label; this is visible in the updated chat-media-type snapshot where chat-customer@example.com replaced No Phone Number. That broadens a telephony-specific fix into digital channels and can present incorrect/misleading data to agents.
Useful? React with 👍 / 👎.
COMPLETES CAI-7359
This pull request addresses
Two related display issues in the CallControlCAD, IncomingTask, and TaskList widgets:
dn(entry point/DNIS) instead ofani(the actual phone number) for both inbound and outdial calls, mismatching the desktop client.by making the following changes
Caller ID fix (title display)
extractIncomingTaskDatainincoming-task.utils.tsxto checkoutboundType === 'OUTDIAL'and usedn(dialed number) instead ofanifor the titleextractTaskListItemDataintask-list.utils.tsfor the task list displayCallControlCADcomponent to use acallerNumbervariable (dn || anifor outdial,anifor inbound) for the caller IDaniifdnis not available, maintaining backward compatibilityPhone Number field fix (CAD section)
renderPhoneNumberinCallControlCADto useaniinstead ofdn, matching desktop client behavior:ani(caller's number)ani(customer's number dialed by agent)Tests
incoming-task.utils(7 tests) andtask-list.utils(7 tests) covering: outdial title display, dn fallback to ani, empty dn fallback, CALLBACK outboundType, social media outdial, and button statesdnfield to CallControlCAD unit test mock data to verifydnis not incorrectly used for Phone NumberaniChange Type
The following scenarios were tested
Vidcast: https://app.vidcast.io/share/2e933e24-985f-49a1-ad81-99c31f444c63
The GAI Coding Policy And Copyright Annotation Best Practices
Checklist before merging
Make sure to have followed the contributing guidelines before submitting.