Invoice Reporting for Accounts
Upmind is designed to be compliant for accounting and capably handles businesses with $100m+ turnovers that need to pass external audits.
While simple reports can be obtained through the Upmind app, we suggest established users ingest reports to their own data warehouse.
In this article we'll explain the process and how invoice data is structured.
Accessing data
Reports can be downloaded from Insights and Reports
> Reports
You can set automatic sends of daily reports to Amazon S3 or equivalent under Settings
> Accounting and Reports
- this will then send updated rows of each database to your S3 instance for ingestion into whichever datalake software you use (e.g. Snowflake).
For users on our Enterprise plan, we can on request set up read access to a replica database for you to read information in real time.
Fundamentals
There are a few fundamentals that we should explain first
Relations
- Ids within Upmind are stored as uuid strings.
Currencies
- Each brand has a
base currency
which is set and cannot be changed. All our amounts are stored in the base currency only. If invoices or payments are in other currencies, we store the exchange rate to the base currency. - If you have multiple brands, then they can all have different base currencies.
Invoices and Credits
- If an invoice is cancelled, there will always be a credit note. There is no leakage from invoices. If you add up the sum of all invoice totals, you will get to the sum total of payments received + accounts receivable + wallet balance.
Service periods
- Every contract product will not have missing service dates. So there will be a consistent service date period.
- If the due date is changed for a contract product, or a contract product is added as an existing service with a start date in the past or future, then there might be zero (0) value items.
Tax
- Tax rules are flexible in Upmind, so we sum up the tax on each invoice item
- Tax reports are then given separately.
Product codes
- Product codes (
product code 1
andproduct code 2
) can be defined on the product level for product reporting. (See How to Create Products). These are set on each individual product. They are freeform and typically are used so you can map in your reporting.
Billings vs Revenue
- On the basis that billings tracks invoice creation date, and the revenue apportions the revenue over the lifetime of the service, you would typically take the creation date as the billing date.
Constructing revenue data
Upmind invoices are broken down into Invoice Items
- These are individual rows on each invoice. Each row contains the following:
Field Name | Description | Can this change | Type |
---|---|---|---|
client id | The unique client id | No | String |
gateway id | The payment gateway id | Yes | String |
payment details id | The payment details associated | Yes | String |
company id | The client company invoiced | No | String |
import id | If the invoice is created as part of an import from an external system (on initial import) | No | String |
id number | Unique Invoice Item ID | No | String |
create datetime | Timestamp of invoice creation | No | Date |
cancellation datetime | If the invoice is cancelled, date of cancellation | Yes | Date |
paid datetime | If the invoice is paid, date of payment | Yes | Date |
due date | When is the invoice due | No | Date |
next charge date | When the next automated charge attempt will happen | Yes | Date |
payment failed attempts | How many payment attempts have happened and failed | Yes | Integer |
payment currency code | If the invoice is paid, what currency it was paid in | Yes | String |
payment currency exchange rate | If the invoice is paid in a different currency to the brand base currency, what is the exchange rate | Yes | Float |
status | Current invoice status | Yes | String |
invoice type | Whether the invoice is - New Contract - Renewal - Migration (Upgrade or Downgrade) - Credit | No | String |
invoice item description | Description of the invoice line | No | String |
product | What product the invoice is for - from the product catalogue | No | String |
product category | What category that product is in | No | String |
document currency code | What currency the invoice is in | No | String |
currency exchange rate | Exchange rate from the base currency to the document currency | No | Float |
invoice product id | String | ||
from date | Start date of the service period | Possibly - see note below | Date |
to date | End date of the service perido | Possibly - see note below | Date |
net selling price | Float | ||
quantity | Integer | ||
billing cycle months | Length of service in months | Integer | |
net amount | Float | ||
tax amount | Float | ||
total amount | Float | ||
net global discount amount | Float | ||
net product discount amount | Float | ||
invoice net amount | Float | ||
invoice tax amount | Float | ||
invoice total amount | Float | ||
invoice paid amount | Float | ||
credited invoice | String | ||
credit note invoice | String | ||
contract id | String | ||
contract product id | String | ||
created at | Date | ||
updated at | Date | ||
deleted at | Date | ||
invoice partial credited amount | Float | ||
product code 1 | String | ||
product code 2 | String | ||
main invoice product id | String |
Service Start and End Dates
In some instances you will see that the service start and service end dates are reversed. This is the case in credit notes where a due date might be rolled back.
If a service has not yet been created, then we do not know the service start and end date. A recommended approach is:
- If the start_date and end_date of the invoice is null and billing cycle months = 0 then it is replaced
with the create date of that invoice. - If the start_date and end_date of the invoice is null and billing cycle months > 0 then:
▪ In the billings model, the create date is taken as the start and end date
▪ In the revenue model, it remains null (as the product is considered unprovisioned)
Status inclusion
Invoice statuses can have various statuses. In logic you should include
- Paid
- Unpaid
- Allocated (credited against a Paid invoice)
Currency Conversions
Here is an explanation for currency conversions used.
Exchange Rate Name | Description |
---|---|
Document Currency Code | Currency listed on the invoice (that which the customer sees) |
Payment Currency Code | Currency on an invoice used to determine which logic to follow to calculate the amount the customer paid in local currency (see below for detail) |
Brand Currency | Currency determined by when the document currency exchange rate (rate used to exchange from local to brand currency) equals 1 |
Currency Exchange Rate (Invoice Items) | Exchange rate listed in the payments export used to convert from brand currency to Document Currency Code |
Currency Exchange Rate (Payments) | Exchange rate listed in the payments export displaying the local currency in which the transaction was made |
You may choose to report either in the Upmind base currency, or you may want to convert first from the brand currency to the document currency, and then use your own spot rate (we recommend openexchangerates.com) to convert to your own reporting currency.
Examples
Calculating Billings
- Convert native net / total amount from brand currency back to the document currency code using the
Currency Exchange Rate - Convert to reporting currency at a spot or constant exchange rate.
Calculating Payments (example in USD)
- If invoice_paid_amount = 0, then Payment Amount is zero
- If Document Currency Code equals Payment Currency Code, Reported Payment Amount equals USD (Total
/ Net) Amount - If Document Currency Code does not equal Payment Currency Code then:
- If Payment Currency Exchange Rate = 1, then use:
▪ Invoice_paid_amount as the amount
▪ Payment Currency Code as the currency code from which to convert to USD using
own exchange rates - If Payment Currency Exchange Rate does not equal 1 (and is not null) then:
- Convert the total amount from brand currency back to the document currency code
using the Currency Exchange Rate to reach the value / currency listed on the invoice - Take the product of this amount and the Payment Currency Exchange Rate to calculate
the local amount paid by the customer in the Payment Currency Code - Convert this amount / code to USD using own exchange rate
- If Payment Currency Exchange Rate is null then:
- USD Payment Amount equals USD (Total) Amount
- If Payment Currency Exchange Rate = 1, then use:
Building Revenue
We distinguish here between two types of revenue:
- Commercial revenue - to give accurate periodic representations. So if a service is credited or never paid, it could affect past periods.
- Accounting revenue - this does not backdate revenue
You can build revenue by aggregating the invoice line data, as follows
Calculation | Definition |
---|---|
Service Period | Difference in days between the invoice start date and end date – if the start and end dates are equal, the service date is set to 1 |
Day Value | (net / total) amount, as calculated for the billings table above, divided by the days in service period to give a day-rate |
Cumulative Days | Number of days (cumulative) since the beginning of the service period by the end of a month |
Examples
Commercial Revenue
Commercial revenue can be calculated by multiplying the days in a revenue period by the day value.
- Days in Month is calculated by finding the number of days in a month which fall on or after the service
start date and whichever occurs first between the service end date & end of month - Commercial revenue is calculated by taking the product of Days in Month and Day Value for each
given month covered by the service period - This process is repeated for net and total values as well as spot and constant conversions
Commercial Deferred Revenue
Commercial Deferred Revenue is calculated using the following steps:
• The product of cumulative days and Day Value is taken to calculate the total revenue that has
currently been earned since the beginning of the service period
• This value is subtracted from the overall value of the invoice line to give the remaining value of liability
yet to be delivered
Accounting Revenue
Accounting revenue does not backdate revenue, so no revenue is allocated to days in the service period before
the create date of the invoice. It is calculated using the following steps:
The Day Value is calculated using the same methodology as with commercial revenue
To calculate the number of days which are multiplied by the Day Value, and by extension calculate
the Accounting Revenue in a month, the following logic is followed:
- If the month listed in the row (date_period) is less than the month of the invoice date (create
date), then the accounting revenue is zero - If the month listed in the row (date_period) is equal to the month of the invoice date (create
date), then take the product of Cumulative Days and Day Value - If the month listed in the row (date_period) is greater than the month of the invoice date (and
within the service period) then take the product of Days in Month and Day Value
Accounting Deferred Revenue
Accounting Deferred Revenue is calculated using the following steps:
- If the month listed in the row (date_period) is greater than or equal to the invoice date, the product of
cumulative days and Day Value is taken to calculate the total revenue that has currently been
earned since the beginning of the service period - This value is subtracted from the overall value of the invoice line to give the remaining value of liability
yet to be delivered - If the month listed in the row (date_period) is less than the invoice date then there is no deferred
revenue allocated - This process is repeated for net and total values as well as spot and constant conversions
Payments
The Payments table is based primarily on the Payments export data and derives daily data at a transaction line
aggregation, with a row for each month a customer has a new transaction type-product-date combination.
The following calculations are used to reach the KPIs in reporting:
- Convert the Payment Amount using the Currency Exchange Rate (that is native to the
Payments Export table) to calculate the local amount for the transaction. - Take the product of this amount and the local exchange rate using the Currency Code which is
native to the table to convert from local to reporting currency:
▪ For spot exchange rate use the date which is native to the table
▪ For constant exchange rate use today’s date
Tracking Customer Status
The invoice items table can also be used to track customer status.
Customer status is determined based on the presence and timing of active invoices. How you define this is down to your logic, but one example might be:
Customer Status | Logic |
---|---|
Pending Warm | If a given date is within 30 days of the customer start date and there are no active invoices, then the status is set to pending warm |
Pending Cold | If a date is more than 30 days since the customer's start date and there are no active invoices, then the status is set to pending cold |
New | If the date is within 60 days of the customer’s first active invoice then the status is set to ‘new’ |
Established | If the customer has an active invoice after the initial 60-day period then the status is set to ‘established’ |
Inactive | If the customer has no active invoices but has previously had an active invoice then the customer status is set to ‘inactive’ |
Closed | If the customer delete date is greater than or equal to the maximum invoice end date the status is set to ‘closed’ for the next 12 months |
Accounting in transition
When importing to Upmind, Upmind only reports invoices generated in Upmind and does not report out historic invoices. While those can be imported to Upmind as legacy invoices, those are effectively just meta data for your customers.
Therefore the important thing on your accounting is just to credit off any historic unpaid invoices from old systems.
You can map Upmind contract products and clients to external services to help with your reporting. We store there an import id
as well as an external id
which you can use for your mapping.
Updated 7 days ago