Hi experts,
I'm trying to put the leave event into the end button to trigger two events by clicking one button.
As i know, both of the events are handled in the method EH_ONFORWARDCALL. Hence i redefined that method and added some code for test. However, the code does not work as expected: the chat was neither wrap up nor ended.
Here's my added code snippet and is added at the end of the method:
.....
IF ref_event->get_name( ) = 'InteractionEndRequest'.
CREATE OBJECT ref_event2.
currentChatId = CL_CRM_IC_MCM_CHAT_PROXY=>GET_CURRENTCHATSESSIONID( ).
* wrap up event only requires chat id as parameter
ref_event2->set_name( 'McmContactWrapUpStarted' ).
ref_event2->add_param( name = 'Parameter2' value = currentChatId ). "#EC NOTEXT
ref_event_service->raise( ref_event2 ).
ENDIF.
ref_event_service->raise( ref_event ).
Could you please help to check what is missing there?
Thanks in advance.