Wednesday, July 20, 2011

Call lists: Archiving calls to improve performance

If you have implemented an interface or an action that feeds calls to call lists, you will run in to the fact that call lists will keep growing, as there is no possibility to archive calls from the call list. Eventually, the size of the call list will decrease the performance of the call dispatcher, as it technically it has to evaluate all closed calls as well.

In order to avoid the decrease of the call list, you can implement a program that periodically moves all closed calls to the archive call list. Calls from different call lists are not evaluated by the call dispatcher, so they can be considered archived.

Moving a call from one list to the other will not influence the customer overview, as what you see here is merely the contact that was created together with planning the call.

You can also use the call-transfer job to transfer calls from one list to another, for instance if the customer has not picked up the phone after 3 tries for instance, where you plan to work on this list in a different time of the day (for instance the 'evening-list'.

In order to be able to move calls from one list to another, you should specify from which list to which list you want to transfer. I would suggest this is done in the selection screen. Secondly, you will want to specify the selection criteria for selecting the calls from the list. This could also very well be done in the selection screen.

Now in the program, select from the source list and move the calls to the target list.

As call lists are fully object oriented, you should use the following classes to properly program this.

cl_tm_clm_session method get_call_list_by_id to load the call list.
cl_clm_call_list to hold the call list. Method get_interactions to get the calls into a table of type crmt_clm_interactions.

Now loop at the contents of the table and check the attributes based on the selection criteria as specified in the selection screen.
If a call is to be moved to the target list (based on the criteria from the selection screen), move it to a different table of type crmt_clm_interactions.

Now first we should delete the call from the source list, and then add it to the target list.

Use method get_interactions_container on the instance we created earlier of class cl_clm_call_list to move the interactions into a container of type cl_tm_clm_interactions.

Now call method remove_interactions of the cl_tm_clm_interactions instance with the cl_tm_clm_interaction table as a parameter.

Now create a container for the target list in the same manner and use method add_interactions in the same way to add the calls again.

Now commit and we're done.

Of course you should do error handling to make sure calls are not doubled or accidentally deleted during the transfer because for instance the call or the call list is blocked.

With this call transfer interface, you can freely move calls from one list to the other based on your own business rules. Not only will this keep performance up, but also it will enable you to keep your call lists clean and clear.

No comments:

Post a Comment