Get Notified and Be Proactive: AI-Powered Business Alerts

Dennis Zwier— 
Turntwo

Imagine this scenario: A digital analyst notices a drop in purchases over the past few weeks. After hours of digging, they discover that a significant drop in stock levels across several key product categories is the culprit. What if this issue had been flagged right away?

Why your typical dashboard isn't enough

Remember when Google Ads conversion tracking malfunctioned, leaving marketers in the dark and causing a costly performance dip? The typical questions came up: What went wrong? How long has this been happening? By the time the problem was identified, precious time and revenue had been lost.

These situations happen more often than you might think. Many companies have dashboards to track their main KPIs, but they often miss the details that affect those KPIs. As a result, not only are opportunities lost, but the impact of problems can be far greater than if they had been caught earlier.

Get notified

To solve these problems, we’ve created a notification system that catches data anomalies early—either through manual business ruling or with help of AI models. This way, you get alerts about potential issues before they become major problems.

In this article, we’ll guide you through setting up an effective alerting system and highlight how these solutions can benefit both technical and non-technical people.

Image: Notification in Microsoft Teams
Image: Business value: Comparing historical with real-time metrics (and get notified when something is off)

Data quality alerts? Also focus on business alerts!

Traditional monitoring systems typically focus on data quality—alerting you when data is missing, pipelines fail, or values deviate from expected schemas. While these alerts are crucial for maintaining data integrity, they don’t address the broader business performance landscape.

Our advanced alerting system shifts the focus from data quality to business performance &  operations (e.g. marketing or sales teams). By implementing a solution that proactively detects anomalies, you gain actionable insights that can directly impact your main KPIs, such as revenue. by enabling timely responses to emerging issues. It enables you to directly act on issues or opportunities as they arise.

Why This Matters

  1. Stay on Top of Things: Automated alerts keep you informed about key changes as they happen. This means you can jump on new opportunities or fix problems quickly, before they affect your profits.

  2. React Fast to Market Shifts: Real-time notifications let you spot changes in sales or other key metrics  right away. If a product’s sales suddenly spike or drop, you’ll be able to act instantly.

  3. Keep Your Operations Smooth: A smart alert system updates you without needing constant check-ins with your team. This keeps things running smoothly and ensures the business is aligned and can act fast.

Some practical Use Cases

  • Sales Threshold Alerts could tell you to monitor for sudden spikes or drops in sales in specific segments. These changes could mean opportunities or issues that need attention.

  • Search Engine Performance Alerts could tell you when there is a significant change in the SEO ranking position of important keywords, helping to identify shifts in search engine algorithms or spot any other (technical) issues. Of course, you could also set up alerting for common campaign related KPIs (e.g. clicks / ROAS), for example when a threshold is passed.

  • Product Category Sales and Stock Status Alertscould show you sales trends and stock levels across product categories to uncover critical insights for your business. Sudden changes can reveal new opportunities, alert you to supply chain bottlenecks, or suggest where to focus your marketing efforts, giving you the agility to adapt and thrive in a dynamic market.

Image: Data Quality vs. Operational Alerts

We're convinced that every business area could benefit from anomaly detection and alerting. The most important requirement is that as a business you need to understand what metrics and KPIs are influencing your business outcomes. This could be related to performance, but also in operations and customer experience (e.g. fulfillment issues / website issues).

Proactively being informed when those metrics are declining or improving could help in acting more effectively and making better business decisions.

How to leverage Google Dataform for Alerting 

At Turntwo, we mainly use the Google Cloud Platform to build our solutions. Google Cloud offers a great infrastructure to perform analytics on big sets of data at scale. Within Google Cloud, we use Dataform for data transformation purposes.

Dataform is a tool that helps to manage data transformation flows. In a nutshell, it makes sure that dependencies between different data transformations are properly aligned and that version control is centralized in a repository.

Dataform has built-in data quality capabilities, called assertions. Assertions are essentially checks that you could define within Dataform to ensure your data meets specific (quality) criteria.

For example, you can set assertions to verify if your data is up to date, free of duplicates, or is in line with specific business ruling. When an assertion / a data check fails, the workflow in dataform fails and an error is logged in Google Cloud Logs.

Yet, there is a big limitation on what information is shared when an assertion fails. When an assertion fails, it gets logged as a generic workflow error in Google Cloud Logs. However, it doesn't contain any specifics. We don’t know what and why it failed. This makes it difficult to distinguish between assertions and proactively act upon them (for example pushing the errors with context to external systems).

BigQuery User-Defined Functions to the rescue

BigQuery User-Defined Functions (UDFs) are a great feature within BigQuery (and Dataform) that enables you to do all kinds of data manipulations using Javascript. Using remote functions, you are also able to interact with other Cloud services by calling their external endpoint. As already perfectly described in a blog by Alex Feldman, this enables you to: 

  • Send tailored Notifications: UDFs can enrich error messages with details like the triggered assertion name, impacted data table(s), and specific data (points) that made the assertion fail. For instance, here we could return the top 10 SEO keywords that made a significant shift. 

  • Integrate with existing Messaging tools: Since we can access APIs in Google Cloud functions, we can proactively share notifications to external platforms (Teams / Slack / Email / etc) whenever an assertion fails, allowing teams to be proactively informed and address issues quickly.

Image: Alerting Infrastructure in Dataform

For more detailed instructions on how to build the UDFs/Cloud function we again advise you to read the blog from Alex Feldman

Next step: Alerting on ML generated anomalies

So, the next step is to explore some more advanced usecases.

One interesting case we deployed for multiple clients recently, incorporates anomaly detection (using BigQuery ML) to spot discrepancies in trends of certain KPIs. When something is off, the right person/team(s) are informed proactively. This could be a Teams or Slack message, email or even a push message.

Anomaly detection is a nice addition to manual business rules and can easily be implemented on your main KPIs (e.g. detect anomalies on purchases from a certain channel) but also on more specific, deeper channel KPIs (for example detect anomalies on the SEO position of certain keywords).

Would you like to explore this topic further? Just drop us a message!

Image: Anomaly Detection Dashboard

More info on how to set up anomalies in Dataform in the article of Alex Danilin.

Stay up-to-date!

Did you like this article? Subscribe and get notified when new articles or other interesting updates are published. No spam and you can unsubscribe at any time.