Skip to Content
0
Nov 10, 2022 at 02:01 PM

SAP CRM Interaction Center - replace dial pad with click-to-call

230 Views Last edit Nov 10, 2022 at 02:06 PM 3 rev

Dear all,

I am working on a solution to replace dial pad in SAP CRM Interaction Center with click-to-call. Clicking the phone number should no longer open the dial pad, but instead directly use system default app for phone calls.

ic-phone-number-hyperlink.png

So far, I have two different approaches which both work, but I am not really happy with neither. Maybe there is a more 'standard' way to achieve this or somebody has a good idea.

My first approach was to replace some code in function onCommunicationLinkClicked of file crmcmp_ic_frame_scripts.js (component CRMCMP_IC_FRAME).

Old code:

if ( simple_cti == true )<br>  contextAreaWnd.mcm_show_dialpad( channel_address, false, simple_cti );<br>else<br>  contextAreaWnd.mcm_show_dialpad( channel_address, true, false );<br>

Replaced with:

var telephone_number = 'tel:' + channel_address;<br>window.open(telephone_number).focus();<br>

This will replace opening of dial pad by using default application for protocol TEL.

I don't like this approach because adjusting the javascript files often causes problems (e.g. during upgrades).

Second approach for component ICCMP_BP_DETAIL/BuPaCommContact:

  • implement P-getter method for context node CONTACTADDRESS attribute STRUCT.TELEPHONEMOB
  • set it to event link
  • set on click event
CASE iv_property.
    WHEN if_bsp_wd_model_setter_getter=>fp_fieldtype.
      rv_value = cl_bsp_dlc_view_descriptor=>field_type_event_link.
    WHEN if_bsp_wd_model_setter_getter=>fp_onclick.
      rv_value = 'CLICK_TO_CALL'.
  ENDCASE.
  • create event handler in implementation class for new on click event
method EH_ONCLICK_TO_CALL.
  CONCATENATE gv_click_to_call_js 'thtmlbSuppressOnLoadKeyboardFocus(); window.open("' gv_click_to_call_js '", ' sy-timlo ')' INTO gv_click_to_call_js.
endmethod.
  • create new global attribute (gv_click_to_call_js) in impl class
  • create new method (get_click_to_call_number_js) in impl class to return value of new global attribute in .htm page
  • modify BuPaCommContact.htm
<script  type="text/javascript" language="javascript">
<%= controller->get_click_to_call_number_js( ). %>
</script><br>

Thinking about doing the second approach for every field/attribute where a phone number is displayed is cumbersome.

Can any of you think of a better solution or an idea to replace the dial pad system wide with click-to-call?

Looking forward to your ideas.

Best regards

Sascha

Attachments