# Automatic Line Item Formatting

### Overview

Line items on invoices follow a predetermined format when generated by the Paigo. In this chapter, we take a deep dive into how line items are constructed in invoices. The line items automatic formatting also applies to the automatic invoices generated by Paigo. Off-cycle invoices with line items manually entered will be not formatted by Paigo.&#x20;

### Line Item Format

Format for line items are determined by properties of dimensions and offerings:&#x20;

* Offering Name
* Dimension Name
* Consumption Unit
* Usage Increment&#x20;

A standard line item follows the following structure:&#x20;

```
${Dimension Name} - ${Converted Unit} - ${Offering Name}
```

The element `${Converted Unit}` is automatically determined by Paigo. It is based on the consumption unit and usage increment. For definitions of these two properties, see [product-items](https://docs.paigo.tech/saas-pricing/pricing-basics/product-items "mention"). As a quick example, when the consumption unit is `Byte` and usage increment is `1024`, the converted unit becomes `Kilobyte`. So the invoice will show `Kilobyte` for ease of understand and better user experience.

### More Examples

We are providing a more detailed example regarding line item formatting.

Assume a SaaS business that wants to bill customers on two dimensions `Queries` and `CPU Hours` for an offering called **Professional Plan**. The dimensions are defined as below.

* **Seats** Usage Increment: 1000 and Consumption Unit: Count
* **Process Time** Usage Increment: 1 and Consumption Unit: Hour

An invoice is generated for the following usage amount:

* **Seats** 400,000 Seats
* **Process Time** 72 Hours

The sample invoice is shown below.

<figure><img src="https://3896284822-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6A4R1rYAI87V2R47cxIl%2Fuploads%2F8po30bmGEXWdQCsXM035%2Fimage.png?alt=media&#x26;token=c9e83d5a-a69f-4b5c-9ab0-22f8ac5a4c68" alt=""><figcaption></figcaption></figure>

The explanation of line items:

* Line item `Seats` is shown in thousands because the usage increment is 1,000. Therefore, the quantity is showing 400, and the line item name is showing as `Seats - Thousand - Professional Plan`.
* Line item `CPU Hours` is shown in its original terms `Hour` because the usage increment is 1.

### Unit Conversion Reference

Below is a table reference for the different automated conversion units.&#x20;

#### Time Units

<table><thead><tr><th width="230" align="center">Unit</th><th width="298.3333333333333" align="center">Usage Increment to Next Level</th></tr></thead><tbody><tr><td align="center">Second</td><td align="center">60</td></tr><tr><td align="center">Minute </td><td align="center">60</td></tr><tr><td align="center">Hour</td><td align="center">24</td></tr><tr><td align="center">Day</td><td align="center"></td></tr></tbody></table>

#### Data Units

<table><thead><tr><th width="226" align="center">Unit</th><th width="302" align="center">Usage Increment to Next Level</th></tr></thead><tbody><tr><td align="center">Byte</td><td align="center">1024</td></tr><tr><td align="center">Kilobyte</td><td align="center">1024</td></tr><tr><td align="center">Megabyte</td><td align="center">1024</td></tr><tr><td align="center">Gigabyte</td><td align="center"></td></tr></tbody></table>

#### Count-based Units / Custom Units

<table><thead><tr><th width="294">Unit</th><th width="269">Usage Increment to Next Level</th></tr></thead><tbody><tr><td>The original consumption unit</td><td>1000</td></tr><tr><td>Thousand</td><td>1000</td></tr><tr><td>Million</td><td>1000</td></tr><tr><td>Billion</td><td></td></tr></tbody></table>

&#x20;
