Auto accept / auto answer functionality is quite useful in highly load contact center.
When I’ve been reading a book “Maximizing Your SAP CRM Interaction Center” (ISBN 978-1-59229-197-7) by John Burton I met one interesting sentence there. I will quote it (page 56):
In addition, the system can be configured to either automatically accept the incoming telephone call, or to prompt the agent with blinking accept and reject buttons, allowing the agent to choose whether to accept the call or to send the caller back to the queue.
But I have never met such configuration in the system (started from 7.0 system). In most cases we can configure auto accept function from CMS side.
On SCN we can find some references about this:
For example, if you use SAP Contact Center solution (former known as SAP BCM) you can start CDT with additional parameter autoanswer. E.g. using http://18.104.22.1689:1011/cdt?arg=autoanswer=3 will automatically answer (automatically accept) the call after 3 seconds of ringing.
This approach didn’t fully cover our recent requirements. It can not handle different situations and set different auto-accept timeouts based on some additional data. For instance, based on the channel (phone, email, chat or action) or based on the business data available in SAP CRM.
My solution is based on the following logic: catch the contact starting event (e.g. when Accept button starts to blink), wait for some seconds and then click the Accept button automatically.
So we need a BSP component to create a view with some js-code. I created a component ZIC_MISC in BSP_WD_CMPWB transaction with default MainWindow and create a view ZAutoAcceptView assigned to MainWindow.
Then in view’s htm page I used the following code:
- First of all I get some values for different timeout periods based on different channels (media) from helper z-class zcl_autoccept_helper. Here you can put any logic you want. I used it based on business role, channel and some additional info.
- On load of the page I check the existing of my ZATsubscribeSAM function (quite “over protected”, but anyway) and call it.
- In it I get mentioned event manager instance. And subscribe ZprocessMCMEvents as a callback function for ‘com.sap.ic.mcm.events’ with the lowest priority possible (I dont’ want to disturb any standard handlers).
- In the callback function (which is called on any of events from the ‘com.sap.ic.mcm.events’ “class”) I check the event name. And if it’s ‘ContactStarted’ I decide which timeout to use to start the timer choosing based on current channel.
- The timer will call ZautoAccept function after defined period of time.
- ZautoAccept in turn gets the element of Accept button, checks if there is still an incoming request (IC agent was as fast as our timer; wsb_bCurrAccReq indicates this) and click the Accept button.
Now I’ll quickly describe how to integrate this view in IC WebUI.
So I decided to integrate my view into IC context area. That’s why I created the described component. And registered it as a layout component under IMG -> CRM -> UI Framework -> Technical Role Definition -> Define Layout Components with id ZAUTOACCEPT.
Additionally I added this new layout component to the context area profile of the appropriate business role in which I wanted auto accept functionality.
IMG -> Interaction Center WebClient (btw handy transaction code is CRM_IC_IMG) -> Basic Functions -> Define Context Area Profile
Here I chose my profile and add ZAUTOACCEPT layout component to it as the usage of extra area # 1 (USAGEEXTRA01).
The last step is to configure this area as “visible” (despite there is any visible elements in it). For my role configuration key I created configuration of ICCMP_HEADER/HeaderViewSet and brought USAGEEXTRA01 to “visible” state.
That’s all. Start IC WebUI and enjoy auto accept functionality!