OpenAI, Meta and ClickHouse have all written recently about replacing dashboard-first analytics with internal AI agents, and Mahdi Karabiben’s post on Towards Data Science takes the argument one step further: the real bottleneck is knowing what is worth watching. I buy the diagnosis. For a WooCommerce store it lands differently, though. Before anyone builds a WooCommerce data agent, the store needs something those companies already had: its numbers written down somewhere a machine can read them.
Why pointing a WooCommerce data agent at the database fails
The fix I get asked for, and the one that fails quietly, is a chat agent wired to the database or the REST API. “How many orders did we get yesterday” works fine. Then someone asks which customers are slipping, and the answer is confidently wrong, because in WooCommerce the meaning of the data doesn’t live in the tables. It lives in plugin settings, order meta, product attributes, coupon rules, and the owner’s head. Order total is gross until you decide how refunds, taxes and fees count, and every store decides differently.
OpenAI hit the same wall and described it in their engineering post: their agent layers human annotations, code analysis, internal docs and memory on top of the schema, because schema alone produces confident wrong answers. A WooCommerce store has none of those layers. A nicer dashboard doesn’t fix it either, because a dashboard is a frozen answer to a question someone already asked. I’ve written before about defining revenue before anything else touches it, and this is the same problem at a larger scale. Karabiben’s point about which questions deserve asking sits upstream of all of it.
What I’d build instead
Karabiben calls the missing piece the business intent layer: one business goal, the metrics that drive it, and pointers to the data behind each metric. On a store that’s a markdown file plus one query per metric. Goal: monthly net revenue. Drivers: daily revenue, refund rate, share of orders from returning customers. Each metric gets the exact wc_get_orders call or SQL that produces it, so the definition argument happens once, in writing, instead of every time someone opens a chart.
You don’t need an LLM to get anything out of that file. A watcher that runs hourly, computes one metric, and sends mail when it crosses the target already beats the dashboard, because it looks without being asked (on very high volume stores I’d compute this from a nightly rollup instead of live orders):
add_action( 'init', function () {
if ( ! wp_next_scheduled( 'bbioon_watch_store_metrics' ) ) {
wp_schedule_event( time(), 'hourly', 'bbioon_watch_store_metrics' );
}
} );
add_action( 'bbioon_watch_store_metrics', 'bbioon_run_metric_watch' );
function bbioon_run_metric_watch() {
// Targets come from the intent file, via one filter.
$targets = apply_filters(
'bbioon_metric_targets',
array( 'revenue_24h' => 500.00 )
);
$orders = wc_get_orders( array(
'limit' => -1,
'status' => array( 'processing', 'completed' ),
'date_created' => '>=' . ( time() - DAY_IN_SECONDS ),
) );
$revenue = 0.0;
foreach ( $orders as $order ) {
$revenue += (float) $order->get_total();
}
if ( $revenue < $targets['revenue_24h'] ) {
wp_mail(
get_option( 'admin_email' ),
'Store watch: revenue below target',
sprintf( 'Revenue in the last 24h was %.2f, target %.2f.', $revenue, $targets['revenue_24h'] )
);
}
}
That filter is where the intent file gets loaded. The boring details matter more than the model here. WP-Cron only fires on page loads, so an hourly watcher on a quiet store runs late or never, with no error anywhere, and the WordPress handbook is blunt about this. Disable WP-Cron and drive it from the server instead, with define( 'DISABLE_WP_CRON', true ); in wp-config.php and wp cron event run --due-now from a real crontab.
Before trusting it, compare what the watcher computes against the Analytics page in WooCommerce Admin for the same period, and don’t turn on the alert until they agree. A wrong number emailed hourly is worse than no number. And if the owner can’t name the one metric that matters, skip the whole build, because an agent watching a number nobody cares about is just alert fatigue with extra steps. If you want this on a store you run, the intent file plus the cron watcher is a small, well-scoped job, and I’m happy to do it.