Actions15
Batch Upsert Records
AI-generatedSummary
Upsert multiple NetSuite records in batch by external ID, creating records if they do not exist or updating existing ones based on their external IDs.
Inputs
- Record Type (required) — The type of NetSuite records to upsert, e.g., Sales Order, Customer, or custom record types.
- Custom Record Script ID (required) — For 'Custom Record' type, the internal script ID of the Custom Record type (e.g., starting with 'customrecord.').
- External ID (Per Item) (required) — The external identifier for each input item, specified per item using expressions. Each record is matched by this external ID for upsert.
- Wait For Results — Whether to wait until all batch jobs complete and receive detailed per-item results. Defaults to false, which returns job IDs only.
- Batch Options — Options for handling the asynchronous batch jobs such as idempotency key, parallel processing, polling interval, and timeout.
- Options — Additional options including whether to return the full response and the max retry count on rate limits or server errors.
Output shape
A list of items corresponding either to each submitted batch job (with job ID and basic info) when not waiting for results, or to each input record with per-item upsert result details including success, record ID, location, or error information.
Input items are split into batches of up to 100. When 'Wait For Results' is enabled, output includes detailed results per input record after batch job completion. When disabled, output contains one item per batch job with job metadata and no per-record results.
Examples
Example 1: Batch upsert 150 sales orders by external ID, waiting for all results
Set Record Type to 'Sales Order', use an expression for 'External ID (Per Item)' to provide unique external IDs from input items, enable 'Wait For Results'. Provide records as input JSON objects.