Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is raised to provide solution for one of the issue raised in action pack repo
Here is the link of issue: #101
ServiceNow Flow Designer Action: Bulk Upsert Records
Description
This Flow Designer Action performs bulk upsert operations (insert or update) on a specified ServiceNow table using a JSON string input representing an array of record objects. It simplifies data synchronization by allowing developers to process multiple records without writing loops or script steps manually.
Purpose
Inputs
NameTypeDescriptiontarget_tableStringName of the target table to upsert records intorecord_arrayStringJSON string representing an array of record objects|
match_keys| String | Comma-separated list of fields used to match existing records|Outputs
NameTypeDescriptioninsert_countNumberNumber of records successfully inserted|
update_count| Number | Number of records successfully updated ||
error_log| Array | List of error messages for records that failed to process |Inputs:
{
"target_table": "incident",
"match_keys": "caller_id,short_description",
"record_array": "[{"caller_id":"6816f79cc0a8016401c5a33be04be441","short_description":"Email issue","priority":"2"},{"caller_id":"6816f79cc0a8016401c5a33be04be441","short_description":"VPN not working","priority":"1"}]"
}
Outputs:
{
"insert_count": 1,
"update_count": 1,
"error_log": []
}