Using CMDB CI Relationships to create privacy data lineageThis knowledge article provides step-by-step instructions for leveraging existing CMDB CI Relationships for creating data lineage in Privacy. To leverage the existing CMDB CI Relationships for creating the privacy data lineage, the following steps can be followed: Create "Related to" and "Relationship type" options: Check if there is any need to have more "Related to" and "Relationship type" options. If so, then the same can be created by following this article: https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB1700461Entity Type and Entity Filter creation: Create a new entity typeCreate an entity filter to filter out the entities: Create an entity filter to filter required entities. For instance, you might filter to include only entities that handle personal data. You can create your own filters or use existing ones using CMDB Query Builder (<servicenow-instance>/$queryBuilder.do). Examples: Business Applications using Information objects : <servicenow-instance>/$queryBuilder.do?sysparm_saved_qb_query=9597c62b530768105468ddeeff7b1265Business Processes using information objects: <servicenow-instance>/$queryBuilder.do?sysparm_saved_qb_query=862f005c0771301054685d3f0ad3002d Create privacy asset nodes for all these entities if not already exists (one by one): call new sn_privacy.AssetUtil()._createNode({"asset_type":"entity","entity":<sysID of the entity>,"description": <description for the node>}); Run the scheduled job "Update privacy asset node information" to sync related information of the newly created asset nodesCreate hierarchy using the CMDB CI Relationship: For all the entities, do the following: For the CMDB record of this entity: Query the "cmdb_rel_ci" table to get records where parent = <current cmdb record>. For all those records call the new sn_privacy.AssetUtil().createNode({"creationSource":"node_map","assetDetails":[ "assetType": <CMDB record's table label>, "assetTable":<CMDB record table name>, "assetIds":[CMDB record sysID], // this is an array "currentNode": <sysID of the privacy asset node created for this entity>, "hierarchy": "downstream" "relationship_type": <One of the relation type choice> "]})Query the "cmdb_rel_ci" table to get records where child = <current cmdb record>. For all those records call the new sn_privacy.AssetUtil().createNode({"creationSource":"node_map","assetDetails":[ "assetType": <CMDB record's table label>, "assetTable":<CMDB record table name>, "assetIds":[CMDB record sysID], // this is an array "currentNode": <sysID of the privacy asset node created for this entity>, "hierarchy": "upstream" "relationship_type": <One of the relation type choice> "]}) Key Considerations: Replace placeholders like <sysID of the entity>, <CMDB record's table label>, <CMDB record table name>, <sysID of the privacy asset node>, and <One of the relation type choice> with the appropriate values from your ServiceNow instance.Ensure you have the necessary permissions to create entity types, filters, and execute scripts in ServiceNow.Test the process thoroughly in a development or test environment before implementing it in production. Remember: This knowledge article provides a general guideline. If you encounter any specific issues or require further assistance, consult your ServiceNow administrator or refer to the official ServiceNow documentation.