< Back

September 30th, 2024

How we built a service that keeps our customers coming back.

{ Engineering }

How we built a service that keeps our customers coming back.


Do you open your Cowrywise app, hoping to create a plan, but something distracts you, and you never finish? It happens to everyone! We constantly strive to help you complete this process, so we built a cutting-edge solution to tackle this problem.

Track and Notify.

The Track and Notify service helps us keep track of our customers’ activities and send them reminders or notifications based on what they do (or don’t do). Imagine you start to create a savings plan on Cowrywise but don’t finish it; this service detects that you didn’t complete the plan creation process and sends you a friendly reminder to come back and finish it.

Here’s a breakdown:

  1. Tracking Activities: The service monitors various customer actions, such as attempting to fund an account or creating a savings plan.
  2. Noticing Incomplete Actions: It also keeps an eye out for actions that customers start but don’t complete, such as attempting to fund an account or starting to create an investment plan without finishing it. It tracks a wide range of relevant activities. Additionally, it notices customers who sign up but don’t engage further, indicating overall customer activity. It ensures our customers receive timely reminders to complete essential flows. It improves their experience and overall engagement with our apps.
  3. Sending Reminders: When the service notices incomplete actions, it sends notifications to remind customers to finish what they started. These reminders, delivered via email or push notifications, contain tailored messages and call-to-actions that direct our customers back to the screen they dropped off, engaging them to complete what they started.

Why It Matters.

Tracking customer activities and sending relevant reminders is a win-win for a business and its customers. When customers start an action on our app but don’t complete it, they often need a little nudge to come back and finish. We, in turn, created an intelligent system that understands when customers drop off and reminds them to complete flows for a complete experience.

Microservice Architecture.

We adopted a microservice architecture for the Track and Notify Service and separated it from our core application. This separation offers significant advantages, such as independent scaling and maintenance, fault isolation, simplified debugging, etc.

Taking it a step further, we designed the service’s architecture to be unaware of the core application and vice versa. How did we do this? We created an intermediate event tracking backend. While the core application sends event-related data to this backend, the track and Notify service fetches the needed data.

Here’s a breakdown of the architecture:

Designing The Solution.

To create an effective action tracking and notification service, we needed a well-thought-out plan that addressed the service’s regular operation and the tools required to make it work smoothly.

One of the service’s essential aspects is running periodic tasks. Think of tasks as reminders that contain information about what actions to track on our apps and at what intervals these reminders should be sent out.

For instance, if a customer abandons creating an investment plan, a prompt reminder within 30 minutes can significantly increase their chances of returning to complete their investment.

By periodically checking relevant customers’ actions, we can consistently identify customers who don’t complete specific flows on our app. This consistency ensures that we identify problem areas across major flows.

We then automated these tasks. The service can operate without constant manual oversight, making the process more efficient and reliable for us and our customers.

Keeping Track of Information.

For the service to function effectively, we needed to keep track of various details about each reminder. This information helps us monitor customer activities accurately and ensures we send the right reminders at the right time.

Start Event Name

  • What it is: This is the initial action a customer takes that we need to monitor. For example, it could be at the start of a top-up flow.
  • Why it’s important: Knowing the start event helps us identify when a customer has begun a task. It’s the first step in tracking whether they complete it or not.

End Event Name

  • What it is: This action signifies that a task, such as completing a form or an investment purchase, is complete.
  • Why it’s important: Tracking the end event lets us know when a customer completes a task (or not). It helps us send contextual reminders to those who need them.

Interval

  • What it is: This is how often we want to send reminders for particular flows. It could be every hour, daily, or at another regular interval. It is the period within which we expect the task to be completed. For example, we might expect a customer to complete ‘create a savings plan’ within 30 minutes of starting it.
  • Why it’s important: Regular checks ensure we consistently keep track of customer activities and send timely reminders. They also let us identify when a customer has taken too long to complete a flow, helping us determine the best time to send a reminder.

Notification Key

  • What it is: This code or identifier tells us what kind of message to send and what the message should say.
  • Why it’s important: Different flows might require different types of notifications. The notification key helps us tailor our messages to be most effective for the customer and the scenario. For example, the notification might remind a customer to finish creating a plan or to complete funding their account, with each message tailored to the specific action the customer needs to complete.

Periodic Status

  • What it is: This indicates whether the task is a recurring one or a one-time event.
  • Why it’s important: We might need to send a reminder just once during special cases.

Active Status

  • What it is: It’s a simple on/off switch that tells us whether the task is currently active.
  • Why it’s important: Sometimes, we must pause or stop a task. The active status helps us quickly see which tasks are currently operating and which are not, allowing for easy management and adjustments.

How We Use This Service.

The Track and Notify Service has an interface designed to be human-friendly, so even a non-technical person can set up a reminder with the correct parameters. When we want to set up a reminder for a flow, we specify pre-defined details like the start event (e.g., a customer starts a signup process), the end event (e.g., a customer completes the signup), and the duration (how long the customer should complete the task), which also doubles as the interval with which we should send reminders. Once we set the reminders, the service automatically monitors activities on our apps for abandoned flows. When the service detects such flows, it sends a contextual reminder to the customer.

Tools We Used.

We rely on a few essential tools. While we won’t bore you with the nitty gritty, here’s a brief look at the main tools involved:

  • A Task Scheduler: This is like the engine that keeps everything on schedule. We use Celery for this. Celery lets us manage and execute tasks regularly, ensuring our service performs the necessary check-ups and sends timely reminders.
  • Customer Activity Tracker: Our event tracking backend monitors and records actions taken on our apps in real-time. The Track and Notify service then uses an algorithm to fetch customers who drop off before completing the flow.
  • Notification System: Once we know which customers we need to nudge, we use our core notification service to send out reminders. It could be through emails, push notifications, or other forms of communication.

How We Find and Notify Customers.

The heart of the Track and Notify Service is its ability to find customers who need a little nudge to complete the flow and send them timely reminders.

Tracking Customer Activities

Our event tracking backend records specific customer-triggered events in real-time. These events occur when customers take actions at various points within our apps, such as clicking a button or navigating to a particular page. These significant activities are automatically recorded and sent to our event tracking system, which provides valuable insights into our customers’ behaviours.

Integrating with the Track and Notify Service

The Track and Notify Service retrieves event data from the events tracking backend. It uses an algorithm to determine which customers dropped off, identifying where and when this occurred in our apps. This data-driven approach ensures precise identification of customers who need a nudge.

Sending Notifications

After identifying customers who dropped off, we send them notifications with content tailored to the specific flow they were attempting to complete. This personalized approach helps guide customers back to finish their intended actions.

Making Sure Everything Runs Smoothly.

Ensuring the Track and Notify Service works as intended is critical for providing a seamless and practical customer experience. We employ a thorough testing and validation process that makes sure every part of the service operates correctly and reliably.

We test each service component, from tracking customer activities to sending notifications individually. The tests involve writing unit tests that check whether each piece of code functions as expected.

Bringing It to Life.

Some crucial steps were involved in turning the Track and Notify service from a concept into a fully functioning tool for real customers.

Deployment.

We began by preparing the staging environment. The staging environment is a simulation of the production environment that helps us notice bugs and fix them before they’re live. The next stage was deploying to the production environment.

Before fully rolling out the service to all our customers, we conducted live tests to ensure everything worked as expected in the production environment. It helps us catch any issues that might not have appeared during development or staging.

Once we deployed the service, we configured it according to our customers’ specific needs. It included setting up periodic reminders, specifying the desired customer actions for reminders, and configuring notification contents to what we needed to send.

Continuous Monitoring.

Once the service went live, we set up real-time monitoring to monitor its performance. It involved using monitoring tools and dashboards to track key metrics like task completion rates, notification delivery times, and system performance.

We also configured alerts to notify us of any issues, such as failures in fetching customers who need to be nudged or delays in sending notifications. Continuous monitoring lets us respond quickly and minimize any disruption to the service.

Challenges Faced.

While testing the service in the staging environment, we discovered some issues (that we missed during development) with sending out notifications. We realized that we sent some notifications multiple times.

It took some time to pinpoint the root cause. We ultimately traced the issue back to how we used specific tools. The official documentation for these tools did not entirely account for our use case. To make it fit our use case, we lightly refactored the application.

Conclusion.

Aside from finding a better name for the service, several potential improvements and additional features could make the Track and Notify service even more effective. For instance, behavioural analysis involves using machine learning algorithms to analyze customer behavioural patterns and predict the best times to send notifications for maximum impact.

This proactive approach helps us keep our customers engaged and satisfied, ultimately driving better outcomes and growth.