Quantcast
Channel: SCN: Message List - SAP CRM: Interaction Center
Viewing all articles
Browse latest Browse all 3700

Re: Handling Asynchronous webservice - CRM WEBic

$
0
0

Hi,

 

This is definitely possible in CRM WEB IC.

 

There are many ways of doing it.

 

Easiest would be as below.

 

1. Create one custom FM and call it on your button STARTING NEW TASK and PERFORMING CUSTOM_ROUTINE as shown below.

 

Declare variable in the Same FM group where your custom FM is created of type STRING.

 

 

 

 

CALL FUNCTION 'Custom FM ZZZZZZ for triggering web service'

             STARTING NEW TASK iv_task_id DESTINATION 'NONE'

             PERFORMING HANDLE_CALLBACKON END OF TASK

             EXPORTING

               PARAMETERS  = PARAMETERS.

 

Put the below code in above FM.

 

GV_STRING =  cl_icwc_session_registry=>GET_AGENT_SESSION_QUEUE( ).


Then call the web service.

 

2. In the same FM after statement ENDFUNCTION or in the same Function group add include program with the custom subroutine.

 

FORM HANDLE_CALLBACK USING TASK_ID.

 

Here you will read the response of web service with DO ENDDO LOOP and WAIT 1 or 2 Seconds.

 

As soon as you get response from Web Service You will exit from the loop and trigger the alert on USER with following code.

 

 

call function 'CRM_IC_5X_EXT_ALERT'

Exporting

CONNECTION_KEY = GV_STRING

ALERT_MESSAGE = 'Please check the webservice response'

ALERT_NAVLINK = 'OPTIONAL : Any Navlink you want to put '.

 

ENDFORM.

 

Let me know if this works.

 

Regards,

Naresh


Viewing all articles
Browse latest Browse all 3700

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>