A web based order management system (OMS) provides greater extensibility to its clients either they are from marketing or call center domain. CTI (Computer Telephony Integration) is a common name for any technology that allows interactions on a telephone and a computer to be integrated or coordinated. Almost every call center has to setup its own CTI server locally in house or has to buy a third party service (API).
This OMS is mainly developed using ASP.Net WebForms, Vb.net, SQL Server, 2005 InContact API, Long Polling (Reverse Ajax), Telnet, CTI Server & CTI Framework of this particular OMS and JSON.
CTI framework of client’s order management system supports the integration of a third party CTI. The issue encountered was that it wasn’t actually supporting the newly integrated CTI Service provider named as “InContact API”. Our client requested InContact CTI integration in this OMS. This integration would include:
- Agent screen pop up with details of incoming call that would happen automatically along with some other details of DNIS and ANI populated for sales agent
- Automatically loading of script associated with toll free number
- The ability to answer incoming calls and release calls
- Sales agent be able to dial a number and place a call on hold
It was a high priority task for vteam #450 because of one week’s deadline. vteams engineer Shoaib Rashid received a very basic and initial design document plus necessary information to get started from client. Every second mattered a lot because client was monitoring the progress of this task ticket on daily basis. The deadline was short due to its launch in start of the very next week. Following were the tasks that should be completed within this limited time:
- Long polling (Reverse Ajax) should be implemented to capture real time events (Incoming call, outgoing call, hang up and hold, etc). The application should be robust enough to capture all the necessary details in real time.
- This application should monitor all the sales agents’ session (not only one) so that it could perform as a multi-threaded App. Different sales agents’ should be able to Login to this OMS (as in Call Center environment).
- There should be a proper mechanism to reconnect sales agent to the system in case of disconnect.
Shoaib implemented this whole project in a separate class library (DLL) which would basically provide an interface. This particular OMS’s CTI framework would interact with DLL’s interface. CTI framework would consume its exposed functionality like incoming call, out going call, etc.
To request notifications about events as soon as session of the sale agent would start on InContact platform, polling model was implemented. It would employ the “comet” pattern (a.k.a. “Reverse Ajax”). In this pattern, application is making a REST-full call (over HTTPS) to request new events happening on InContact platform. This call would return JOSN play-load with an appropriate events stream. Reason of using comet pattern was that it would prevent the application from being very “chatty”. It also reduced the request-response cycle to a minimum of traffic (InContact also recommended such kind of pattern).
Once engineer was done with events stream, he wrote a parser for these events that helped to perform an appropriate action on happening of that particular event. This parser would take JSON as input and invoke relevant function call.
Different types of events for example; incoming call, outgoing call, on hold, mute were handled by using this OMS’s CTI framework. It would result an ultimate interaction with the application.
A custom code was written to monitor and maintain session for each individual sale agent in a separate thread while the failure of transmission was kept in mind. For example, if a session would disconnect due to a transmission error then it should attempt to reconnect automatically for a number of times within a specified time period.
Error handling/fall back for each type of event keeping recommendations of InContact in mind was implemented. To track all the necessary details, this application would provide a signal to OMS’s CTI.
Logging feature was also added which could help to debug the application while it was deployed on live environment. It generated a text based file to capture all the necessary details as required.