cancel
Showing results for 
Search instead for 
Did you mean: 

Acquire Custom fields via CTI Adapter

Former Member
0 Kudos

Hello Community,

In our project we have a Customer Service Management scenario, with the integration between a third party/legacy CTI environment and a Cloud for Customer solution. In this CTI->C4C integration we may need to pass to C4C a subset of custom information available in the CTI.

Via the CTI Client Adapter simulation tool, we noticed that the inbound call can pass a set of Custom fields as URL parameters. We show a picture of those fields in the simulation tool here below, and how those fields propagate in the Live Activity Pane:

Unfortunately, if I check those fields in the SDK UI Component for the Live Activity Pane (file: CTI_Shelf_QAF.QA), they don't seem to be bound to the Activity BO Model:

Furthermore, we noticed that the Outport OpenSearchScreen is the only one which can use that list of fields, but this outport cannot be reused for binding an Embedded Component to the UI Pane:

Is it possible in any way to reuse those information in C4C?

Thanks a lot for your collaboration.

All the best,

Davide

Accepted Solutions (1)

Accepted Solutions (1)

Former Member

Hello,

Thanks to we found a Solution for this requirement. The suggested approach has been to define a PDI Enhancement Exit which could help us to handle the Customer extension fields.


Unfortunately, even though the fields are now available in the ABSL code, any Object you will import or access in the script scope will be read only. That means that the information cannot be apparently saved anywhere in the C4C Database.

The solution we developed in order to solve this workaround is to use a SOAP WebService Communication Arrangement, which could easily store information in the C4C Database, even if the Business Objects belong to a different Deployment Unit.

The Solution can be composed in the following steps:

    1.      Build a Business Object for the C4C Database with the following Structure:

      import AP.Common.GDT as apCommonGDT;

      businessobject CTI_CustomFields_BO{

                    [AlternativeKey] elementActivityUUID:UUID;

                    element ActivityID:BusinessTransactionDocumentID;

                    element ANI:LANGUAGEINDEPENDENT_EXTENDED_Text;

                    element DNIS:LANGUAGEINDEPENDENT_EXTENDED_Text;

                    elementCustomField1:LANGUAGEINDEPENDENT_EXTENDED_Text;

                    elementCustomField2:LANGUAGEINDEPENDENT_EXTENDED_Text;

                    elementCustomField3:LANGUAGEINDEPENDENT_EXTENDED_Text;

                    elementCustomField4:LANGUAGEINDEPENDENT_EXTENDED_Text;

                    elementCustomField5:LANGUAGEINDEPENDENT_EXTENDED_Text;

                    elementCustomField6:LANGUAGEINDEPENDENT_EXTENDED_Text;

      }

    2.      Generate a full UI Screen Thing-Type scenario for the BO, with in particular the WorkCenter Floorplan and the WorkCenterView:

    3.     Generate a SOAP WebService on the Business Object. The WS should have just the Create operation:

      And should be attached to your custom WorkCenter View for authorization reasons:

    4.     Generate an External WebService Integration component on the created WS:

    5.     Create a Communication Scenario which collects both the WS and its Proxy:

    6.     On the Administration WorkCenter in C4C, create a Communication System for the local C4C:

    7.      Create then a Communication Arrangement that could connect the Proxy and the WS together:

    8.     Implement the Enhancement Point on the C4C CTI Call Wrapper (technical name: CTICallWrap-upActions😞

    9. Open the script file HANDLE_INCOMING_CALL.absl, and insert the code for acquiring the CTI Customer fields and push them to the WebService:

import AP.Common.GDT;

var result: LANGUAGEINDEPENDENT_MEDIUM_Description;

var wsRequest : CTI_CustomFields_ProxyClient_EWSI.Create.Request;

var bpID = InputData.BusinessPartnerID;

wsRequest.CTI_CustomFields_BOMainViewCreateRequest_sync.CTI_CustomFields_BO.ActivityUUID.content = InputData.PhoneActivityUUID.content.ToString();

wsRequest.CTI_CustomFields_BOMainViewCreateRequest_sync.CTI_CustomFields_BO.DNIS= InputData.DNIS;

wsRequest.CTI_CustomFields_BOMainViewCreateRequest_sync.CTI_CustomFields_BO.ANI= InputData.ANI;

wsRequest.CTI_CustomFields_BOMainViewCreateRequest_sync.CTI_CustomFields_BO.CustomField1= InputData.CustomField1;

wsRequest.CTI_CustomFields_BOMainViewCreateRequest_sync.CTI_CustomFields_BO.CustomField2= InputData.CustomField2;

wsRequest.CTI_CustomFields_BOMainViewCreateRequest_sync.CTI_CustomFields_BO.CustomField3= InputData.CustomField3;

wsRequest.CTI_CustomFields_BOMainViewCreateRequest_sync.CTI_CustomFields_BO.CustomField4= InputData.CustomField4;

wsRequest.CTI_CustomFields_BOMainViewCreateRequest_sync.CTI_CustomFields_BO.CustomField5= InputData.CustomField5;

wsRequest.CTI_CustomFields_BOMainViewCreateRequest_sync.CTI_CustomFields_BO.CustomField6= InputData.CustomField6;

var wsResponse = CTI_CustomFields_ProxyClient_EWSI.Create(wsRequest, bpID, "CTI_CommScenario");

return result;

In order to test this solution, your available tools are the following:

  • The SAP Cloud for Customer CTI Client Adapter (available in the Download functionality) will allow you to simulate an incoming call, with all the Customer extension fields defined in your Business Process scenario:

  • The custom WorkCenter with the Thing Type navigation and the Object Work List (OWL) screen you created earlier for the custom Business Object will allow you to check the Database Content after showing the call on the Live Activity Pane.
    For the input data specified earlier, the output in the C4C Database is shown in the Picture below:

Please let me know here below for any further observation about the topic. I will be always available for them.

Cheers,

Davide

Former Member
0 Kudos

Hi Davide,

Thanks for the Wonderful blog. Our project has a requirement to capture a custom field from CTI solution in C4C in Activity work centre, so that a ticket can be created based on the Custom field instead of phone number because an employee can call to CTI support team from any phone number not necessarily from the phone number stored in Employee Master.  We tried to simulate call by sending Employee ID of the employee in CTI adapter instead of employee's phone stored in Employee master data. The C4C tenant is not able to recognize employee details based on Employee ID. Currently from Simulator we came to know that CTI Adapter can display callers data in C4C based on Phone Number or the Account ID. Kindly provide your valuable inputs for the above project requirement we have.

Thanks & Regards
Vijay S B

Former Member
0 Kudos

Hi Vijay,

did you try to implement the Enhancement Point CTICallWrap-upActions?


What happens there if you try to acquire the User information at runtime by the following lines in the Enhancement Point?

import AP.PC.IdentityManagement.Global;

import AP.FO.BusinessPartner.Global;


var user = Identity.Retrieve(Context.GetCurrentIdentityUUID());
var employee = Employee.Retrieve(user.BusinessPartnerUUID);


Please let me know.


Cheers,

Davide


Former Member
0 Kudos

Hi Davide,

Thanks for the response. The above code which you shared with us is capturing service agent details who is responsible for generating ticket but our requirement is to capture the details of Employee who calls service agent for support based on the caller Employee ID. Please let us know is there any way to capture the above Employee details. Thanks in Advance .

Thanks & Regards

Vijay S B

Former Member
0 Kudos

Hi Vijay,

one quick clarification: It seems more a piece of information stored somewhere in the call. Which piece of information would help you to identify a specific Employee in the call? His/her phone number?

Cheers,

Davide

Former Member
0 Kudos

Hi Davide,

As per SAP employee details get recognized in Live Activity pane only on the Employee phone number stored in database in C4C. So we need to know is there any options available to capture apart from phone number.

Thanks & Regards

Vijay S B

preethi_santhanam
Participant
0 Kudos

Hi Davide,

Thank you for the lovely blog.

We have a requirement to send the value of Custom Field 1 from Live Activity which would hold the Service Category to the Service Category field of Ticket when agent decides to click on "New Ticket" from Live Activity screen.

We've implemented the Enhancement Point CTICallWrap-upActionsAny but any object we access in the script scope is read only. Due to this, we are struggling to pass this value to the Ticket.

Any pointers on how this could be achieved?

Best Regards,

Preethi Santhanam

0 Kudos

Dear Davide,

I have followed the steps you mentioned. But after answering CTI call, this enhancement point was not getting triggered so the web service is not called. Do you have any idea why it is not triggered?

Thank you,

Ekrem.

Answers (3)

Answers (3)

RadekStefaniak
Explorer
0 Kudos

Hi,

is there a way to get these CustomFields and pass to ticket (eg IVR or DNIS and pass to Ticket)?

eg. when creating ticket out of incoming phone call by CC agent - then agent creates Ticket manually in Live Activity Center, and we would like to have one of Custom fields to be passed by absl to Ticket?

sinaei
Contributor
0 Kudos

Hello Davide,

thanks for your infrormation,

We need to do the customer search based on ExternalID that is Custom field that we have created,

Like the below:

We created Enhancement Implementation, But I can not access to my field,

I need to get the customer id ,

but if I want to use Retrieve, PhoneActivityUUID is the only UUID that exist!

var c= BusinessPartner.Retrieve(InputData.PhoneActivityUUID)

Also if I want to use Query, I have a problem. I dont have InputData option!

Can you help me about this?

Thanks

Sin

former_member187151
Participant
0 Kudos

Hi Sin,

I am not sure about your business case creating extension field for external ID, anyhow my thought is

External ID  is the standard field available in CTI adapter, so you need to pass external id through adapter which will automatically search which customer looking for..

Cheers,

Naveen

sinaei
Contributor
0 Kudos

Hello Naveen,

Thanks for your response,

How can I add this field to my view? through AdaptationMode I can not change Live Activity.

Do you have any idea?

Regards

Sin

sinaei
Contributor
0 Kudos

Hi again,

I forgot to send the screenshot,

We do not have External ID in this view, I dont have non of the field that is visible in your screenshot.

Thanks

Sin

preethi_santhanam
Participant
0 Kudos

Hi Sin,

You need to enable this field using Adaption mode to see the fields. This is a two step process, so you select adapation mode, then click Personalise from settings on Live Activity pane and then click adaptation mode again.

Once you add the fields, you should be able to see the additional fields.

Best Regards,

Preethi Santhanam

sinaei
Contributor
0 Kudos

Hi Preethi,

Thanks for response, I could add the fiedl in C4C based on what you said(that we need tp pass two steps) but we see the fiedl like below, is not searchable, or we van not write anything inside it.

I am going to do the search based on ExternalID, Do you know how can I do it?

Regards,

Sin

preethi_santhanam
Participant
0 Kudos

Hi Sin,

Not sure what your business case is, but when you populate the External Reference ID on the CTI screen, you will see it appear on the Live Activity pane.

Hope this helps

Best Regards,

Preethi Santhanam

sinaei
Contributor
0 Kudos

Hi Preethi Santhanam,

Actually we need to do search based on External ID in C4C, in the above situation you mentioned, we can just see the value of external ID, it is not a searchable field.

Best Regards

Sin

Former Member
0 Kudos

Hi Preeti,

Mine is similar to Sins requirement, with slight difference. Lets say I have the contract account ID value in Custom Field 1. how to do I get the customer details based on that and what will be the coding logic for the same.

Regards,

Indra

sinaei
Contributor
0 Kudos

Hi Indrakumar,

Did you find any soloution fro your case?

Regards

Sin

Former Member
0 Kudos

Hi Sin,

I passed the value in one of the fields "Custom1" in the CTI adapter and read the value in the CTICustomerSearch enhancement option. after that using the contract account query got the respective customer number/ BP and returned it back. So this works fine for me.

former_member187149
Participant
0 Kudos

Hi Davide,

I followed the steps given in the blog to capture the custom field values of Live Activity in a Custom BO. In the step 8 you have mentioned to create an enhancement implementation to place the script logic.On top of which Business object I need to create this enhancement point.I am not able to find

anything named as CTICallWrap-upActions

Kindly share me the steps which am looking.Thanks in advance.

Regards,

Navin

Former Member
0 Kudos

Hi Navin,

yes I remember it wasn't that easy to find. Here I note some steps:

  1. Create a new Enhancement Implementation object in the Solution:


  2. The creation process will show you a popup with the EI details. Please fill them as it follows:


  3. Now you will have an additional component in your solution with the ABSL source file HANDLE_INCOMING_CALL.absl. This would be the place where to implement the custom business logic:

If there is anything you would like to clarify, please let us know.

Kind regards,

Davide

former_member187149
Participant
0 Kudos

Hi Davide,

Thanks for elaborating the process.I am able to find the Enhancement point and i have added the ABSL code which you have provided.But while testing am getting a webservice internal error (302).

I have attached the screen shots of my solution with all the details.Please help me to sort out this issue.

ABSL Code Used:

Communication Scenario:

communication arrangement:

Please go through the screen shots and kindly help us to fix this.Thanks in advance.

Regards,

Navin

Former Member
0 Kudos

Hi Navin,

in your last screenshot, what happens if you try to press the buttons Check Service and Check Connection?

Cheers,

Davide

former_member187149
Participant
0 Kudos

Hi Davide,

I checked edit basic settings and changed the authentication method User ID and Password now the ping is successful.Let me test the solution.

Thanks for your help.

Regards,

Navin

Former Member
0 Kudos

Hi Navin,

yes imho I think that as long as your Comm. Arrangement works in the same system, you can keep the Authentication method as Basic with a System/Communication User.

If your network policies and requirements state to have Authentication methods as SSL only, it's the case to raise an incident to SAP Support.

Cheers,

Davide