{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":48632,"path":"servicenow-platform/policy-as-code-engine-pace/pace-create-policy.md","title":"Create a PaCE policy","bundle":null,"doc_type":null,"release":"australia","body":"\n# Create a PaCE policy\n\nCreate a PaCE policy to determine if changes to a software service or application comply with a set of pre-defined rules.\n\n## Before you begin\n\nRole required: sn\\_pace.policy\\_editor\n\n## About this task\n\nAfter you create a PaCE policy, a decision is then made about these changes, and if they are compliant, non-compliant, or compliant-exception according to these pre-defined rules. The policy must be mapped correctly to the relevant object \\(table and document ID\\) to invoke the policy when any changes are made to the object.\n\n**Note:** Policies are only used if they have active mapping records, and if there was a request to validate an object \\(tables and document IDs\\) mapped to the policy. For further information, see [Map PaCE policies](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/servicenow-platform/policy-as-code-engine-pace/pace-mapping-inputs.md).\n\n## Procedure\n\n1.  Navigate to **All** &gt; **Policies** &gt; **My Policies**.\n\n    **Note:** To view all policies generated by admin/other users, navigate to **Policies** &gt; **All Policies**.\n\n2.  Click **New**.\n\n    The New policy page appears.\n\n3.  Select the New blank policy tile or an existing policy template, then **Create**.\n\n    Templates can be filtered by most used, alphabetically, state, and type. By default, inactive templates are hidden.\n\n4.  In the Create New Policy form, fill in the fields.\n\n<table id=\"table_mc2_q1m_zwb\"><thead><tr><th>\n\nField\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nPolicy name\n\n</td><td>\n\nThe policy name.**Note:** The policy name must be unique, and is used as the identifier of the policy.\n\n</td></tr><tr><td>\n\nDocument type\n\n</td><td>\n\nSelect a document type for the table of items for the policy to be applied to.\n\n</td></tr><tr><td>\n\nCategory\n\n</td><td>\n\nCategories enable you to group and manage policies more efficiently. See [Managing categories in PaCE](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/servicenow-platform/policy-as-code-engine-pace/pace-categories.md) for details.\n\n</td></tr><tr><td>\n\nCalling service\n\n</td><td>\n\nThe name of the calling service the policy was created in.\n\n</td></tr><tr><td>\n\nDescription\n\n</td><td>\n\nAdditional details for this policy.\n\n</td></tr><tr><td>\n\nComments\n\n</td><td>\n\nComments about the policy.\n\n</td></tr></tbody>\n</table>    **Note:** You can add additional comments in the Compose text box, that will show up in the Activity stream.\n\n5.  Click **Save**.\n\n    The form is refreshed to display the newly created policy.\\[Omitted image \"pace-new-policy-manage-3.jpg\"\\] Alt text: Details page.\n\n6.  Add tags by selecting the tag icon \\[Omitted image \"pace-tag-icon-1.jpg\"\\] Alt text: Tag icon. alongside the policy name to add tags.\n\n    For more information about defining tags, [Add tags to PaCE policies](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/servicenow-platform/policy-as-code-engine-pace/pace-add-tags-policies.md).\n\n\n## Result\n\nThe newly created policy contains the following tabs.\n\n<table id=\"table_yck_b1m_zwb\"><thead><tr><th>\n\nTab name\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nDetails\n\n</td><td>\n\nThe details of the policy including the policy name, category, date on which it was created, and a description is displayed.\n\n</td></tr><tr><td>\n\nPolicy builder\n\n</td><td>\n\nWhen you create a policy, by default a draft policy version is created. Each policy version contains version meta-data, a policy script, and variable input definitions, which you can modify according to your requirements. Click the **Policy builder** tab to view the Policy builder page. You can:-   Edit a policy version.\n\n**Note:** You can edit a policy version only if it is a Draft state.\n\n-   View version details\n-   Create a new version\n-   Switch from low-code to the code editor\n-   Save the policy as a template\n-   Compare versions\n-   Duplicate policy versions\n\nFor more details, see [Manage PaCE policy versions](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/servicenow-platform/policy-as-code-engine-pace/pace-policy-versions.md).**Note:** You must publish the \\(See [Publish a PaCE policy version](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/servicenow-platform/policy-as-code-engine-pace/pace-publish-policy-version.md)\\) policy version to make it **Current** before it can be used.\n\n</td></tr><tr><td>\n\nVersion management\n\n</td><td>\n\nThe Version management tab lists out the previous versions of the policy. You can also create a new version of the policy.\n\n</td></tr><tr><td>\n\nMappings\n\n</td><td>\n\nThe Mappings tab enables you to define the object \\(table and document ID\\) to which the policy is to be mapped. For more information, see [Map PaCE policies](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/servicenow-platform/policy-as-code-engine-pace/pace-mapping-inputs.md).\n\n</td></tr><tr><td>\n\nExecutions\n\n</td><td>\n\nThe Executions tab enables you to review the execution activity for the policy.\n\n</td></tr></tbody>\n</table>## What to do next\n\nYou can perform the following actions:\n\n-   Delete a policy that is in an inactive state. See [Delete a PaCE policy](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/servicenow-platform/policy-as-code-engine-pace/pace-delete-policy.md).\n-   Duplicate or create a copy of an existing policy.\n-   Write and test custom PaCE policies. See [How to write and test custom PaCE policies](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/servicenow-platform/policy-as-code-engine-pace/pace-write-test-policies.md).\n\n"}}