# Create a new template

### Create a new Template

1. Go to the Service Catalog Admin pages
2. Click on "Catalog Maintenance" in the menu
3. Choose Templates
4. Click add the button "Add new template"

{% hint style="info" %}
Be aware that services are based on a template when they get created. The template can't be changed afterwards.

It is advice to keep the number of templates limited.
{% endhint %}

Now you can create a new template. The Name field is mandatory, all other fields are optional.

![](https://830009223-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MXCmB1C0E7jaoFbPx2p%2F-MXCvpRzo_gayRkish38%2F-MXCwaaxh70q-bFwKYBv%2Fimage.png?alt=media\&token=20948d0a-cf59-4cf6-98e9-cec4d8df6839)

### Below is an explanation of the options while creating a new template

{% tabs %}
{% tab title="General" %}
This tab contains the general settings of the template

| Setting                               | Usage                                                                                                                                                                                                                                                               |
| ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Live                                  | Enables or disables the template for creating a new service                                                                                                                                                                                                         |
| Always hide in public                 | When enabled, Services based on this template will not be visble in the public pages                                                                                                                                                                                |
| Service name                          | **Free text** makes it possible to give a service a free-text name                                                                                                                                                                                                  |
|                                       | **Dynamic Value** allows you to make use of template fields to calculate the name of the sevice. This is useful in case you have a naming convention and what all services to have a similar formatted name.                                                        |
| Service name format uses calculations | See [calculations ](https://docs.smt-x.com/smtx-online-documentation/catalog/catalog-maintenance/templates/broken-reference)option explained                                                                                                                        |
| Service name format                   | Contains the definition of your service name. You can use calculations and refer to fields within the template. This allows you to for example create standardized names like \<Location Code>\<BLANK>\<ProviderShortcut>\<BLANK>\<ShortName>                       |
| Service summary contains html         | When this is set to yes, the contents of the summary field is not encoded while being displayed on the public pages. That way you can include formatted text in your summary                                                                                        |
| Service summary uses calculations     | See [calculations ](https://docs.smt-x.com/smtx-online-documentation/catalog/catalog-maintenance/templates/broken-reference)option explained                                                                                                                        |
| Service summary                       | This field is displayed at the front of the Service details page. You can include reference to other fields and build your summary with field references.                                                                                                           |
| Service default type                  | Select the service type that you want to have set by default when a service is created based on this template.                                                                                                                                                      |
| Service type readonly when published  | When this option is set to Yes, a service based on this template can't get its type field changed anymore.                                                                                                                                                          |
| Confirm message on publish request    | This field is used to provide information to the person publishing a service based on this template. The message typed here is displayed immediately after publication is done. It can be used to for example inform the person what will happen after publication. |
| Confirm message on unpublish request  | Define a custom message to show when a service based on this template gets unpublished                                                                                                                                                                              |
| Confirm message on delete request     | Define a custom message to show when a service based on this template gets deleted                                                                                                                                                                                  |
| {% endtab %}                          |                                                                                                                                                                                                                                                                     |

{% tab title="Fields" %}

This tab has a double functionality:

1. Define the fields part of this template
2. Define the structure how the service is displayed in the public user interface

### Define Fields

Fields define the data that will be collected for services based on this template. Fields can be of various types and you can configure at what lifecycle phase a field becomes mandatory.  Read how to [add a new field](https://docs.smt-x.com/smtx-online-documentation/catalog/catalog-maintenance/templates/broken-reference).

### Define structure

Once fields have been defined, you can organize them so that the service can easily be read by users in the public UI. Use the tool icon to change the number of columns.

![Tool icon to change the name and number of columns](https://830009223-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MXCmB1C0E7jaoFbPx2p%2F-MXHSvPXnKv3slFD_Ben%2F-MXHU4Q9CeZzst0hystF%2Fimage.png?alt=media\&token=190c54d3-aef9-4c4b-9ac8-92b5ce98894b)

Fields can be dragged across multiple rows and multiple columns.&#x20;

You can add additional tabs to logically group fields together.
{% endtab %}

{% tab title="Triggers" %}
Triggers are used to start workflows after something has happened with a service based on this template. Please find below the available triggers and when they get fired:

| Trigger name        | When it triggers                                    |
| ------------------- | --------------------------------------------------- |
| Service Creation    | When a service gets created, based on this tempalte |
| Phase Change        | When the phase of the service changes               |
| Publication request | When a service gets published                       |
| Field change        | When a field of a service gets a new value          |
| Service expired     | When the service expiration date is reached         |
| New parent          | When a new upstream relationship is created         |
| New child           | When a new downstream relationship is created       |
| Lost parent         | When an upstream relationship is removed            |
| Lost child          | When a downstream relationship is removed           |
| Quality note change | When the status of a quality note changes           |
| Delete request      | When a service is requested to be deleted           |
| Unpublish request   | When a service is requested to be unpublished       |
| Custom request      |                                                     |
| {% endtab %}        |                                                     |

{% tab title="Actions" %}
Actions are used to add additional functionalities to a service depending on the access rights of the logged in person. To add a new action click the add action button.

![](https://830009223-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MXCmB1C0E7jaoFbPx2p%2F-MXHWAzSgxp9a23pIiKL%2F-MXHWiSbWTyo4ajOeIS9%2Fimage.png?alt=media\&token=201f0f3b-ca92-4920-93ed-151ac36b0a6e)

Give your new action a new and link a SSP request form to it. When the logged in user has access to the selected form, the action will be displayed next to the name of the service while editing the service. The form linked to the action receives the service id and service guid as parameters.
{% endtab %}

{% tab title="Support Groups" %}
Support groups are used to define which support groups are involved in supporting the service. Within the template, you can define if a service based on this template will have the option to define support groups and if so, what the naming convention of these groups will be.

### Default support group

This is the primary group support the service based on this template. Provide a naming convention here by using (part of) fields defined on the Fields tab. You can use [calculations ](https://docs.smt-x.com/smtx-online-documentation/catalog/catalog-maintenance/templates/broken-reference)to further format the field contents.

When the field is set read-only, it won't be possible for the person creating the service to change the name of the group. This allows you to have a strict naming convention.

The max length can be used when the name of a service should be sent to an external system with a limit in the number of characters.

### Support group with identifier

When additional groups are needed besides the default group, you can chose to base these additional groups on an identifier. You can define additional fields that the creator of a service needs to fill out in order to create the new group. These fields can be used to format the name of the support group.

### Location based support group

When support groups are linked to a location you can use this option to define a group per location. The person creating the service is asked to select a location and is then asked to provide values for the additional field parts. The selected location can be refered to by the Identifier field (#REPLACE-IDENTIFIER#).

The source table for locations can be set within the general settings menu of SSP.
{% endtab %}
{% endtabs %}
