Task Management Platform @ Halodoc.
Halodoc fosters an automation-first mentality. We constantly strive to optimise the efforts of our operational fleet by providing them self-serve technical solutions that can help them manage their work efficiently.
As a multifaceted healthcare company, we have partnered with several businesses to provide the best services to our users. We exchange a lot of data with these partners on a regular basis. Earlier, our business operations team had to put in some manual efforts to collect data from multiple sources, collate and process it, before it was shared with the required stakeholders. These activities consumed some amount of their efforts and time. The operations team had to add more people to ensure business continuity and we were constantly facing challenges. Being a digital healthcare company, we realised the correct way to proceed was to automate and platform-ize these activities, even before these challenges hit us hard.
As we continuously scaled our business, we found the need to have a centralised platform that could be used to manage any kind of workload tasks, keeping in mind these broad requirements -
- One platform for managing all reporting and outgoing data - Halodoc works with multiple external stakeholders and partners. For almost all of these partnerships, there are a lot of reports that are generated and utilised for different use cases. The reporting tools that we generally integrate with, while hosting the intrinsic visualisation components, lack the depth to serve more fine-tuned business use cases. We wanted to extend the current setup with new types of tasks as and when a requirement pops up.
- Support for multiple 'data sinks' - multiple destinations for same report - Our internal and external teams often need reports across destinations - emails, FTP, S3 and so on. We wanted to have the capability for different tasks to have one or more of these destinations to be easily used. Additionally, we wanted a platform that could easily be extended to hook any new destination types.
- Ability to connect to different warehouses to query large amounts of data - Since we are predominantly based on microservice architecture, each of the services own a separate data source. We wanted an ability to support cross-functional and cross-business unit reports. This gives us the flexibility to join and create amalgamated reports.
- Support for near real-time alerting based on deviations from prescribed norms - If any task execution fails due to the input parameters or infra issues, we need to be alerted to take actions accordingly.
- Ability to configure the tasks to be triggered in a scheduled manner - We have integrated with AWS cloud watch alarms to schedule tasks in places where periodic execution of a workload is required. For example, a weekly payment reconciliation report, a daily alert on the campaigns we are currently running that are about to expire or exceeding the budget set and so on.
- Flexibility for the business to self-serve and tune the rules for each task as per need - Non-tech users need a clean and interactive way to change the rules of execution of a logic, on-the-fly. For example, they could change the frequency at which the daily campaign alerts are running, or the limits that need to be crossed for an alert to be generated.
- Auditing capabilities - Users need to be able to view the audit log of the all the tasks that have been triggered along with their current status and the output of the task post completion.
On a high level, we defined 3 entities:
- Task - Blueprint / Definition of a task
- Task Request - Instance of a task; with input payload required for execution
- Task Schedule - Consists of scheduling information, and the input payload
Tasks can be triggered by two sources:
- Manual triggers - The user inputs the parameters as per need and submits the task through our in-house self-serve Control Center. Once a task request is submitted, it is recorded in the database consisting of the state and details of the task. Then an event is published to an AWS SNS topic. The client is returned with an identifier to a task request.
- Scheduled triggers - This flow is similar to a manual trigger; the only difference being that the source of the trigger is a scheduler. We have integrated with AWS Cloudwatch alarm to configure the frequency of execution of each task. These scheduled task requests will have constant payloads that are pre-defined for execution. The capability to tune these schedules is available in our self-serve control center, where one can configure the rules and payload of a task.
Once an event is pushed to the SNS topic, we set up asynchronous invocations of AWS lambda, that in turn invokes a separate task executor service. The task executor holds the logic to run the tasks based on the their type and the input parameters submitted.
The executor runs the logic specific to each task types and eventually updates the output and status of the task request to the interface service. It also delivers the generated assets (e.g. reports, mailers) to the destination/s configured against the task type. Using the identifier, the client polls for the status and results of a task execution.
Following diagram depicts the state transitions of a task request:
We have come up with a simple yet powerful pipeline to automate and manage almost all of our otherwise tedious and time consuming processes of our business operations team. By automating and centrally managing their earlier processes, we have helped them utilise their efforts in exploring newer business avenues, while together, we continue to simplify healthcare.
Interested in joining us ?
We are always looking to welcome folks with an appetite for solving complex problems and joining our mission of simplifying healthcare access to humanity. Write to us at email@example.com
Halodoc is the number 1 all around Healthcare application in Indonesia. We connect 20,000+ doctors with patients in need through our tele-consultation service. We partner with 1500+ pharmacies in 50 cities to bring medicines to your doorstep. We've also partnered with Indonesia's largest lab provider to provide lab home services, and to top it off we have recently launched a premium appointment service that partners with 500+ hospitals that allows patients to book a doctor appointment inside our application.
We are extremely fortunate to be trusted by our investors, such as the Bill & Melinda Gates foundation, Singtel, UOB Ventures, Allianz, Gojek and many more. We recently closed our Series B round and In total have raised USD$100million for our mission.
Our team works tirelessly to make sure that we create the best personalised healthcare solutions for our patients, and are continuously on a path to simplify healthcare for Indonesia.