Skip to Content

Computer Telephony Integration for SAP CRM

This blog is a part of a series of blogs around SAP Industry Solution for Utilities. You can find the main blog here. In this blog, I will provide a short overview of Computer Telephony Integration (CTI) and it’s relevance to SAP CRM Interaction center. We will also discuss the ‘out of the box’ options that SAP provides to achieve CTI as well as how we can adapt this integration to suit specific business requirements.

Before we proceed further, please read this fine print. All the views provided below are my personal opinion and doesn’t necessarily reflect my employer’s. I work for my employer as a Netweaver Integration consultant with a focus in Utilities Industry but every customer’s requirement is unique and you should definitely seek for professional opinion before making your business decisions. Treat the inputs in this blog series as just opinions, nothing more, nothing less.

Customer call center is one of the key components of an utility’s business. Call center agents handle various customer queries ranging from emergency situations like gas leaks, outage reports to regular queries like payment information. A customer’s interaction with the call center could be through multiple channels like Phone, Chat, Email etc., however for the purposes of this discussion let’s consider phone channel. When a customer places a phone call to the utility’s customer service, usually the call hits the ‘Interactive Voice Response’ (IVR) system first (Usually IVR is a component within a suite of products called Call Center applications). The idea is to answer as many customer’s queries as possible without the involvement of a call center agent. This integration is a system to system integration where the IVR system integrates with the back end customer system (in our case the SAP IS-U system) to get the required data and respond to the customer’s queries.

However, in some instances (like gas leak emergency, questions about the bill or if you had a name and an accent like mine where the IVR system can’t seem to understand your query), the customer may want to speak to a ‘real’ human being a.k.a the customer service agent. When such an option is chosen by the customer, the call is diverted to an “available” customer service agent. While doing so, the call center application will also forward the customer details like Customer Account Number, Phone number from where the call is being placed, nature of the query etc so that the customer service agent has enough information about the customer and his/her call even before accepting the customer’s call. This is where, a term called ‘Screen Pop’ is used, which means, when a call is forwarded to the customer service agent, through the help of system to system integration between the call center application and the customer information system, the customer record is automatically fetched and pushed to the desktop screen of the call center agent even before they are put on line with the customer. This not only reduces the call wait time for the customer but also improves the customer interaction experience. So, how do we achieve this feature in SAP CRM Interaction center?

SAP provides a server to server integration framework called as ‘Integrated Communication Interface (ICI)’. ICI interface is a part of Netweaver and provides a webservices layer (SOAP/XML)  for enabling system to system integration between Call center applications (like Genesys, Cisco, Aspect, SAP BCM etc) and SAP business suite applications like SAP CRM. The ICI framework is documented very well and is available as a part of SAP Integration and Certification center here. Through ICC, SAP provides a way for partners to certify their products for integration with SAP Business suite appliations through the ICI. Most well known telephony vendors have SAP certified CTI integration adapters for integration with SAP CRM and I would suggest that you work with your telephony vendor on this. I have also seen many folks in the forums asking if they should build this integration from scratch. Though technically it is possible, the development is quite extensive and has to be done on both SAP business suite and call center application. Considering different skillset reqruirements, development, testing and maintanence effort, buying an out of the box adapter for this integration may be a better choice than building it from scratch. Again, as stated above, every customer’s requirement is unique, so I leave it you to chose the option that is best suited for your landscape.

You will also hear a term called as  SAP Business Communication Broker (BCB) which is a set of ABAP APIs provided by SAP for utilizing the ICI interface within the Business suite applications. In other words, ICI is the technical layer that deals with the integration with the contact center application through HTTP(S) & SOAP/XML whereas the BCB is an internal API that abstracts the ICI interface for easy integration with Business Suite applications. This is better explained by the logical diagram as shown below (I conveniently leveraged the diagram from SAP documentation available here.

So, let us assume that you purchased a SAP certfied ICI adapter through your telephone vendor.To make this integration work out of the box, there is some configuration required both on the call center application/adapter side as well as on the SAP business suite applicaiton like SAP CRM. The configuration on the adapter side varies from vendor to vendor, so I suggest you work with your vendor on this. On the SAP side, there are some simple configuraiton steps and details are documented in this article. Though this article is about configuration the integration with SAP BCM and SAP CRM, the steps on the SAP CRM side is the same, irrespective of the adapter used. There is also a very well documented Wiki page for SAP Interaction center, available here, that details some of the nuances of CTI integration and configuration options.

After reading through the extensive ICI documentation, you may have realized that there is a tight coupling between the SAP CRM applicaiton and the CTI adapter. In all cases, the integration is acitivated once a call center agent logs on the SAP CRM system. When the call center agent logs on, they also log on to the contact center application/CTI adapter through the ICI interface webservice calls. This webservice call tells the contact center/CTI adapter that a particular user with a certain work center ID is logged on to SAP CRM. It also provides the CTI adapter with a call back URL that ties back to the SAP CRM user session for back and forth communication between the CTI adapter and SAP CRM. Once this connection session is established, data between SAP CRM and the CTI adapter is exchanged using ‘Call Attached Data (CAD)’ which is an encoded XML payload. It is through CAD, the SAP CRM system is able to send the CTI adapter, the customer service agent’s work center details and the CTI adapter is able to send the customer information like customer account number, reason for call etc. More information is available in section 4.3.3 of the ICI documentation that I referred above. I also leveraged the high level sample process flow diagram and the CAD XML structure from the ICI documentation for easy corelation, below
9-29-2012 12-45-56 PM.png
In most cases, the out of the box integration meets the business requirements. But in certain cases, within SAP CRM,  you may want to access the call attached data to determine further course of action. Or based on certain call center agent’s actions, you may want to change the CAD to send additional data to the CTI adapter/Call center application. I have faced such requirements in the past and hence thought will share my experience here.

In this example, when a call was received from the customer and diverted to a call center agent, the requirement was for the call center agent to collect certain vital information from the customer and send it back to the CTI adapter/Call center application using the call attached data (CAD). Provided below is how we achieved this requirement within SAP CRM using some ABAP coding

Step 1: Get a reference to the Contact Center Session
data: lr_ccs type ref to cl_iccmp_ccs.
lr_ccs ?= cl_iccmp_ccs=>get_instance( ).

Step 2: Get the current phone ID. We do this to make sure that the CSR is in an active call with the customer. If lv_phonid is initial, you cannot proceed further
data: lv_phoneid type string.
lv_phoneid = lr_ccs->get_currentphoneid( ).

Step 3: Get the contact record
data: lr_contact type ref to cl_crm_ic_mcm_contact.
lr_contact ?= lr_ccs->get_contact( lv_phoneid ).

Step 4: Get the contact record unique ID so that we can read the contact attached data
data: lv_id type string.
lv_id = lr_contact->if_crm_ic_contact~m_id.

Step 5: Get the contact attached data which is a XML String
data: lv_iad type string.
lv_iad = cl_crm_ic_mcm_session_proxy=>get_iad( lv_id ).

Step 6: Change the contact attached data with the information that was collected from the customer.
Since lv_iad is encoded XML, you should be able to use the CL_IXML classes to parse the XML, append the new nodes as agreed with the CTI adapter/Contact Center application and render the XML. I haven’t provided the sample code for the update_cad method because there is a lot of documentation available in this site for XML manipulation in ABAP using CL_IXML calsses
update_cad( exporting in_iad = lv_iad importing out_iad = changed_iad ).

Step 7: Update the changed contact data information in the Contact Center Session
data: lv_result type boolean.
lv_result = cl_crm_ic_mcm_session_proxy=>set_iad(  iv_itemid =  lv_id iv_iad = changed_iad ).

Step 8: Trigger that ‘Item Attached Data Updated’ event so that the updated Contact attached data is sent to the CTI Adapter/Contact Center
cl_crm_ic_mcm_session_proxy=>do_triggeriadupdated( lv_id ).
Hopefully this weblog was useful in understanding the Computer Telephony Integration options available within SAP CRM and also provided enough information on how you can access the call attached data and maniputlate it for specific business requirements. As always, I will very happy to hear your comments and feedback.
You must be Logged on to comment or reply to a post.
  • Hi Krishnakumar,

    This is a super blog that I chanced upon. We have extensive requirements to update cad from SAP to our contact centre  which is GPlus. I have tried using CL_IC_CAD_DATA_PROCESS->SET_CMS_DATA and
    cl_crm_ic_mcm_contact->set_iad but both are useless. Both update cad but along with updating GENESYS-CAD, they also update crm_ic/mcm which jeopardisess my contact state FWDTYPE and FWDPREHANDLE. I was very nervous for the last couple of days wheher i should directly use cl_crm_ic_mcm_session_proxy=>set_iad. Standard SAP for updating CAD in the CAD workcentre is still using CL_IC_CAD_DATA_PROCESS->SET_CMS_DATA which according to me completely wrong. Why don’t they release any oss note correcting the same.

    BTW – Thanks so much for this blog.


    • Arun

      Thanks for your comments and glad you found this blog useful. It took some debugging to figure out these classes as there is no clear documentation. I would have thought CL_IC_CAD_DATA_PROCESS should work too. I didn’t use it because it, the SET_CMS_DATA code uses string manipulation of XML and though it works, it’s not elegant enough :-). So I restored to using my own XML manipulation in the CL_CRM_IC_MCM_SESSION_PROXY, SET_CMS_DATA method basically recreates the XML for every item in the CAD_LIST which is also not elegant, performance wise.

      Let me know how the CL_CRM_IC_MCM_SESSION_PROXY works for you.



      • Hi Krishna,

        I can tell you two/three glaring bugs with set_cms_data.

        1. You cannot update cad for more than one applications ids using this method. This is due a bug on line no 33 where lv_xml_string is being over written within the loop.
        2. At the end SAP is calling lv_set_result = lo_contact->set_iad( ). Wihtin set_iad they are adding applicaton id CRM_IC/MCM with FWDTYPE as current call state and FWDPREHANDLE as current interaction id. This works well for as long as the call is not a transferred one. Doing this on a transferred call overwrites FWDTYPE from Transfer to space and FWDPREHANDLE from previous interaction id to current interaction id. This corrupts the contact state for the agent, any subsequent change in state impacts the communication context area. The context area then just freezes and does not refreshes. 
        3. This method puts a space limitation on the application id and cad data item name passed from CCS to SAP. This is a small issue nevertheless is one.


  • I forwarded this blog to a colleague running our VOIP project and his response was “Wow, great article”. 

    Thanks for sharing your expert knowledge.

  • Hi Krishna

    Your blog is very useful for the people who are new to SAP CRM integration with CTI. Can you please provide more details on the framework you mentioned? I am completely new to SAP CRM and have good working experience on IVR and to an extent in CTI. We wanted to integrate the AES with  SAP CRM without using any connectors. I believe this is possible as per the statement in your blog. Can you please assist more on this? Can you please share the  WSDL file you are talking about? Can you give some reference documents for the same..

    • Anu

      Thanks for your comments. The documentation for the webservice is available in the integration certification center, the link for which I have provided in the blog above. I will also provide it here for ease of access

      Most of the development for this will be done in the telephony software. Depending on your use case, there may be a lot of development involved.


  • Hi Krishna

    Thank you for the detailed information. Can the SAP CRM be connected to Avaya AES directly  without any connectors( I know its not possible)? But One of my colleague from SAP development is trying to connect to the AES through the RFC Destination Avaya AES. We always get ICM_http_connection_failed? In which location the detailed logs of the connection failure will be posted? Please assist?

    I can share the screenshot if required

    • Anu

      I suggest that you post this question in the forums where you will get a broader audience to answer. The question you have asked above is more about how to develop integration using webservices exposed by SAP. Many connectors have been developed are available in the market which does just that and integrating systems using webservices is fairly a common skill/technique.

  • I do have a question concerning quote: “But in certain cases, within SAP CRM,  you may want to access the call attached data to determine further course of action”

    In your examples see above we just talk about sendung attached data from CRM to CMS.

    What about the other way around?

    How can I have access in CRM on the attached data being sent from CMS?



  • Good day all,

    This is a  fantastic blog,  I used CL_IC_CAD_DATA_PROCESS  to Access CAD from SAP BCM/CC.

    Sadly this class does not return an updated CAD when a user initiates a conference call, at these point BCM creates multiple file recording for the call. would kindly share how I can retrieve those call recordings.