{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":46914,"path":"servicenow-platform/configuration-management-database-cmdb/create-non-cmdb-id-rule.md","title":"Create an identification rule for a non-CMDB table","bundle":null,"doc_type":null,"release":"australia","body":"\n# Create an identification rule for a non-CMDB table\n\nTo use Identification and Reconciliation Engine \\(IRE\\) features with supported non-CMDB tables, you must first create identification rules that uniquely identify the table records. Each non-CMDB table can be associated with a single identification rule.\n\n## Before you begin\n\nRole required: sn\\_cmdb\\_editor and itil have read access, sn\\_cmdb\\_admin and itil\\_admin \\(on top\\) have full access\n\n## About this task\n\nEach identification rule consists of a single identifier for the table, one or more identifier entries, and one or more related entries.\n\nReview the following topics before creating identification rules:\n\n-   [Identification rules](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/servicenow-platform/configuration-management-database-cmdb/c_IdentificationRules.md)\n-   [General guidelines for using CMDB Identification](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/servicenow-platform/configuration-management-database-cmdb/best-practices-id-reconcile.md)\n\nWhen creating identifier entries, you can configure the **Search on table** and **Criterion attributes** fields on the Identifier Entry form to implement one of the following options:\n\n-   **Regular identifier entry**\n\n    Lets you select attributes from the associated identifier table.\n\n-   **Lookup identifier entry**\n\n    Lets you select attributes from any related table \\(Lookup table\\), other than the currently selected table.\n\n-   **Hybrid identifier entry**\n\n    Lets you select attributes from both the currently main selected table, and from another table \\(Lookup table\\).\n\n\nFor non-CMDB tables, only independent identification rules are supported.\n\n## Procedure\n\n1.  Navigate to **All** &gt; **Identification/Reconciliation** &gt; **CI Identifiers**.\n\n2.  In the Identifiers list view, click **New**.\n\n3.  Fill out the Identifier form.\n\n    |Field|Description|\n    |-----|-----------|\n    |Name|Name of CI identifier.|\n    |Applies to|Supported non-CMDB table.|\n    |Independent|Must be checked to indicate that the identifier can identify a record independently of other records.|\n\n4.  Click **Submit**.\n\n5.  In the Identifiers list view, locate and open the identifier that you just created.\n\n6.  On the Identifier form, select the **Identifier Entries** tab and then click **New**.\n\n7.  Fill out the Identifier Entry form.\n\n<table id=\"table_vhc_lh2_hfb\"><thead><tr><th>\n\nField\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nIdentifier\n\n</td><td>\n\nPreset with the name of the table of the associated identifier.\n\n</td></tr><tr><td>\n\nSearch on table\n\n</td><td>\n\nPreset with the label of the table of the associated identifier.\n\n To create:\n\n-   A regular identifier entry: Set to the identifier table and select **Criterion attributes** from that same table.\n-   A lookup identifier entry: Set to another table \\(lookup table\\) and select **Criterion attributes** from that lookup table.\n-   A Hybrid identifier entry: Set to another table \\(lookup table\\) and then do the following steps.\n    -   Select **Criterion attributes** from the lookup table.\n    -   Add **Hybrid Entry CI Criterion Attributes** from the current table using background scripts, after saving the rule. For more details, see the 'What to do next' section at the end of this task.\n A lookup table should have a reference to the associated identifier table.\n\n</td></tr><tr><td>\n\nCriterion attributes\n\n</td><td>\n\nSet of attributes that uniquely identify the record. Attributes can belong to the current class, or to a parent class.**Note:** It's possible to add reference fields as a criterion attribute. However, such fields might not always be effective:\n\n-   Reference fields store **sys\\_id**s that point to a record in another table, and thus is considered a weak criterion attribute \\(in terms of uniqueness\\) for the current table.\n-   The system detects and then replaces invalid values in a reference field with 'Unknown'. For example, an invalid **Model ID** value is replaced with the value 'Unknown'. Also, if several CIs end up having that same reference field set to 'Unknown', then these CIs become duplicate CIs.\n\n\n</td></tr><tr><td>\n\nPriority\n\n</td><td>\n\nPriority of applying the identifier entry. Rules with lower priority numbers are given higher priority. Identifier entries of identical priorities are applied randomly.You can keep gaps between the priority numbers, so you can assign the unused priority numbers to new entries without modifying the existing priority order.\n\n</td></tr><tr><td>\n\nActive\n\n</td><td>\n\nSpecifies whether the identifier entry is active. At least one identifier entry in an identification rule must be active for the rule to apply.\n\n</td></tr><tr><td>\n\nEnforce exact count match\n\n</td><td>\n\nFor lookup identification, match a record only on exact lookup records count match.When enforced, all lookup items for a record in the payload must have matching records in the lookup table that reference the same record:\n\n1.  Only matches records that have all the lookup items from the input payload referencing the record in the table.\n2.  If there are multiple matches, selects the oldest created record as the final match.\n When not enforced, one lookup item for a record in the payload matching a record in the lookup table, is sufficient to consider a match:\n\n1.  Matches any record that has at least one of the lookup items from the input payload referencing the record in the table.\n2.  If there are multiple matches, selects the records with the max number of lookup items from the input payload referencing the record in the table.\n3.  If there are still multiple matches, selects the oldest created record as the final match.\n\n\n</td></tr><tr><td>\n\nAllow null attribute\n\n</td><td>\n\nWhen selected, then if at least one criterion attribute isn't null, attempt matching with an identifier entry even if there are criterion attributes that are null.\n\n Otherwise, all criterion attributes must have values to attempt matching with an identifier entry.\n\n</td></tr><tr><td>\n\nAllow fallback to parent's rules\n\n</td><td>\n\nAllows the identification rules of the record's parent table to be used if a match isn't found for this identification rule. Applies only for dependent identification rules.\n\n</td></tr><tr><td>\n\nOptional condition\n\n</td><td>\n\nA filter to narrow the set of records that will be searched for a matching record.\n\n Available only if the **glide.identification\\_engine.enable\\_identifier\\_optional\\_condition** system property is set to **true** \\(**false** by default\\). In the base system, identifier entries of various classes are pre-configured with advanced options conditions. All these pre-configured conditions in regular identifier entries will automatically apply when you set this property to **true**. Therefore, to prevent unexpected behavior, review those predefined conditions in regular identifier entries before setting this property to **true**.\n\n For more details about this property, see [Properties for Identification and Reconciliation](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/servicenow-platform/configuration-management-database-cmdb/properties-id-reconciliation.md).\n\n</td></tr></tbody>\n</table>    **Note:** If criterion attributes have only two attributes and **sys\\_class\\_name** is one of them \\(for example \\[name, sys\\_class\\_name\\], \\[ip\\_address, sys\\_class\\_name\\]\\), then the other attribute can't be NULL, even if **Allow null attribute** is enabled. This restriction is due to**sys\\_class\\_name** being considered a special system matching attribute.\n\n8.  Click **Submit**.\n\n9.  On the Identifier form, select the **Related Entries** tab and then click **New**.\n\n10. Fill out the Related Entry form.\n\n<table id=\"related-entry-form\"><thead><tr><th>\n\nField\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nIdentifier\n\n</td><td>\n\nPreset with the identifier that this related entry is associated with.\n\n</td></tr><tr><td>\n\nActive\n\n</td><td>\n\nCheck box that specifies that the related entry is active.\n\n</td></tr><tr><td>\n\nRelated table\n\n</td><td>\n\nA related table \\(lookup table\\) that references the record that is being matched.\n\n</td></tr><tr><td>\n\nReferenced field\n\n</td><td>\n\nA referenced field in **Related table** with a reference to the associated identifier table.\n\n</td></tr><tr><td>\n\nCriterion attributes\n\n</td><td>\n\nThe set of attributes to uniquely identify the related item. Attributes can belong to the current class, or to a parent class.**Note:** It's possible to add reference fields as a criterion attribute. However, such fields might not always be effective:\n\n-   Reference fields store **sys\\_id**s that point to a record in another table, and thus is considered a weak criterion attribute \\(in terms of uniqueness\\) for the current table.\n-   The system detects and then replaces invalid values in a reference field with 'Unknown'. For example, an invalid **Model ID** value is replaced with the value 'Unknown'. Also, if several CIs end up having that same reference field set to 'Unknown', then these CIs become duplicate CIs.\n Click the lock icon to view, add, or remove attributes from the identification rule.\n\n</td></tr><tr><td>\n\nAllow null attribute\n\n</td><td>\n\nIf at least one criterion attribute in the related table isn't null, allow to attempt matching with an identifier entry even if there are criterion attributes which are null.\n\n</td></tr><tr><td>\n\nPriority\n\n</td><td>\n\nPriority of the related entry for the specified **Related table**. Rules with lower priority numbers are given higher priority while matching a related item for a specific related table. Related entries for the specified related table with identical priorities are applied randomly.You can keep gaps between the priority numbers, so you can assign the unused priority numbers to new entries without modifying the existing priority order.\n\n</td></tr><tr><td>\n\nOptional condition\n\n</td><td>\n\nFilter conditions to narrow the set of records that will be searched for a matching related item.\n\n</td></tr></tbody>\n</table>11. Click **Submit**.\n\n\n## What to do next\n\nTo add criterion attributes to a **Hybrid Entry CI Criterion Attributes** field in a hybrid identifier entry, instead of using the Identifier Entry form, you must use background scripts. After saving the identification rule, navigate to **System Definitions** &gt; **Scripts - Background**, and then enter a script that adds the attributes and click **Run script**.\n\nSample script:\n\n```\nvar gr = new GlideRecord('cmdb_identifier_entry');\n// get the identifier entry you want to update\ngr.get('<identifier_entry_sys_id>');\n// set the attributes you want in the hybrid rule in a comma separated list\n// for example: 'name,serial_number'\ngr. hybrid_entry_ci_criterion_attributes='<column_name_1>,<column_name_2>,<etc.>';\ngr.update();\n```\n\nThis process requires the admin role.\n\n**Parent Topic:**[IRE support for non-CMDB tables](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/servicenow-platform/configuration-management-database-cmdb/ire-support-non-cmdb-tables.md)\n\n"}}