Skip to Content
author's profile photo Former Member
Former Member

ICWeb Client, How check flashing buttons, before accepting a call?

Good morning,

I need with ABAP CODE, to check if there is the flashing button, before accepting call.

Do know anyone how check this state in the interection center?

To check if the call is accepted I use the following code:

data: ref_intman type ref to cl_crm_ic_interaction_manager.
 

ref_intman = cl_crm_ic_interaction_manager->get_instance( ).
 

check ref_intman->has_current_interaction( ) eq abap_true.

I need also to check if the user is ready or not ready to receive a call.

Many thanks.

Marc

Add comment
10|10000 characters needed characters exceeded

3 Answers

  • Best Answer
    Posted on Feb 20, 2012 at 12:21 PM

    And as a last point.

    Here is an example code how to check call state using standard classes:

    DATA: lr_ccs_instance TYPE REF TO cl_iccmp_ccs,
          lr_contact TYPE REF TO cl_crm_ic_mcm_contact,
          lv_phoneid TYPE string.
    
    lr_ccs ?= cl_iccmp_ccs=>get_instance( ).
    
    lv_phoneid = lr_ccs->get_currentphoneid( ).
    IF lv_phoneid IS NOT INITIAL. //no phone id => no current contact => no flashing buttons
       lr_contact ?= lr_ccs->get_contact( lv_phoneid ).
       CASE lr_contact->m_status.
          WHEN if_crm_ic_contact~c_status_started.
          //current contact has status ContactStarted (flashing buttons)
          //........
          WHEN if_crm_ic_contact~c_status_accepted.
          //current contact has status ContactAccepted (no flashing buttons)
          //........
       ENDCASE.
    ENDIF.

    Hope this will help you.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Andrei Vishnevsky

      Hi Andrei,

      Thank you very much for your reply.

      Outbound Call

      Once call get conected, I need to get caller id and call details from BCM system and need to save into intraction record because in future i need to have intraction record linked with caller id ( from BCM) for further reports in the BCM.

      Could you please help me on this requirment.

  • Posted on Feb 18, 2012 at 03:58 PM

    Hello, Marc.

    I remember that I've promised you to give some inputs on the subject in other thread. But was short of time, sorry.

    Some thoughts what you can do without using any existed (I hope they do, but have no time to find them right now) methods and classes.

    Buttons start flashing with IC event ContactStarted.

    And finish flashing when contact is accepted by user (IC event ContactAccepted).

    So you can create your own class which will instantiate in the very beginning of IC agent session (as soon as he logs in). This class should implement IF_CRM_IC_EVENT_LISTENER interface in it. Then subscribe to these two events (may be you'll need more; see later on). When ContactStarted event will be raised you'll get this in you handle_event method. Set some flag then (let's say gf_contact_started). So calling some static method of this class which returns the current instance and its flag will let you know are buttons flashing or not.

    When call is accepted the ContactAccepted event will be raised and you'll get it in your handle_event method too. On this event clear the flag. And you're almostly done. One thing to think about is what event will be raised when agent won't accept a call and buttons will stop flashing in a while. Try to find out it putting a breakpoint in CL_CRM_IC_EVENT_SRV->IF_CRM_IC_EVENT_SRV~RAISE and reproduce the situation.

    BTW, you can find constants for names of events in cl_crm_ic_interaction_manager class, I think.

    Hope this will help you.

    Add comment
    10|10000 characters needed characters exceeded

  • Posted on Feb 20, 2012 at 12:08 PM

    Additionally, I'd like to mention where you can instantiate your class.

    Add the entry into Start-Up Component in CMS Integration Profiles (SPRO -> CRM -> Basic Functions -> Communication Management Software Integration -> Define CMS Integration Profiles) under your CMS profile. Enter your class there. And in Initialize method subscribe to desired events.

    Constants for events:

    ContactStarted = IF_CRM_IC_CONTACT~C_EVENT_STARTED (when contact just arrives to an agent; buttons start flashing)

    ContactAccepted = IF_CRM_IC_CONTACT~C_EVENT_ACCEPTED (when an agent presses the accept button; buttons stop flashing)

    ContactEnded = IF_CRM_IC_CONTACT~C_EVENT_ENDED (when an agent doesn't accept a call; buttons stop flashing)

    Add comment
    10|10000 characters needed characters exceeded