reconcile_migration
Compare source records to ServiceNow target records to verify migration integrity using count checks, correlation matching, and field-level diffs with transform-aware verdicts.
Instructions
Deep comparison between source records and ServiceNow target records to verify the migration was successful. Goes far beyond fill-rate checks:
COUNT CHECK — source count vs SN count (detects missing or duplicate records)
RECORD MATCHING — correlates each source record to its SN counterpart using a correlation field (e.g. u_jira_key, u_sf_id)
FIELD-LEVEL DIFF — for every matched pair, compares each mapped field value Expected vs Actual, with transform-awareness (so a Jira "In Progress" → SN state "2" is not flagged as a mismatch)
VERDICT — PASS / PARTIAL / FAIL with specific reasons
Returns: verdict, per-record diffs, per-field accuracy %, missing/extra records. Use after a test migration or a full migration to confirm data integrity.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| source_records | Yes | Array of source records (Jira issues, SF records, etc.) to compare against SN | |
| sn_table | Yes | Target ServiceNow table (e.g. incident, u_my_custom_table) | |
| field_mappings | Yes | { sourceField: snField } — the same mapping used during migration | |
| correlation_field | Yes | Field in the SN table that stores the source record ID (e.g. u_jira_key, u_sf_id, correlation_display) | |
| source_id_field | Yes | Field in source records that holds the unique ID (e.g. "key" for Jira, "Id" for Salesforce) | |
| transform_rules | No | Transform mappings to apply when comparing — prevents false mismatches for status/priority fields | |
| date_fields | No | SN field names that are dates — compared as YYYY-MM-DD only, ignoring time | |
| ignored_fields | No | SN field names to skip in value comparison (e.g. sys_created_on, sys_updated_by) | |
| limit | No | Max source records to compare (default 200) | |
| full_scan | No | Also check for records in SN that are not in the source sample (detects extras/duplicates) |