Skip to main content

Custom Reporting QL

Custom Reporting lets coordinators and admins build lightweight, read-only reports using a small WildTrack360 query language. It is available from Tools -> Custom Reporting.

The QL is not SQL. Each query line is parsed into a safe internal structure, data is fetched through normal organisation-scoped application queries, and results are aggregated in application code.

Who Can Use It

ActionAccess
Open Custom ReportingUsers with report:view_species
Preview report queriesAdmin, Coordinator All, Coordinator
Save report queriesAdmin, Coordinator All, Coordinator
Edit/delete/toggle a saved queryQuery creator, or Coordinator/Admin-level user

Carers are intentionally excluded from Custom Reporting because the reports are organisation-level aggregates, not individual carer worklists.

How the Workbench Works

  1. Go to Tools -> Custom Reporting.
  2. Choose a template or write one query per line.
  3. Set the From and To date controls if needed.
  4. Click Preview.
  5. Review the table and chart output.
  6. Save useful queries to the organisation library.
  7. Toggle Show on dashboard to pin a saved query as a dashboard widget.

Previewing a query does not use Wally or AI tokens. Wally can help draft a query, but the workbench itself uses the parser and evaluator directly.

Query Syntax

Write clauses in this order:

count from <source>
[between YYYY-MM-DD and YYYY-MM-DD]
[where <field> = <value>]
[group by <field>]
[trend by <field>]
[limit N]
[chart number|table|bar|pie|line]

For numeric totals, use:

sum <numericField> from <source>
[between YYYY-MM-DD and YYYY-MM-DD]
[where <field> = <value>]
[group by <field>]
[trend by <field>]
[limit N]
[chart number|table|bar|pie|line]

You can also use as instead of chart:

count from incidents as table

Clause Reference

ClausePurposeExample
countCount matching rowscount from incidents
sum <numericField>Add numeric valuessum trainingHours from carer_training
from <source>Select an allowlisted reporting sourcefrom animals
between ... and ...Apply an inclusive date rangebetween 2026-01-01 and 2026-06-01
where <field> = <value>Filter by exact equalitywhere resolved = false
group by <field>Break totals into categoriesgroup by severity
trend by <field>Produce a time seriestrend by recordedMonth
limit NKeep the top N groups or latest N trend bucketslimit 10
chart ...Choose output stylechart bar

Use quotes for values containing spaces:

count from animals where species = "Eastern Grey Kangaroo"

Boolean filters accept true, false, yes, no, 1, and 0.

Date Ranges

Every query is bounded by a date range:

Date sourceWhen it applies
Inline between clauseTakes priority over page date controls
Page From and To controlsUsed when the query does not include between
Default trailing one-year windowUsed when no inline or page range is supplied

The maximum range is 366 days. The date range is applied to the source's configured date field.

Time buckets such as foundDay, foundMonth, recordedDay, and recordedMonth are calculated in the Australia/Sydney time zone.

Sources and Fields

Only these sources and fields are available. Source names and field names must be written exactly as listed.

Animals

Use animals for animals admitted in a date range, grouped by current state such as species, status, or current carer.

DetailValue
Date range fielddateFound
Fieldsspecies, status, sex, ageClass, outcome, released, deceased, hasPhoto, hasNotes, hasCarer, carerName, weightGrams, foundDay, foundMonth, releasedDay, releasedMonth
Sum fieldsweightGrams

animals is a current-state snapshot. A trend over foundMonth shows intake by month, not historical changes to an animal's status.

Animal Assignments

Use animal_assignments for internal carer assignment events.

DetailValue
Date range fieldtransferDate
FieldscarerName, hasPreviousCarer, assignmentDay, assignmentMonth
Sum fieldsNone

Use this source when the question is about which carer received animals during a period.

Incidents

Use incidents for incident reports by type, severity, resolution, animal linkage, and attachments.

DetailValue
Date range fielddate
Fieldstype, severity, resolved, hasNotes, hasAnimal, hasAttachments, recordedDay, recordedMonth
Sum fieldsNone

Hygiene Logs

Use hygiene_logs for biosecurity and hygiene checks.

DetailValue
Date range fielddate
Fieldstype, completed, enclosureCleaned, ppeUsed, handwashAvailable, feedingBowlsDisinfected, hasPhotos, loggedDay, loggedMonth
Sum fieldsNone

Carer Training

Use carer_training for training records, certificate coverage, expiry status, and training hours.

DetailValue
Date range fielddate
FieldstrainingType, provider, hasCertificate, expired, trainingHours, completedDay, completedMonth
Sum fieldstrainingHours

Care Records

Use records for animal care log entries such as feeding, medical, weight, or observations.

DetailValue
Date range fielddate
Fieldstype, hasNotes, hasLocation, recordedDay, recordedMonth
Sum fieldsNone

Release Checklists

Use release_checklists for release readiness and release-type reporting.

DetailValue
Date range fieldreleaseDate
FieldsreleaseType, completed, within10km, releasedDay, releasedMonth
Sum fieldsNone

Post-Release Monitoring

Use post_release_monitoring for post-release sighting and condition observations.

DetailValue
Date range fielddate
FieldsanimalCondition, hasPhotos, hasNotes, observedDay, observedMonth
Sum fieldsNone

Assets

Use assets for current equipment and inventory status.

DetailValue
Date range fieldcreatedAt
Fieldstype, status, hasAssignee, createdDay, createdMonth
Sum fieldsNone

assets is a current-state snapshot. Trends show creation dates, not historical status changes.

Examples

Unresolved Incidents by Type

count from incidents where resolved = false group by type chart table

Incidents by Severity

count from incidents group by severity chart bar

Animals by Current Status

count from animals group by status chart pie

Top Species in Care

count from animals group by species limit 10 chart bar

Animal Intake Trend by Species

count from animals group by species trend by foundMonth chart line

Carer Assignment Events

count from animal_assignments between 2026-01-01 and 2026-06-01 group by carerName limit 10 chart table

Training Hours by Type

sum trainingHours from carer_training group by trainingType chart bar

Training Hours Over Time

sum trainingHours from carer_training group by trainingType trend by completedMonth chart line

Hygiene Completion

count from hygiene_logs group by completed chart pie

Care Activity Trend

count from records group by type trend by recordedMonth chart line

Chart Selection

If you do not specify a chart, WildTrack360 chooses one:

Query shapeDefault
Plain count or sumnumber
group by onlybar
trend byline

Available chart types are:

  • number
  • table
  • bar
  • pie
  • line

The workbench may warn when a chart does not fit the query. For example, a line chart without a trend by field or a crowded pie chart may be hard to read.

Saved Queries and Dashboard Widgets

Saved queries are shared with the organisation. Each saved query stores:

  • Name
  • Query text
  • Visualisation type
  • Whether it should appear on the dashboard
  • Creator

When Show on dashboard is enabled, the saved query appears as a Custom Report widget on the home dashboard. Dashboard widgets use the same parser and evaluator as the workbench.

Safety Rules

Custom Reporting is deliberately limited:

  • Queries are read-only.
  • Query text is never executed as SQL.
  • Sources and fields must be allowlisted.
  • All reads are scoped to the current Clerk organisation.
  • Results return aggregates only, not raw records.
  • Raw organisation IDs, user IDs, Clerk IDs, emails, addresses, coordinates, attachments, JSON payloads, notes, and descriptions are not exposed.
  • Free-text fields are reduced to boolean flags such as hasNotes or hasPhotos.
  • Only equality filters are supported.
  • Joins, subqueries, AND, OR, non-equality operators, ordering, raw field paths, and mutation verbs are rejected.
  • Date ranges are capped at 366 days.
  • limit is capped at 50.

When to Ask Wally

Use Wally when you know the reporting question but not the QL syntax.

Example:

Wally, can you make a Custom Reporting query for training hours by month?

Wally can suggest:

sum trainingHours from carer_training trend by completedMonth chart line

If the requested report needs unavailable fields or unsupported logic, Wally should explain the limitation and suggest the closest valid query.

PageWhy it matters
Wally AI AssistantHow Wally helps draft and explain reporting queries
Data Export & ReportingFull exports and NSW register exports
Compliance ManagementNSW annual reporting and regulatory reporting workflows
Roles & PermissionsReporting access and role-scoped permissions