← All guides

Building KQL Workbooks for Retail Operations from BC Telemetry

Reporting & analytics · 7 min read · By Dex Carter · Published 2026-10-26 · Last updated 2026-10-26

200+ ready-made queries. That is the size of the BCTech KQL query library for Business Central telemetry in Application Insights, organised by functional and signal area. For a retail operations team, the useful move is not opening a blank Logs page and guessing. It is starting from that library, picking the signal areas that match store operations, and arranging the results as an Azure Monitor Workbook that can be filtered and drilled into.

Business Central telemetry is stored in Azure Application Insights in the traces and pageViews tables, and it is queried with Kusto Query Language, shortened to KQL. A workbook does not create new telemetry. It organises queries against data that is already landing in those tables, so the first decision is which surface fits the question.

Workbook, dashboard, or alert: three surfaces, three jobs

These surfaces overlap, and that overlap causes wasted building. Each one answers a different kind of question.

Workbook first. Azure Monitor Workbooks support parameters and conditional visibility for interactive investigation and drill-down. That makes a workbook the right home for an investigation that changes shape as it runs: narrow the scope, look at a failure group, then drill further into the same view. The retail operations workbook belongs here, because a posting failure rarely arrives with its scope already known.

Dashboard second. Log query results and metrics charts can be pinned to shared Azure dashboards. A dashboard is a display surface, not an investigation surface. Pin a tile only after its query has settled in the workbook and the number on it has been checked. Pinning an unchecked query just publishes the error wider.

Alert third. KQL alert rules can detect failure spikes and performance degradation. An alert needs a threshold worth waking someone for, and a workbook tile behind it so the person responding can investigate instead of staring at a count. Build the tile, verify it, then consider the alert.

SurfaceWhat the sources supportUse it for
WorkbookParameters and conditional visibility for interactive investigation and drill-downThe working retail operations view, still being questioned
Azure dashboardLog query results and metrics charts can be pinned to shared Azure dashboardsSettled tiles a wider group should see
KQL alert ruleCan detect failure spikes and performance degradationA verified signal that needs a response, not just a view
Power BI, notebooksKusto queries can also be used in Power BI reports and Jupyter Notebooks (Kqlmagic)Analysis that leaves Application Insights entirely

Start from the library, not from memory

Microsoft Learn documents a starter pattern for telemetry queries, and it is deliberately plain:

traces
| where timestamp > ago(7d)
| take 100
| project timestamp, message, customDimensions
| sort by timestamp desc

Read that pattern closely, because it sets the honest limits for the rest of the build. It reads from traces. It bounds the window to the last seven days. It limits the result set. It projects three things: timestamp, message, and customDimensions. Any workbook tile that claims more precision than the underlying query supports is decoration, not evidence.

The BCTech library then supplies the signal-specific queries. Its map includes version tracking per signal, which matters when a query written for one version is reused after an upgrade. Check the signal version before copying a query into a workbook that other people will trust.

The retail-relevant signal areas

Four signal areas from the library map carry most of the retail operations value. The rest of the library stays available, but these four earn workbook tiles first.

Notice what is missing from that list: any claim about a specific store, company, or terminal. The library organises queries by signal area. Turning a signal into a retail view requires the filtering step, and that step uses the fields the telemetry actually carries.

Filters come from customDimensions

The starter query projects customDimensions alongside timestamp and message. That is the field set a workbook builder works with when scoping a tile: the dimensions attached to each telemetry record are what separate one slice of operations from another.

Two design rules follow.

  1. Keep the base query shape close to the documented starter pattern: read from traces, bound the time window, and project timestamp, message, and customDimensions.
  2. Put the workbook parameters, which Azure Monitor Workbooks support, in front of the tiles rather than hard-coding one scope into every query. One workbook should serve more than one investigation.
  3. Use conditional visibility, which workbooks also support, to hide drill-down sections until a parameter selects them. A tile nobody has asked for yet should not crowd the first screen.

What success looks like: changing a workbook parameter changes the tiles on the page, and a hidden drill-down section appears only when its controlling parameter is set. If the page looks identical after a parameter change, the parameter is decoration and the tiles are still hard-scoped.

Assemble the workbook in order

  1. Start in Application Insights Logs with the documented starter query against traces, and confirm telemetry rows return for the chosen window.
  2. Open the BCTech KQL library and select the queries for RT0030, RT0005, and RT0006/RT0007 first, checking the version tracking shown for each signal.
  3. Create the workbook and add one tile group per signal area: errors, long-running operations, and report executions. Add RT0008 only where web service traffic is part of the operation being watched.
  4. Add workbook parameters above the tile groups and wire conditional visibility so drill-down sections stay hidden until selected.
  5. Keep each tile's query traceable back to its library source. A tile with no known origin cannot be rechecked after an upgrade.
  6. Only after the tiles verify (next section), pin settled results to a shared Azure dashboard, and consider KQL alert rules for the failure signals.

Verify one tile before trusting any of them

A workbook count is a claim. Test it like one.

  1. Pick the error tile and note the count it shows for its window.
  2. Run the documented starter query pattern in Logs for the same window and confirm traces rows exist underneath the tile.
  3. Compare the timestamp and message values the query returns against what the tile presents. The tile should be a view of those rows, not a different population.
  4. Change the time window in both places. Both numbers should move, and they should move consistently.

What success looks like: the workbook tile and the Logs query describe the same telemetry for the same window, and a window change moves both. If the tile stays fixed while the query moves, the workbook is showing a pinned or stale result, and nothing else on the page should be quoted until that is fixed.

The decision rule for the whole build is short. Workbook while investigating, dashboard once a tile is settled and verified, alert only when a verified signal needs a response. Queries can also travel to Power BI reports, Azure Dashboards, alerts, and Jupyter Notebooks, so a query that earns its place in the workbook is not trapped there. Start from the library, keep every tile traceable to it, and let the surfaces graduate in that order.

, Dex Carter, Tech Writer

IndexBack to all guides →