Analytics
Learn how to generate custom statistics for charts and reports.
Overview
The Monite analytics empowers users with real-time insights into their accounts payable and accounts receivables processes. It provides aggregated data with detailed breakdowns, filters, and metrics to help finance managers make data-driven decisions efficiently.
Roles and permissions
To access the analytics using an entity user token,
this user must have a role with the payables.read
or receivables.read
permissions.
If a partner-level token is used, no special permissions are needed.
Dimensions and metrics
When working with analytics, dimensions and metrics are fundamental concepts that define how data is structured and presented.
Dimensions
Dimensions are attributes or categories used to group, segment, or filter data. They provide the “context” for the data and are often non-numeric. In charts, dimensions appear as labels for categories or axes. Dimensions help users answer questions like:
- “How many receivables were paid in Q3?"
- "Which counterpart contributed the most to revenue last year?”
Metrics
Metrics are quantitative measures used to calculate and display data values. They represent the “what” of the data and are always numerical. Metrics often appear as values or data points within a chart. Metrics allow users to evaluate performance, such as:
- “What was the total overdue amount last month?"
- "What is the average payment delay for supplier invoices?”
How they work together
Dimensions and metrics are interconnected. Dimensions provide the framework, while metrics fill that framework with measurable values. For example:
- Chart example: A bar chart showing “Average payment delay” (metric) broken down by “Month” (dimension).
- Table example: A data table showing “Payable Count” (metric) grouped by “Counterpart name” (dimension).
This combination ensures that users not only see the numbers but also understand the context, enabling better decision-making.
Retrieve aggregated analytics data
The endpoints that retrieve the aggregated analytics results are:
GET /analytics/payables
for the payables.GET /analytics/receivables
for the receivables.
These endpoints enable users to access summarised data for various use cases, such as generating reports, visualising trends, or exporting metrics for a specified period.
The request fields are explained below:
Check the GET /analytics/payables
and GET /analytics/receivables
endpoints for additional filters.
You can also use any filters from GET /payables
and GET /receivables
.
As a response, we will return not the payables models, but rather the metric values in each dimension.
Example use cases
Here are some examples of aggregated results for specific use cases:
Average amount for payables of last week
Theese are the field values to get the average price of all payables from the last week:
metric
=total_amount
aggregation_function
=average
dimension
=null
- we want to extract just total as number without any breakdownscreated_at__gt
=2024-11-01
- or seven days ago
The response returns the total amount of payables:
Number of receivables in different statuses created last week
The field values to get the number of receivables by status from last week:
metric
=id
aggregation_function
=count
dimension
=status
created_at__gt
=2024-10-07
- or seven days ago
The example response shows 5 receivables in the draft
status and 11 in the issued
status:
Yearly sum of receivables by counterpart
The field values to get the total sum of receivables for 2024, broken down by counterpart, for example:
metric
=total_amount
aggregation_function
=summary
dimension
=counterpart_id
created_at__gt
=2024-01-01
The response shows the total amount of receivables (metric_value
), split by counterpart IDs (dimension_value
):
Chart of payables currently awaiting payment (not cumulative) by creation date
The field values to get a chart of payable creation dates for payables currently awaiting for payment (not cumulative):
metric
=id
aggregation_function
=count
dimension
=created_at
date_dimension_breakdown
=daily
status
=waiting_to_be_paid
The response contains each payable with their creation dates:
Analytics for credit notes
You can also get the same real-time insights for the credit notes with the same aggregated data with detailed breakdowns, filters, and metrics as the payables. To retrieve the aggregated analytics results for the credit notes, call the The GET /analytics/credit_notes
endpoint.
The response contains the number of documents grouped according to the conditions you selected: