---
title: "Create an inventory database"
canonical: "https://support.appfire.com/space/SCAFC/477468631/Create%20an%20inventory%20database"
format: markdown
---
> Macro (aura-html)

## Overview

Creating an inventory database provides you with a variety of useful data to keep track of your assets or items in stock. Having detailed inventory reports helps you spot trends, maintain adequate supplies, and spot potential problems. 

In this example, we will build an inventory database using Scaffolding. Each inventory item is stored as a page and shares the same format, layout, and sections.

- You use a template to record new inventory items.
- Confluence users can then access the inventory record to get information.

Here is a video that steps you through the process of creating an inventory database:

Later, you can modify the template, and those changes automatically update all pages using it.

## Use Case

|  |  |
| --- | --- |
| Background | Your organization’s assets and items are increasing daily, making restocking and replenishing a growing challenge. |
| Solution | You want to be able to keep track of all your inventory, and you want to provide your end users with a simple way to fill out a form each time there are any updates to inventory items. As an administrator, you want to be able to create a template that you can edit with one click and have the changes reflected on every page using the template. |
| Final Outcome | You set up an Inventory Database space, then created a live template for the Inventory form with Scaffolding Cloud using key fields you created using the Field Group macro.<br>![image](media://3ac3a5fa-57bc-4a8b-bfcf-98688fe21592) |

## Building the knowledge base system

### Step 1 - Create the template

<details>
<summary>Creating the template </summary>

1. Go to **Space Settings > Look and Feel**.
2. Add a new template.
3. Name the new template `Inventory Item Template`.
4. Add a Field Group macro.
5. <span style="color: #172b4d">Create a basic table for </span>`Barcode`, `Description`, `Category`, etc*.*
6. <span style="color: #172b4d">Use the appropriate field type for each. For example, a </span><span style="color: #172b4d">**Dropdown List**</span><span style="color: #172b4d"> field for </span><span style="color: #172b4d">*Category.*</span>

![image](media://06ac334f-20f2-4a3c-9b35-3215fe203859)

7. <span style="color: #172b4d">Create a dynamic table in a </span>`Components `section using <span style="color: #172b4d">the </span><span style="color: #172b4d">**Table**</span><span style="color: #172b4d"> </span><span style="color: #172b4d">**field**</span><span style="color: #172b4d"> type.</span>

> ℹ️ <span style="color: #172b4d">In this example, the </span>`Name and details`<span style="color: #172b4d"> field is a </span><span style="color: #172b4d">**Page list**</span><span style="color: #172b4d"> field to pull a list of Confluence pages.</span>

8. Save the template.
</details>

### Step 2 - Create an inventory item page

<details>
<summary>Creating an inventory item page</summary>

1. Create a new page
2. Add a **Live Template** macro.
3. Locate the template *Inventory Item Template.*

![image](media://45ac5077-b415-4c33-9f3c-381de4d133fa)

4. Save the macro and publish the page.
</details>

### Step 3 - Add content

<details>
<summary>Adding content</summary>

1. Choose **Edit Content** to turn the page into a form.

![image](media://774f33ba-69ef-4d3b-8ae4-798295a74eda)

2. <span style="color: #172b4d">Populate the fields on the form.</span>

![image](media://397d286d-7db4-4cf4-9219-a30fd767ec2d)

3. <span style="color: #172b4d">Choose </span>**Publish Content.**

![image](media://3ac3a5fa-57bc-4a8b-bfcf-98688fe21592)
</details>

Now you have an inventory database in your Confluence.