Entity class rules
Summarize
Summary of Entity class rules
Entity class rules in ServiceNow enable automatic classification of entities at the table level. When an entity is created for a table, the associated entity class is assigned automatically based on the defined rules. These rules help categorize entities to streamline management and organization across your Configuration Management Database (CMDB) or other tables.
Show less
Key Features
- Automatic Class Assignment: When a new entity is created on a table, it inherits the entity class associated with that table.
- Entity Class Rule Filters: Filters can be applied within an entity class rule to assign different classes to records of the same table based on specific conditions. This allows multiple subclasses to coexist under a parent entity class.
- Filter Priority: Determines the order in which subclass filters are evaluated, ensuring the correct subclass is assigned based on priority and conditions.
- Details Tab: Displays key information including the table name, entity class, and any filters applied for the entity class rule.
- Workspace Integration: Entity class rules are accessible under the Lists section in the workspace view for easy management and review.
Logic for Assigning Entity Classes
Entity class rules operate by evaluating the source record against filters:
- If the record matches a filter condition, the corresponding subclass entity class is assigned.
- If multiple filters match, the subclass with the higher priority is assigned.
- If no filters match, the parent entity class is assigned by default.
This ensures entities are classified accurately based on their attributes and conditions defined in the filters.
Practical Usage
- Creating Entity Class Rules: Define new rules to associate entity classes with tables, enhancing the categorization of your entities.
- Creating Entity Class Rule Filters: Add filters to refine class assignments within a table, allowing different subclasses to be assigned based on record attributes.
- Use these features to manage complex data models where entities require granular classification beyond a single static class.
By leveraging entity class rules and filters, ServiceNow customers can automate entity classification, maintain clearer data organization, and improve the accuracy of their CMDB or other data tables.
Entity class rules help to assign classes to the entities at the table level. Any new entity created on the table gets that entity class automatically. Entity classes are used to tag your entities.
When you create an entity for a table, the class associated with that table automatically gets assigned to the entity. You can set a new rule for the entity class. Entity class rules provide the categories of the entities at the class level. The Entity class rules option is displayed under Lists in the workspace view. Select an Entity class rule to display its details.
| Field | Description |
|---|---|
| Table | Name of the table that the entity class is associated with after creating an entity class rule. |
| Class | Name of the entity class to be associated with the table that uses the new entity class rule. |
Entity class rule filter
Entity class rule filter is added in the entity class rule page to provide additional filters. Earlier, records of a table can be associated to only one entity class. Using the entity class rule filter, you can associate different classes to the records of the same table.
| Field | Description |
|---|---|
| Filter Priority |
Filter priority is the range for the subclass. The class is populated in the entity form based on the priority given. |
| Subclass |
Subclass is the child class of the parent class that is displayed in the details tab of entity class rules. |
| Filter Condition |
Filter Condition is used to filter out the records of the table that defines the entity class rule. For example, if there are two subclasses with different condition then the parent class is populated instead of the subclasses.
Note: The subclasses are displayed in the entity forms only if they meet the same
filter condition. |
Logic for assigning entity classes
Assume that there is a record in the cmdb_ci_linux_server table and an entity class rule associated to this table. The entity class rule has these class rule filters:
Scenario 1: If the entity's source record belongs to the cmdb_ci_linux_server table and matches all the conditions of the second filter, then the entity's class is auto-populated as sub class, Department.
Scenario 2: If the entity's source record belongs to the cmdb_ci_linux_server table and its name starts with lnux (satisfies both the filters), then the sub class Application is auto-populated as an entity class.
Scenario 3: If the entity's source record doesn't satisfy any of the class rule filters, then the class Linux Server is auto-populated as an entity class.