cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
716
Views
5
Helpful
4
Replies

Pause Recording Task in Customer premise CRM

Hi,

Can it be possible Customer premise CRM payment page should call Pause Recording Task API as long as they hit payment. 

The challenge would be how CRM knows taskid, which is required to call Pause Recording Task API. And this process should be out agent's control (auto-controlled from system) means once pay button clicked from CRM, call recording paused through API at agent desktop and resumed once payment is finished.

Both CRM page & Agent desktop would be on same PC but can't be sure on the same browser.

Looking forward for your reply.

1 Accepted Solution

Accepted Solutions

Hi Dimple

All Desktop dialer and state event listeners will have the taskId as a part of the payload. Even websocket events will have the taskId (if you have a separate websocket connection).

You can also retrieve the current active contacts using one such method like getTaskMap() – it will give you all the active contacts on the desktop – of all channel types. You can then map and filter those based on which contact you are looking for. Max Telephony contact count is 1.

Please see line 371 onwards – this assumes you have one active call.
https://github.com/CiscoDevNet/webex-contact-center-api-samples/blob/main/desktop-js-sdk-callcontrol-sample/src/widget-SDK-Voice.js

Let us know if this answers – if not please paste a screenshot / sample code of what portion you are looking to debug.

Thanks & Regards,
Arunabh.

View solution in original post

4 Replies 4

Arunabh Bhattacharjee
Cisco Employee
Cisco Employee

Hi @DimpleSaggi04773 

For same browser tab use case - e.g CRM embedded inside the Desktop app - you can have the event triggered (pause Recording) whenever on focus is triggered on the payment tab. 

This is for embedded javascript inside the desktop to listen for events when the desktop app is iFramed. Hence the widget code can be used. The method works for the active task on the desktop.\

See: Desktop.agentContact.pauseRecording()

https://developer.webex-cx.com/documentation/guides/desktop 

And see the sample code called call control widget - 

https://github.com/CiscoDevNet/webex-contact-center-api-samples/tree/main/desktop-js-sdk-callcontrol-sample 

Line 503: https://github.com/CiscoDevNet/webex-contact-center-api-samples/blob/main/desktop-js-sdk-callcontrol-sample/src/widget-SDK-Voice.js 

 

Now coming to the usecase for thick client CRM (non-browser) - your app needs to be able to subscribe to websocket events from the desktop. Using the websocket API, your app will get task details when the phone call is presented to the agent. You can then initiate the REST API call to pause the recording. It is indeed for the logged in session - but your thick client can independently subscribe for the websocket events. You have to have the agent login to the connector application via SSO or use the token from the browser if you are running desktop.wxcc-us1.cisco.com in parallel (see session storage: accessToken) to then register the websocket connection to receive call events. This is similar to what you would have done for Finesse with XMPP events.

Subscribe for Notifications: https://developer.webex-cx.com/documentation/notification/v1/subscribe-notification (Per agent login)

Events:

https://developer.webex-cx.com/documentation/guides/contact-control-apis/#possible-notification-payloads-received

 

 

Thanks & Regards,

Arunabh.

 

Hi Arunabh,

Thanks for your reply.

Can I ask any code available to subscribe to websocket events from the desktop , I never used XMPP code.

Looking forward for some sample code.

Thanks

Dimple

Hi Arunabh,

Is there any event / Key / Item agent desktop sending to local / session storage to hold taskId ?

Thanks

Dimple Saggi

Hi Dimple

All Desktop dialer and state event listeners will have the taskId as a part of the payload. Even websocket events will have the taskId (if you have a separate websocket connection).

You can also retrieve the current active contacts using one such method like getTaskMap() – it will give you all the active contacts on the desktop – of all channel types. You can then map and filter those based on which contact you are looking for. Max Telephony contact count is 1.

Please see line 371 onwards – this assumes you have one active call.
https://github.com/CiscoDevNet/webex-contact-center-api-samples/blob/main/desktop-js-sdk-callcontrol-sample/src/widget-SDK-Voice.js

Let us know if this answers – if not please paste a screenshot / sample code of what portion you are looking to debug.

Thanks & Regards,
Arunabh.