Skip to Content
Technical Articles

C4C CTI Integration – Closing activities automatically

THE PROBLEM

When setting up a CTI integration and receiving a (inbound) phone call simulation, at the moment where the Live Activity Center gets opened, a new activity gets created. That activity will be linked against the customer/contact that did the call. By default, that phone activity will be logged under the customer activities and set to Open status.

By standard behaviour, it will never be set into Completed status unless someone manually does so. By default, there is no way to automatically close the Activity, not even when the call ends. This behaviour does not match what it used to happen with the SAP CRM On Premise.

 

POSSIBLE SOLUTIONS

As per some conversations I had with SAP Cloud Support team, there are mainly 2 approaches for handling this:

  1. PDI to close the activities when created
  2. Workflow that sets the status to Closed after x time

 

PDI DETAILED SOLUTION

After some research where I debugged and compared the received values between the simulation of an inbound call and the manual creation of a phone call activity, I realized there are some fields I should take into account for achieving this requirement into an accurate way and in order to avoid affecting unnecessary scenarios.

The fields that need to be taken into account are:

  • TypeCode = 86 (which refers to Phone Calls)
  • DataOriginTypeCode (value 4 when call comes through CTI and value 1 when call is manually logged)
  • InitiatorCode (value 2 for inbound calls and value 3 for outbound ones)
  • LifeCycleStatusCode (value 1 when status is Open)
  • as an optional additional field, ProcessingTypeCode = 0002 stands for Phone Call however, this is already being handle by TypeCode

Having said this, I have added a piece of code under BeforeSave method of the Activity BO extension for switching into close status (LifeCycleStatusCode = 3) an inbond phone call that came through CTI and which is under Open status.

if(this.TypeCode == "86" && this.DataOriginTypeCode == "4" && this.InitiatorCode == "2" && this.LifeCycleStatusCode == "1"){ // This refers to a Telephony,inbound and open phone call
        //this will set LifeCycleStatusCode = "3"
        this.Complete();
} 

Just to clarify any additional doubts, after the Activity gets created, it automatically gets set as Completed but this will not affect the ability of the user for adding a note through the Live Activity Center.

Hope you find this blog useful for you. Feel free to leave comments and queries on it, they are very welcome!

3 Comments
You must be Logged on to comment or reply to a post.
  • 1702 of SAP Hybris Cloud for Service, it is now possible to properly handle incoming phone calls in the new Responsive UI.  Call center integration in Responsive UI brings some key advantages compared to similar features available in HTML5, and a few limitations that will be removed over time.  In this blog post, we will provide an overview of the new capabilities, highlighting such advantages and limitations.

     

    • Hi Jhon,

      Not very clear on what you are referring to. Currently, we are on version 1902 and the reason why I have written this blog post is due to the explained problem. The mentioned solutions are those proposed by SAP. Maybe you have missunderstood the situation.

      Regards.

      Alejandro.

  • Hi Alejandro Kinsbrunner,

    How can I make sure C4C sets calls to Completed as soon as call ended?

    I want to complete calls as soon as they are really completed. This will shown if call was actually answered because only answered calls would be completed. Also this will make sure that C4C has reliable information on call duration.

    Nadya