Report Examples

Examples and use cases for the report builder.

Below is a list of examples and use cases for the builder.

Application Users

Application Users with Application Details

Get application users with their associated application name and category.

Permissions:

  • Application Users: team:read
  • Applications: applications:read
{
  "builder": {
    "application_users": {
      "fields": [
        {
          "name": "email",
          "as": "user_email"
        },
        {
          "name": "active",
          "as": "is_active"
        }
      ],
      "with": {
        "applications": {
          "fields": [
            {
              "name": "app_label",
              "as": "application_name"
            },
            {
              "name": "category",
              "as": "category"
            }
          ]
        }
      }
    }
  },
  "sort": "+user_email",
  "limit": 50
}

Applications

Annual Spend per Application (Current Year)

Get the total spend for each application for the current year by filtering payments within a date range.

Permissions:

  • Applications: applications:read
  • Software Charges: spend:read
{
  "builder": {
    "applications": {
      "fields": [
        {
          "name": "app_label",
          "as": "application"
        },
        {
          "name": "status",
          "as": "status"
        },
        {
          "name": "category",
          "as": "category"
        }
      ],
      "with": {
        "payments": {
          "fields": [
            {
              "name": "amount",
              "op": "sum",
              "as": "annual_spend"
            }
          ],
          "filters": {
            "payment_date": "2026-01-01,gte,2026-12-31,lte"
          }
        }
      }
    }
  },
  "sort": "-annual_spend",
  "limit": 50
}

Spend by Category (Current Year)

Aggregate total spend grouped by application category for the current year.

Permissions:

  • Applications: applications:read
  • Software Charges: spend:read
{
  "builder": {
    "applications": {
      "fields": [
        {
          "name": "category",
          "as": "category"
        }
      ],
      "with": {
        "payments": {
          "fields": [
            {
              "name": "amount",
              "op": "sum",
              "as": "total_spend"
            }
          ],
          "filters": {
            "payment_date": "2026-01-01,gte,2026-12-31,lte"
          }
        }
      }
    }
  },
  "sort": "-total_spend",
  "limit": 50
}

Applications with User Count

Get applications ranked by number of provisioned users.

Permissions:

  • Applications: applications:read
  • Application Users: team:read
{
  "builder": {
    "applications": {
      "fields": [
        {
          "name": "app_label",
          "as": "application"
        },
        {
          "name": "status",
          "as": "status"
        }
      ],
      "with": {
        "application_users": {
          "fields": [
            {
              "name": "id",
              "op": "count",
              "as": "user_count"
            }
          ]
        }
      }
    }
  },
  "sort": "-user_count",
  "limit": 50
}

Applications with Contracts Expiring in Next 90 Days

Find applications that have contracts ending within the next 90 days.

Permissions:

  • Applications: applications:read
  • Contracts: contracts:read
{
  "builder": {
    "applications": {
      "fields": [
        {
          "name": "app_label",
          "as": "application"
        },
        {
          "name": "status",
          "as": "status"
        }
      ],
      "with": {
        "contracts": {
          "fields": [
            {
              "name": "end_date",
              "op": "min",
              "as": "earliest_renewal"
            },
            {
              "name": "total_contract_value",
              "op": "sum",
              "as": "total_contract_value"
            }
          ],
          "filters": {
            "end_date": "2026-04-16,gte,2026-07-15,lte"
          }
        }
      }
    }
  },
  "sort": "+earliest_renewal",
  "limit": 50
}

Spend by Payment Type (AP vs Expense)

Break down application spend into AP and Expense categories using field-level filters.

Permissions:

  • Applications: applications:read
  • Software Charges: spend:read
{
  "builder": {
    "applications": {
      "fields": [
        {
          "name": "app_label",
          "as": "application"
        }
      ],
      "with": {
        "payments": {
          "fields": [
            {
              "name": "amount",
              "op": "sum",
              "filters": {
                "payment_type": "AP"
              },
              "as": "ap_spend"
            },
            {
              "name": "amount",
              "op": "sum",
              "filters": {
                "payment_type": "Expense"
              },
              "as": "expense_spend"
            },
            {
              "name": "amount",
              "op": "sum",
              "as": "total_spend"
            }
          ]
        }
      }
    }
  },
  "sort": "-total_spend",
  "limit": 50
}

Contracts

Contracts with Application Details

Get contracts with their associated application name and contract values.

Permissions:

  • Contracts: contracts:read
  • Applications: applications:read
{
  "builder": {
    "contracts": {
      "fields": [
        {
          "name": "name",
          "as": "contract"
        },
        {
          "name": "start_date",
          "as": "start_date"
        },
        {
          "name": "end_date",
          "as": "end_date"
        },
        {
          "name": "total_contract_value",
          "as": "value"
        }
      ],
      "with": {
        "applications": {
          "fields": [
            {
              "name": "app_label",
              "as": "application"
            }
          ]
        }
      }
    }
  },
  "sort": "+end_date",
  "limit": 50
}

Active Contracts Only

Filter contracts by status. contracts.status is a computed field with title-case values — use "Active", "Expired", or "Inactive" exactly. Lowercase will return zero results.

Permissions:

  • Contracts: contracts:read
  • Applications: applications:read
{
  "builder": {
    "contracts": {
      "fields": [
        {
          "name": "name",
          "as": "contract"
        },
        {
          "name": "status",
          "as": "status"
        },
        {
          "name": "end_date",
          "as": "end_date"
        }
      ],
      "filters": {
        "status": "Active"
      },
      "with": {
        "applications": {
          "fields": [
            {
              "name": "app_label",
              "as": "application"
            }
          ]
        }
      }
    }
  },
  "sort": "+end_date",
  "limit": 50
}

Contract Line Items

Contract Line Items with Contract Details

Get line items with their parent contract name and dates.

Permissions:

  • Contract Line Items: contracts:read
  • Contracts: contracts:read
{
  "builder": {
    "contract_line_items": {
      "fields": [
        {
          "name": "line_description",
          "as": "line_item"
        },
        {
          "name": "quantity",
          "as": "quantity"
        },
        {
          "name": "unit_price",
          "as": "unit_price"
        },
        {
          "name": "total_price",
          "as": "total_price"
        }
      ],
      "with": {
        "contracts": {
          "fields": [
            {
              "name": "name",
              "as": "contract"
            },
            {
              "name": "end_date",
              "as": "end_date"
            }
          ]
        }
      }
    }
  },
  "sort": "-total_price",
  "limit": 50
}

Software Charges

Monthly Spend Trend (Current Year)

Bucket payments by month using trunc to get a single-query time series of total spend per month.

Returns one row per month, ordered chronologically. Use quarter or year for coarser buckets.

Permissions:

  • Software Charges: spend:read
{
  "builder": {
    "payments": {
      "fields": [
        {
          "name": "payment_date",
          "trunc": "month",
          "as": "month"
        },
        {
          "name": "amount",
          "op": "sum",
          "as": "total_spend"
        }
      ],
      "filters": {
        "payment_date": "2026-01-01,gte,2026-12-31,lte"
      }
    }
  },
  "sort": "+month",
  "limit": 12
}

Spend per Requestor with Application Name

Aggregate total spend by requestor email, joined to applications for the app name. Demonstrates using op on the primary resource with a join.

Permissions:

  • Software Charges: spend:read
  • Applications: applications:read
{
  "builder": {
    "payments": {
      "fields": [
        {
          "name": "email",
          "as": "requestor_email"
        },
        {
          "name": "amount",
          "op": "sum",
          "as": "total_spend"
        }
      ],
      "with": {
        "applications": {
          "fields": [
            {
              "name": "app_label",
              "as": "application_name"
            }
          ]
        }
      }
    }
  },
  "sort": "-total_spend",
  "limit": 50
}

Top Requestor per Application by Spend

Return every (requestor, application) pair with their summed spend, sorted so the top spender for each application is the highest-ranked row for that application. Use this instead of trying { "name": "email", "op": "max" } — that alphabetizes emails and does not pick the highest spender.

⚠️ max/min on a string or email field returns the alphabetically-last value, not the row with the largest related metric. The builder will reject that query. To rank by a metric, group by the dimensions you care about and sort by the aggregated metric.

Results are (requestor, application, spend) triples ordered by spend descending. To get a single top-spender per application, keep only the first row for each unique application value on the client side. Increase limit if you need more applications in view.

Permissions:

  • Software Charges: spend:read
  • Applications: applications:read
{
  "builder": {
    "payments": {
      "fields": [
        {
          "name": "email",
          "as": "requestor_email"
        },
        {
          "name": "amount",
          "op": "sum",
          "as": "total_spend"
        }
      ],
      "with": {
        "applications": {
          "fields": [
            {
              "name": "app_label",
              "as": "application"
            }
          ]
        }
      }
    }
  },
  "sort": "-total_spend",
  "limit": 200
}

Spend by Cost Center per Application

Aggregate spend by cost center with transaction counts, joined to applications. Useful for chargeback reporting.

Permissions:

  • Software Charges: spend:read
  • Applications: applications:read
{
  "builder": {
    "payments": {
      "fields": [
        {
          "name": "cost_center",
          "as": "cost_center"
        },
        {
          "name": "amount",
          "op": "sum",
          "as": "total_spend"
        },
        {
          "name": "id",
          "op": "count",
          "as": "transaction_count"
        }
      ],
      "with": {
        "applications": {
          "fields": [
            {
              "name": "app_label",
              "as": "application"
            }
          ]
        }
      }
    }
  },
  "sort": "-total_spend",
  "limit": 50
}

Spend by Payment Type per Application

Break down spend by payment type (AP vs Expense) per application with transaction counts.

Permissions:

  • Software Charges: spend:read
  • Applications: applications:read
{
  "builder": {
    "payments": {
      "fields": [
        {
          "name": "payment_type",
          "as": "type"
        },
        {
          "name": "amount",
          "op": "sum",
          "as": "total_spend"
        },
        {
          "name": "id",
          "op": "count",
          "as": "payment_count"
        }
      ],
      "with": {
        "applications": {
          "fields": [
            {
              "name": "app_label",
              "as": "application"
            },
            {
              "name": "category",
              "as": "category"
            }
          ]
        }
      }
    }
  },
  "sort": "-total_spend",
  "limit": 50
}

Spend by Email Domain per Application

Aggregate spend by email domain per application. Useful for shadow IT and departmental spend discovery.

Permissions:

  • Software Charges: spend:read
  • Applications: applications:read
{
  "builder": {
    "payments": {
      "fields": [
        {
          "name": "email_domain",
          "as": "domain"
        },
        {
          "name": "amount",
          "op": "sum",
          "as": "total_spend"
        }
      ],
      "with": {
        "applications": {
          "fields": [
            {
              "name": "app_label",
              "as": "application"
            }
          ]
        }
      }
    }
  },
  "sort": "-total_spend",
  "limit": 50
}

Payments with Application Details

Get individual payments with their associated application.

Permissions:

  • Software Charges: spend:read
  • Applications: applications:read
{
  "builder": {
    "payments": {
      "fields": [
        {
          "name": "payment_name",
          "as": "payment"
        },
        {
          "name": "amount",
          "as": "amount"
        },
        {
          "name": "payment_date",
          "as": "date"
        },
        {
          "name": "payment_type",
          "as": "type"
        }
      ],
      "with": {
        "applications": {
          "fields": [
            {
              "name": "app_label",
              "as": "application"
            }
          ]
        }
      }
    }
  },
  "sort": "-amount",
  "limit": 50
}

Suppliers

Suppliers with Purchase Order Count

Get suppliers ranked by number of purchase orders.

Permissions:

  • Suppliers: applications:read
  • Purchase Orders: applications:read AND spend:read
{
  "builder": {
    "suppliers": {
      "fields": [
        {
          "name": "name",
          "as": "supplier"
        }
      ],
      "with": {
        "purchase_orders": {
          "fields": [
            {
              "name": "id",
              "op": "count",
              "as": "po_count"
            }
          ]
        }
      }
    }
  },
  "sort": "-po_count",
  "limit": 50
}