Custom KPIs
Custom KPIs let you build your own key indicators for the Dashboard, defining yourself, with a SQL query, the number you want to keep an eye on: monthly sales, overdue receivables, items below their minimum stock, or any other figure from your company that AdmCloud doesn't already offer as a built-in report. Each KPI shows up as a card with its current value and, if you configure it, colors that warn you whether you're inside or outside your goal.
What it is and what it's for
A Custom KPI is an indicator card you define yourself with a SQL query. That query must return
a single row with a column named Value: that's the number shown on the
card. Optionally, the same query can also return the Min, Max,
HighSectorValue and LowSectorValue columns so the indicator's range and
colors are calculated dynamically instead of using the fixed values you entered on the form.
It's useful for bringing any business number you want to keep a constant eye on to the Dashboard, when it doesn't already exist as a native AdmCloud report or chart: for example, "customers more than 30 days past due", "gross margin this month" or "items with negative stock".
To help you build the query without being a SQL expert, the creation screen includes three AI-powered tools and a data dictionary:
- Generate SQL with AtIna (beta): describe in plain language what you need (for example, "total sales this month grouped by customer") and an AI agent writes and validates the SQL for you; you can watch the progress in real time and accept or discard the result before saving.
- Explain SQL: if you already have a query (your own or inherited) that you don't fully understand, this button gives you a plain-language explanation of what it does.
- Speed improvement suggestions: analyzes your query and proposes changes to make it run faster.
- Data Dictionary: lists every table available in your company with its technical name and description; from there you can browse each table's fields and preview its data, without leaving the creation screen.
Screens in this area
| Screen | What it does |
|---|---|
| List | Lists every custom KPI in your company, with columns for description, whether it's public, whether it's available on the dashboard, and whether it's owner-only. From here you create a blank one or start from an already-built sample. |
| Create / Edit | The form with the KPI's general data (title, module, range, colors), the SQL query with the AI tools and the Data Dictionary, and the table of user groups with access. |
| Details | The already saved KPI in read-only mode, with its SQL, its permissions and its change log, plus the create, edit, duplicate and delete buttons based on your permissions. |
How to create a KPI, step by step
- Open the KPI list and click New. You can choose Create blank KPI or start from one of the ready-made samples shown in the same menu (for example, monthly revenue or profit margin); picking a sample preloads its SQL so you can adjust it.
- Fill in the title and subtitle you'll see on the Dashboard card, and choose the module the indicator belongs to.
-
Define the SQL query in the corresponding tab. It must return a single row with
the
Valuecolumn. Use the Data Dictionary to find the tables and fields you need, or use Generate SQL with AtIna to have the AI write it for you from a plain-language description. Use the Preview button to check that the query runs and returns the expected result. - Set up the indicator's range and colors with the Minimum, Maximum, Lower Limit and Upper Limit fields (values below the lower limit show in red and values above the upper limit show in green), or let your own SQL query calculate these columns. If a low value is the desired goal for this KPI, check Reverse Goals to flip that color logic.
- Check Available in Dashboard if you want the card to show up on your Dashboard, and decide whether the KPI will be Public (visible to the whole company) or restricted to specific user groups.
- If only you should be able to edit its structure, check the option that restricts editing to the owner.
- If the KPI isn't public, go to the Permissions tab and add the user groups that will be able to see it.
- Save. The system validates the data and the KPI becomes available in the list and, if you checked it, on your Dashboard.
Key fields
| Field | What it's for |
|---|---|
| Name | The KPI's internal identifier; it must be unique across your company and can't be repeated by another KPI or custom report. |
| Title / Subtitle | The readable text you'll see on the Dashboard card. |
| Module | The functional area the indicator belongs to, used to organize it among your KPIs. |
| SQL | The query that calculates the indicator. It must return a single row with the Value column; it can optionally also include Min, Max, HighSectorValue and LowSectorValue. |
| Available in Dashboard | When checked, the KPI's card shows up on your Dashboard. |
| Public | When checked, any user in the company can see the KPI, and it can't be assigned to specific user groups. |
| Owner | The user who created the KPI; it's assigned automatically to whoever creates it and can't be changed from the form. |
| Only the owner can edit the structure | When checked, only the owner (or an admin user) can edit or delete the KPI, even if others can view it. |
| Minimum / Maximum | The full expected value range for the indicator; the minimum can't be greater than the maximum. |
| Lower Limit | Values below this number show in red on the card. |
| Upper Limit | Values above this number show in green on the card. |
| Reverse Goals | Flips the color logic above, for KPIs where a low value is the desired outcome (for example, days late or returns). |
| Notes | Free text to document the KPI's purpose or logic, useful if another user has to maintain it later. |
| User groups | When the KPI isn't public, defines which user groups can see it. |
Validations on save
- Name required and unique: it can't repeat the name of another KPI or custom report in your company.
- SQL required and free of forbidden commands (such as instructions that modify or delete data); only read queries are allowed.
- Owner required and must be an active, non-void user.
- Module required.
- Minimum can't be greater than Maximum.
- A public KPI can't have user groups assigned: if you mark it public, first remove the groups from the Permissions tab.
- If the KPI is protected (owner-only), only the owner can save changes to it; another user will get an error trying to edit or delete it.
Managing the KPI
From an already saved KPI's detail screen, depending on your permissions, you can:
- Edit it, to adjust its SQL, its range, its colors or its permissions.
- Duplicate it to create a variant based on its current setup.
- Delete it, as long as it isn't being used as a data source by one of your company's Plugins; if it is, you must unlink it from the Plugin first.
- Review its change log, showing who created, edited or deleted it and when.
Availability and permissions
- Access is controlled by the "Customization" permission on the user group, with separate levels for view, add and edit.
- Available on the Enterprise plan. If your company doesn't have the Enterprise plan but needs this feature, you can ask AdmCloud support to enable it specifically for your account.
- A KPI marked Only the owner can edit can only be modified or deleted by whoever created it, even though other users with permission can still view it if it's public or belongs to their group.
Tips and common mistakes
Start from a sample. If you're not sure where to begin, create a KPI from one of the samples in the "New" menu and tweak its SQL a little at a time, using the Preview button to confirm each change still returns the expected result.
The query must return exactly one row with the Value column. If
your SQL returns multiple rows or doesn't include that column, the KPI won't be able to show a
correct value on the Dashboard.
You can't make a KPI public while it still has user groups assigned. If the system flags an error on save, check the Permissions tab and remove the group rows before turning on the Public option.
Use "Generate SQL with AtIna" as a starting point, not a final answer. It's a beta feature: always review the SQL it proposes before saving the KPI, especially if the data is sensitive or the KPI will be public.