---
title: Invoices
slug: xero/invoices
description: Learn how to easily populate different fields when creating a new invoice with a button URL in this comprehensive document. Find step-by-step instructions for filling out the Invoice Date, Due Date, Reference, Custom Invoice Number, Branding Theme, and Am
docTags: 
createdAt: 2021-11-05T11:21:20.000Z
---

While you only need two query strings on the URL, you will most likely want to specify a few other Invoice level fields, such as the Invoice Date, Due Date, etc.

### Date Fields

You can optionally populate the Invoice Date and/or the Due Date, using a Date field (or a Date/ Time field, from which we will obtain the date). A Formula field with a Date or Date/Time field type will also work.

If you leave the Invoice Date blank, Breadwinner will populate the Invoice Date with today’s date.

If you leave the Due Date blank, Breadwinner will check to see if the corresponding customer record in your accounting system has Invoice terms specified (this must be set in your accounting system, not in Breadwinner). If the corresponding customer record does not have Invoice terms specified, Breadwinner will use the Breadwinner-wide default Invoice terms as specified in the Breadwinner tab under Invoice Configuration Settings. If those settings are also blank, then Breadwinner will leave the Due Date blank.

:::CodeblockTabs
Button URL

```css
&invoice_date=invoice_date_api_field__c 
&due_date=invoice_date_api_field__c
```
:::

### Reference&#x20;

Xero has a single Reference field on the Invoice

:::CodeblockTabs
Button URL

```css
&invoice_reference=reference_api_field__c
```
:::

### Custom Invoice Number

You can also set the Invoice Number.&#x20;

:::CodeblockTabs
Button URL

```css
&custom_invoice_number=custom_field__c
```
:::

### Branding Theme

You can also set the Branding Theme.

:::CodeblockTabs
Button URL

```css
&branding_theme=branding_api_field__c
```
:::

### Amounts Are (Tax Treatment)

You can also set the "Amounts are"*&#x20;field*. Please ensure that you pass the value in the mapped field according to the following format.

- Tax Inclusive = *Inclusive*
- Tax Exclusive = *Exclusive*
- No Tax = *NoTax*

:::CodeblockTabs
Button URL

```css
&tax_treatment=tax_treatment_field__c
```
:::

# Summary of all fields available for a New Invoice (excluding Line Items)

The structure of a Button URL  to create a new Invoice is as below, with all possible fields shown.&#x20;

:::CodeblockTabs
Button URL

```css
/apex/bread-winner__NewInvoicePage
?originating_record={!salesforce_record_ID}
&parent_account=api_field_name__c
&branding_theme=branding_api_field__c
&tax_treatment=tax_treatment_field__c
&invoice_date=invoice_date_api_field__c
&due_date=invoice_date_api_field__c
&invoice_reference=reference_api_field__c
&testing=true
```
:::

