# Service Template

One or more configuration templates can be configured to create a service template, which is used to fulfill services within NCCM.

This is a privilege-based feature: The user can access, view, add, edit, delete, execute, and export only if the administrator has given them privileges. This will be defined under roles and privileges.

Services are specific to organizations based on the types of services offered. Since service templates are usually a combination of multiple tasks needed to fulfill a service, NCCM does not have default service templates.

Administrators create Service Templates that operators can use.

In **network devices**, a **Service** refers to a specific function or capability that the device provides, such as monitoring, logging, authentication, or automated configuration changes.

In NCCM's Service Template, a **service** defines a structured approach to executing predefined tasks on multiple network devices. It standardizes configurations, updates, and other operations to ensure consistency and efficiency.

**Examples:**

* **Backup Configuration Service** – Periodically saves the current configuration of a device.
* **Firmware Upgrade Service** – Automates the upgrade of the OS or firmware on multiple devices.
* **Compliance Check Service** – Ensures that configurations align with security and operational policies.

## **What do you see on the screen**

The **Service Template** page displays a list of predefined templates available in the NCCM network.

**Basic Details |** Service Template<br>

| **Label**                           | **Action**                                                                                                 | **Description/Example**                                                                                                                                           |
| ----------------------------------- | ---------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Search**                          | Search for the required template.                                                                          | Service Template name.                                                                                                                                            |
| **Filter**                          | A filter can be added based on the field, and the conditions can be selected from the drop-down box below. | <p>Field: Description and Service Name.</p><p>Conditions: in, not in, equal to, not equal to.</p>                                                                 |
| **Export as JSON**                  | Click to export the selected template(s) in JSON format.                                                   | Useful for backup, sharing, or importing templates into another system.                                                                                           |
| **Add**                             | Choose from three options: **Import JSON, Import Text, or Manually.**                                      | <p>Allows users to create a new service template using different input methods.</p><p>Import JSON and Text help in importing the content from the older setup</p> |
| **Service Name**                    | View-only field. No actions can be taken.                                                                  | Displays the name of the service template.                                                                                                                        |
| **Description**                     | View-only field. No actions can be taken.                                                                  | Provides details about the purpose of the service template.                                                                                                       |
| **Status**                          | Click to toggle between **ON/OFF**.                                                                        | Indicates whether the template is **Public** (accessible to all) or **Private** (restricted access).                                                              |
| **Associated Configured Templates** | View-only field. No actions can be taken.                                                                  | Displays linked configuration templates, e.g., **Enable SNMP on Linux devices**.                                                                                  |
| **Visibility**                      | View-only field. No actions can be taken.                                                                  | Indicates whether the template is **Public** or **Private**.                                                                                                      |
| **Created By**                      | View-only field. No actions can be taken.                                                                  | Shows the username of the individual who created the template.                                                                                                    |
| **Modified By**                     | View-only field. No actions can be taken.                                                                  | Displays the username of the last person who modified the template.                                                                                               |
| **Action Icons**                    |                                                                                                            |                                                                                                                                                                   |
| **Edit**                            | Select an existing template and click **Edit**.                                                            | Allows modifications to all fields except **Template Type**.                                                                                                      |
| **Clone**                           | Click **Clone** to duplicate an existing template.                                                         | Opens a copy of the selected template for minor modifications. After making changes, click **Save** to create a new template.                                     |
| **Delete**                          | Select one or multiple templates and click **Delete**.                                                     | Permanently removes the selected template(s) from the system.                                                                                                     |
| **Add Upload Job**                  | Click to use the template as an **Upload Job**.                                                            | Initiates service execution by redirecting users to the **Add Service Job** page. See the **Add Service Job** section for details.                                |

{% hint style="info" %}
**Note:**

Users can perform bulk actions by selecting the checkbox next to each service template. Once selected, they can:

* **Enable:** Activates the selected template(s), making them available for use. Only active templates can be assigned as an Upload Job.<br>
* **Disable:** This option deactivates the selected template(s), preventing them from being used in an Upload Job.<br>
* **Delete:** Removes the selected template(s) from the system permanently.
  {% endhint %}

## **Add Service Template**

To create a new service template in the inventory, click the **Add** button located at the top right corner of the page.

There are three ways to add a service template:

* Upload a pre-configured JSON file.
* Paste the template content in text format.
* Manually configure the template details.

Refer to the table below for detailed input fields:

**Service Details |** Add Service Template

| **Label**          | **Action**                                            | **Description/Example**                                                                                |
| ------------------ | ----------------------------------------------------- | ------------------------------------------------------------------------------------------------------ |
| **Service Name**\* | Enter a unique name for the service template.         | Example: Network Backup                                                                                |
| **Description**\*  | Provide a brief description of the template.          | Example: Backup configuration for Cisco routers.                                                       |
| **Status**         | Toggle ON/OFF to activate or deactivate the template. | ON: Active, OFF: Inactive                                                                              |
| **Visibility**     | Select the visibility setting.                        | <p><strong>Private:</strong> Restricted access<br><strong>Public:</strong> Available for all users</p> |

Once all details are entered, click **Submit** to save the template or **Next** to proceed with additional configurations.

{% hint style="info" %}
**Note:** Fields marked with \* are mandatory.
{% endhint %}

**Template Details |** Add Service Template

| **Label**                                   | **Action**                                      | **Description/Example**       |
| ------------------------------------------- | ----------------------------------------------- | ----------------------------- |
| **Task Name**\*                             | Enter a unique name for the task.               | Example: Device Config Backup |
| **Template Selection**                      |                                                 |                               |
| **Vendor**\*                                | Choose a vendor from the dropdown list.         | Example: Cisco, Juniper       |
| **Configuration Template**\*                | Select a configuration template from the list.  | Example: Router Backup Script |
| **Task Execution Details**                  |                                                 |                               |
| **Shell**\*                                 | Choose the execution method.                    | **Shell** or **Remote**       |
| **Task Retry Count**\*                      | Set the number of retry attempts (0-10).        | Example: 3                    |
| **Task Retry Interval Window (Min/Hrs)**\*  | Set the interval between retries.               | Example: 1 minute, 5 minutes  |
| **Task Status**                             | Toggle ON/OFF to activate or deactivate.        | ON: Active, OFF: Inactive     |
| **Continue to Next IP on Error**            | Toggle ON/OFF to continue execution on failure. | ON: Enabled, OFF: Disabled    |
| **Continue to Next Command on Error**       | Toggle ON/OFF to continue execution on failure. | ON: Enabled, OFF: Disabled    |
| **Task Dependency Details**                 |                                                 |                               |
| **Run After (Previous Task(s))**\*          | Select a preceding task.                        | Example: Start                |
| **Run Only if (Previous Task(s) Status)**\* | Choose a dependency condition.                  | **Failed, Success, Any**      |
| **Wait After Previous Task(s) Completion**  | Set a delay before execution.                   | Example: 2 minutes, 5 minutes |

Once all configurations are completed, click **Submit** to save the Service Template.

{% hint style="info" %}
**Note:** Fields marked with \* are mandatory.
{% endhint %}

## **MSP-Based Visibility**

Upload jobs created through **Service Templates** and **Service Jobs** also follow MSP-based visibility rules. Service-driven upload jobs are visible only within the appropriate customer or entity scope.

### **Visibility**

* A **Customer/Entity** field is available while creating a Service Template for MSP and multi-customer users.
* The selected Customer/Entity:
  * Is displayed in the Service Template grid.
  * Becomes read-only during edit.
* Configuration Templates and Vendor options are filtered based on the selected Customer/Entity.
