# Snippets

Insert placeholders for asset data and supported custom fields. Empty fields produce empty values in the generated document.

Canonical: https://docs.mintsd.com/docs/mint-service-desk/admin-portal-snippets
Language: en-GB
Revision: 2a2d39f1e31deba465d9905cd685a5a3416966a588eb6151bba19ba5bc3c7cc9

<a id="element-01a18bf4-81b7-79fb-b36d-73b35ae95fba"></a>

While preparing the file, you can (and should) use special placeholders called snippets. When generating the document, these placeholders
will be automatically replaced with values from the selected Asset.

<a id="element-01a18bf4-81b8-7238-b5fc-131c33b9964d"></a>

**Available asset snippets:**

<a id="element-01a18bf4-81cd-7227-881c-5b12fd29b254"></a>

| Placeholder | Location/used in | Description |
| --- | --- | --- |
| {{Name}} | Asset Details | Asset name. |
| {{Description}} | Asset Details | Asset description. |
| {{PrintDate}} | Document generation | Date when the document was generated. |
| {{PrintDateTime}} | Document generation | Date and time when the document was generated. |
| {{Customers}} | Asset Details | Assigned customers. |
| {{Agents}} | Asset Details | Assigned agents. |
| {{Company}} | Asset Details | Company related to the asset. |
| {{Age}} | Asset Details | Asset age (in hours or days). |
| {{AssetCreationDate}} | Asset Details | The exact date when the asset was created. |
| {{Categories}} | Asset Details | Asset categories. |

<a id="element-01a18bf4-81ce-75a9-9f42-05cdb5fc837e"></a>

You can also use snippets for **Custom Fields** assigned to Asset categories. The schema for such snippets is:

<a id="element-01a18bf4-81cf-7492-85c5-cb4a1153cc1f"></a>

{{CategoryName:AttributeName}}

<a id="element-01a18bf4-81d0-7328-b3d2-0d873950f52a"></a>

For example, for custom field named: **Text** in Category: **Desktop** the snippet should be written as: {{Desktop:Text}}

<a id="element-01a18bf4-81d1-7bc6-9b98-08da358ef5c4"></a>

**Supported Custom Field types:**

<a id="element-01a18bf4-81d7-7576-b829-11f426edac43"></a>

- Text
- Integer
- Realnumber
- Date
- Datescope
- Numscope
- Textarea
- Alertdate
- Radio
- Checkbox
- Hypertext
- Dictionary

<a id="element-01a18bf4-81d8-7153-bd40-9dd11212b5a0"></a>

If a custom field contains no value, the corresponding snippet will be empty in the generated document.

