CMDB Reconciliation Data Precedence Rules confusion

Thomas Wright-1
Mega Expert

Hi all,

I'm pretty confused as to why the Reconciliation Engine Data Precedence Rules aren't doing what I'm expecting.

I'm just trying a very simple scenario where I have 2 data sources for Windows Servers, one with a higher priority (lower number) than the other. I'm trying this on a fresh personal DEV instance on Orlando version.

I'm finding that the lower priority source is able to update all the fields the higher priority source is, and seems to completely ignore my precedence rules. 

Here are the rules I've set up on the Windows Server table. ServiceNow priority 100, Manual Entry priority 200:

find_real_file.png

I'm running a background script to insert a CI with the ServiceNow source:

var payload = {
    "items": [  
        {
            "className": "cmdb_ci_win_server",
            "lookup": [],
            "values": {
                "name": "Test CI name",
                "serial_number": "FX123456",
                "cpu_type": "test1"
            }
        }
    ],
    "relations": []
};

var input = new global.JSON().encode(payload);
var output = sn_cmdb.IdentificationEngine.createOrUpdateCI('ServiceNow', input);
gs.log(output);

This creates the CI, with the values I specified and the source is set to ServiceNow.

Then I run the script again with the cpu_type edited as the Manual Entry source

var payload = {
    "items": [  
        {
            "className": "cmdb_ci_win_server",
            "lookup": [],
            "values": {
                "name": "Test CI name",
                "serial_number": "FX123456",
                "cpu_type": "test123"
            }
        }
    ],
    "relations": []
};

var input = new global.JSON().encode(payload);
var output = sn_cmdb.IdentificationEngine.createOrUpdateCI('Manual Entry', input);
gs.log(output);

This updates the CI, and changes the cpu_type to "test123", even though "Manual Entry" has a lower priority precedence.

Is there something I'm missing here? This is causing issues with a more complex scenario I'm currently building out for a client with an external data source reconciling with ServiceNow discovered data.

I'm expecting the cpu_type to only be updated by Manual Entry if the field is empty and hasn't already been populated by ServiceNow.

1 ACCEPTED SOLUTION

valarmathi_kann
ServiceNow Employee
ServiceNow Employee

Hi Thomas,

 

'Data Precedence Rules' always works with 'Reconciliation Rules'. Without 'Reconciliation Rules', 'Data Precedence Rules' doesn't have any effect.

 

You have to create 'Reconciliation Rules' for the 'cmdb_ci_win_server' or any other child table in the hierarchy one for each datasource. 'Data Precedence Rules' applies for the Reconciliation rules defined based on the priority.

 

'Reconciliation Rules' define which datasource can modify which attributes in a table.

You can go through the below docs 

https://docs.servicenow.com/bundle/orlando-servicenow-platform/page/product/configuration-management...

View solution in original post

3 REPLIES 3

valarmathi_kann
ServiceNow Employee
ServiceNow Employee

Hi Thomas,

 

'Data Precedence Rules' always works with 'Reconciliation Rules'. Without 'Reconciliation Rules', 'Data Precedence Rules' doesn't have any effect.

 

You have to create 'Reconciliation Rules' for the 'cmdb_ci_win_server' or any other child table in the hierarchy one for each datasource. 'Data Precedence Rules' applies for the Reconciliation rules defined based on the priority.

 

'Reconciliation Rules' define which datasource can modify which attributes in a table.

You can go through the below docs 

https://docs.servicenow.com/bundle/orlando-servicenow-platform/page/product/configuration-management...

Thanks Valarmathi!

That was my problem. After I added Reconciliation rules for both ServiceNow and Manual Entry the Data Precedence rules started working as expected.

I have an additional question. Is there any performance impact with adding reconciliation rules at the top level cmdb_ci? E.g. will it create too many cmdb_datasource_last_update records?