# Catalog item policies

> Create and manage ServiceNow Catalog Item policies in OneFuse

---

Site [llms.txt](/llms.txt)

---

## Prerequisites

1. Create a [Module Credential](/docs/onefuse/configure/module-credentials/) using a ServiceNow user that has the role `x_sovla_onefuse.admin`.
2. Create a [ServiceNow Endpoint](/docs/onefuse/configure/module-endpoints/#servicenow). If applicable, configure [ServiceNow proxy support](/docs/onefuse/configure/module-endpoints/#proxy-support).
3. OneFuse policies: when using the OneFuse Aria Automation Module, it is recommended that the [Aria Automation 8 Policy](/docs/onefuse/configure/modules/vmware-aria-automation/policy/) executes successfully with the [ServiceNow CMDB policy](/docs/onefuse/configure/modules/servicenow-cmdb/policy/) attached to the vRA Cloud Template.

## Create a ServiceNow Catalog Item Policy

1. In OneFuse, select **ServiceNow Connector** from **Home**, or select **Modules** > **ServiceNow Connector** from the left navigation menu.
2. Find the **ServiceNow Catalog Item Policies** table.
3. Select **Create**.
4. Fill out the [ServiceNow Catalog Item Policy form](#servicenow-catalog-item-policy-form-fields).

## Update a ServiceNow Catalog Item Policy

Note the following limitations when updating a policy:

- Updating the ServiceNow Catalog Item Policy name will **not** change the name of the correlated ServiceNow Catalog Item.
- The OneFuse Module type cannot be changed.
- ServiceNow Catalog Item Inputs must be managed in ServiceNow.

<div class="alert alert-info" role="alert">


Links are displayed in Update/View mode of the form to **Edit the Catalog Item** and **View the Order Form** in ServiceNow.
</div>


1. In OneFuse, select **ServiceNow Connector** from **Home**, or select **Modules** > **ServiceNow Connector** from the left navigation menu.
2. Find the policy to update and select the edit button.
3. Edit the information on the [ServiceNow Catalog Item Policy form](#servicenow-catalog-item-policy-form-fields).
4. Select **Update**.

## Delete a ServiceNow Catalog Item Policy

Deleting a ServiceNow Catalog Item Policy will only occur when there are no associated OneFuse ServiceNow Connector Deployments for the policy.

1. In OneFuse, select **ServiceNow Connector** from **Home**, or select **Modules** > **ServiceNow Connector** from the left navigation menu.
2. Find the policy and select the delete button.
3. Select **Delete** to confirm.

## ServiceNow Catalog Item Policy form fields

### General

| Field | Description |
| --- | --- |
| **ServiceNow Catalog Item Policy Name** | Required. Enter a name for the ServiceNow Catalog Item Policy. |
| **Description** | Optional description for the ServiceNow Catalog Item Policy. |
| **ServiceNow Endpoint** | Required. Select the ServiceNow Endpoint for this policy. Begin typing to filter. |

### Child Policy

| Field | Description |
| --- | --- |
| **Module Type** | Select the OneFuse Module Type that this ServiceNow Catalog Item request will invoke. |
| **Child Policy** | Select the OneFuse Policy for the Module Type. |
| **Child Policy Template** | Required. Enter the Child Policy Template that will be invoked when the policy is executed. See samples below. Templated variables in the Child Policy Template are auto-generated into the **Input(s)** table. |

**Sample template for OneFuse Aria Automation Module:**

```jsonc
// Example with a OneFuse vRealize Automation Module Policy
{
  "deploymentName": "{{deploymentName}}",
  "templateProperties": {
    "deploymentOwner": "{{deploymentOwner}}"
  }
}
```

**Sample template for OneFuse Ansible Tower Module:**

<div class="alert alert-warning" role="alert">


The following logic is required for `hosts` to parse the field value type correctly.
</div>


```jinja2
{%- set hostslist=[] -%}
{%- for hostkey in hosts.replace(' ', '').split(',') -%}
{%- if hostkey -%}{{ hostslist.append(hostkey) or '' }}{%- endif -%}
{%- endfor -%}
{
  "limit": "{{limit}}",
  "hosts": {{hostslist|tojson}},
  "templateProperties": {}
}
```

### ServiceNow Catalog Item

| Field | Description |
| --- | --- |
| **ServiceNow Catalog Name** | Select the desired ServiceNow Catalog by name for this Catalog Item. |
| **ServiceNow Category Name** | Select the desired ServiceNow Category by name for this Catalog Item. |
| **Input(s)** | Enter at least one input for this policy. Inputs are automatically pre-populated with any templated field defined in the Child Policy Template, and are passed to the Child Policy Template on execution. Multiple ServiceNow Catalog Items can reference the same policy; inputs are mapped to ServiceNow Catalog Item inputs at the Catalog Item level. **Fields:** **Name**: alphanumeric and underscores only; **Label**: editable friendly label; **Required**: whether a value must be provided during execution. |

<div class="alert alert-info" role="alert">


To add new inputs, add the templated variable to the **Child Policy Template** and select **Sync** on the **Input(s)** table.
</div>


<div class="alert alert-danger" role="alert">


The **Sync** action is destructive and will reset inputs to match the variables defined in the **Child Policy Template**.
</div>


## Next steps

Now that you have created a ServiceNow Catalog Item Policy, [request a Catalog Item in ServiceNow](/docs/onefuse/configure/modules/servicenow-connector/request-catalog-item/).
