# Creating an invoice template

* Enter the Target Object (e.g. Quote), a template name, and save to create a placeholder for the invoice.

<figure><img src="https://3800415611-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNuSjRiJMvVhtdzNDzWBi%2Fuploads%2FfofZgpLGNoktviMprtb5%2Fspaces_A2fSsDo5KsIVkUoDIV1b_uploads_2reNyY9rHpqbMp04t4d3_20250422_113914.webp?alt=media&#x26;token=46542c76-08cd-4b44-a064-60d1306a1612" alt=""><figcaption></figcaption></figure>

***

* Use the Page Header component to maintain a consistent company style for your documents by placing company information at the top or bottom of each document.

{% content-ref url="../basic-examples/howto-logo" %}
[howto-logo](https://help.smallbuilder.com/smallbuilder-documents/basic-examples/howto-logo)
{% endcontent-ref %}

***

* Use a Table component to display key information on the invoice.

<figure><img src="https://3800415611-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNuSjRiJMvVhtdzNDzWBi%2Fuploads%2F9soxdijmKHNJqTzh0Evy%2Fspaces_A2fSsDo5KsIVkUoDIV1b_uploads_ZB5i4CenvUEkJOeAMGqC_20250423_075538.webp?alt=media&#x26;token=f40c2169-541a-4389-9474-6d93ac377471" alt=""><figcaption><p>Add a component by selecting `Component` > `Add Component` > `Table`. Now you can enter the contents of the table.</p></figcaption></figure>

<figure><img src="https://3800415611-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNuSjRiJMvVhtdzNDzWBi%2Fuploads%2FrJQWmx5mDvX7sdatHRrg%2Fspaces_A2fSsDo5KsIVkUoDIV1b_uploads_rwBMdLEKNT74aiFXYsX3_20250423_080137.webp?alt=media&#x26;token=91f1ad0f-44e3-4905-aa1a-121366761588" alt=""><figcaption><p>Optionally, select the cells you want to merge to make a title for the invoice, and press Merge to select the merge direction and the number of cells to merge.</p></figcaption></figure>

***

* To add a value from a Salesforce object to the invoice, hover your cursor over the desired location and click the `Field` button to add a field.

<figure><img src="https://3800415611-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNuSjRiJMvVhtdzNDzWBi%2Fuploads%2FNQvdZ3GWmZf7qLUob8SW%2F20250423_084755.png?alt=media&#x26;token=a1577995-714b-4db3-8408-ef5d9160cc7c" alt=""><figcaption><p>Select where you want to enter the field. Click `Component` then `Field`, then choose the field to add. Finally, select a display format based on the data type.</p></figcaption></figure>

***

* Use the Empty and Divider components to control the spacing between components in the invoice, or to separate content to make the document more readable.

{% content-ref url="../basic-examples/howto-gap" %}
[howto-gap](https://help.smallbuilder.com/smallbuilder-documents/basic-examples/howto-gap)
{% endcontent-ref %}

{% content-ref url="../basic-examples/howto-separators" %}
[howto-separators](https://help.smallbuilder.com/smallbuilder-documents/basic-examples/howto-separators)
{% endcontent-ref %}

***

* Use the **Table (Related)** to display a list of the products you are charging your customer for.

<figure><img src="https://3800415611-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNuSjRiJMvVhtdzNDzWBi%2Fuploads%2FJ9CDmBIupAMUIBVWW7lX%2F20250423_090549.png?alt=media&#x26;token=2275695d-a26f-4e50-a6a2-0b9143865647" alt=""><figcaption><p>Component > Add Component > Related List</p></figcaption></figure>

<figure><img src="https://3800415611-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNuSjRiJMvVhtdzNDzWBi%2Fuploads%2FoPWj1UhNHnJomys7Ebtb%2F20250423_090728.png?alt=media&#x26;token=f5a24b56-0e3b-41ea-a6a8-e0e7b45bd268" alt=""><figcaption><p>Select the appropriate object for the product you want to add -> Select the fields to display -> Apply</p></figcaption></figure>

<figure><img src="https://3800415611-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNuSjRiJMvVhtdzNDzWBi%2Fuploads%2FWtrpasGM0lFjwNbBgGDg%2F20250423_091509.png?alt=media&#x26;token=a76827bd-146c-4539-b0eb-8c46325014f2" alt=""><figcaption><p>Use the arrows to change the order of the fields -> Choose whether to sum or number fields -> Confirm</p></figcaption></figure>

***

<figure><img src="https://3800415611-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNuSjRiJMvVhtdzNDzWBi%2Fuploads%2Fgit-blob-91f98c78d40fee9479b19d726ed40cf16955dd2d%2Fimage%20(7).png?alt=media" alt=""><figcaption><p>Preview</p></figcaption></figure>

<figure><img src="https://3800415611-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNuSjRiJMvVhtdzNDzWBi%2Fuploads%2Fgit-blob-c963fb10417be7c3379b6f16d7d9989e5e1e80ed%2Fimage%20(6).png?alt=media" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.smallbuilder.com/smallbuilder-documents/advanced-examples/invoice.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
