Skip to content

Conversation

@shivamvish160
Copy link
Contributor

@shivamvish160 shivamvish160 commented Oct 8, 2025

This PR is raised to provide solution of the issue raised in action pack repo
here is the issue link: #102

ServiceNow Action: Identify and Merge Duplicates

This ServiceNow Action identifies duplicate records in a specified table based on user-defined match fields and merges them using a simple conflict resolution strategy. It returns a list of merged record pairs for audit and review.


📥 Inputs

Name Type Description
table_name String Name of the ServiceNow table to scan for duplicates
match_fields String Comma-separated list of field names used to detect duplicates

📤 Outputs

Name Type Description
merged_pairs Array List of objects with original and merged record sys_ids
error String Error message if the action fails (optional)

Example

Inputs:

{
"table_name": "incident",
"match_fields": "caller_id,short_description"
}

Outputs:
{
"merged_pairs": [
{ "original": "abc123", "merged": "def456" },
{ "original": "ghi789", "merged": "jkl012" }
]
}

@github-actions
Copy link

github-actions bot commented Oct 8, 2025

Valid PR for ActionPack

Thank you for your contribution. This PR complies with the CONTRIBUTING.md.
A maintainer will review this shortly. In the meantime, Happy Hacking!

@Atul-LNG Atul-LNG self-assigned this Oct 8, 2025
@rohi-v rohi-v assigned rohi-v and unassigned Atul-LNG Oct 8, 2025
Copy link
Contributor

@rohi-v rohi-v left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @shivamvish160

Please mention the expected output too in the description.

@shivamvish160
Copy link
Contributor Author

Hi @shivamvish160

Please mention the expected output too in the description.

Thanks for pointing that out @rohi-v
I have added in the PR description

@rohi-v
Copy link
Contributor

rohi-v commented Oct 8, 2025

Instead of deleting the record, We can create some field and flag it out as mentioned in the #102

Also I see different output than mentioned here.
image

Closing this for now. Once you make additional changes, feel free to re-open this Pull Request or create a new one.

@rohi-v rohi-v closed this Oct 8, 2025
@shivamvish160
Copy link
Contributor Author

Instead of deleting the record, We can create some field and flag it out as mentioned in the #102

Also I see different output than mentioned here. image

Closing this for now. Once you make additional changes, feel free to re-open this Pull Request or create a new one.

Can you please provide input which you gave?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants