Asset Templates
Asset Templates define the category or type of asset that an asset in Assets | Lapine Studios is.
Asset templates do not largely impact assets, although they can be used to filter assets based on membership and keep an internal counter for their number of assets. They also are responsible for assigning a unique index to each asset assigned to a template, ensuring that there will never be duplicate copies of 'Book 1'.
Attributes
Asset Templates within Assets have the following key attributes.
| Attribute | Description |
|---|---|
| Index | A company-wide positive integer that uniquely identifies the template. This is fixed within Assets and can never change. |
| Name | A mandatory field. A friendly name for the asset template. This must be unique. |
| Internal Index | An internal counter that ensures each asset within the template has a unique identification. |
| Description | A short description of the asset. |
| Icon | A graphic to visibly differntiate assets within a listing in Assets. |
| Label | A short name for the generation of asset labels and easy identification. If provided, the label must be unique within the company. |
| Metadata Schema | A JSON document schema for enforcing metadata on assets. |
Default Asset Template
The 'Asset' asset template with the 'AS' label is automatically created when a company is created and cannot be deleted. This template can be edited, but cannot be deleted and is the destination for all assets when an asset template with children is deleted.
Asset Template Guides
Asset Template Names and Labels
We recommend that the name of an asset template is a singular noun. As an example, if your organisation tracks phones as an asset, the recommended name for the template responsible for the phone should be 'Phone'. If you wish to track different types of phones separately, we recommend that you add a custom metadata field, such as 'model' for the template, but track each of them as a 'Phone' asset.
Using Metadata
The metadata field of an asset template is a JSON document. The asset template itself defines a JSON schema that children assets must comply to; edit and create attempts that violate the JSON schema in an asset template will fail. String values for asset template metadata is strongly recommended, even if a number value will be stored. Dates should also be stored as a string with the format 'DD-MM-YYYY'. For a 'Phone' template, the following metadata may be used to track the model of a phone.
{
"type": "object",
"properties": {
"model": {
"type": "string"
}
},
"required": ["model"]
}
How to Create an Asset Template
The following steps walk through how to create an asset template:
- Navigate to the 'Templates' page.
- Click on the 'Create' button.
- Enter the values you wish the template to have. The mandatory value for a template is a unique name.
- Click the 'Create' button.
How to Edit an Asset Template
Note: Editing the components of an asset template that are used in label generation may invalidate existing asset labels.
The following steps walk through how to edit an asset template:
- Navigate to the 'Templates' page.
- Find the template you wish to edit in the listing.
- Click on the 'Edit' button.
- Change any values you wish to apply to the template.
- Click the 'Edit' button.
How to Delete an Asset Template
A template within assets should only be deleted if your organisation is no longer intending to hold any assets of that template and does not intend to in the future. If your organisation is currently not holding any phones, for example, but you may have phones again in the future, you should not delete the 'Phone' template.
The following steps walk through how to delete an asset template:
- Navigate to the 'Templates' page.
- Find the template you wish to delete in the listing.
- Click on the 'Delete' button.