Import a CSV file into NetSuite using a SuiteScript 2.x scheduled script and the N/task module
domain: netsuite · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗
In-depth guide
NetSuite SuiteTalk REST authentication — the full failure-mode walkthrough related to netsuite, checked against official docs, with linked verified routes.
Steps
Upload the CSV file to the NetSuite File Cabinet programmatically or manually; note the file internal ID
Define a CSV import map in NetSuite (Setup > Import/Export > Saved CSV Imports) that maps CSV columns to record fields; save the import map and note its script ID
In SuiteScript 2.x, require the N/task module; create a task using task.create({ taskType: task.TaskType.CSV_IMPORT }) and set the importType, mappingId, linkedFiles, and queueId properties
Submit the task with task.submit() which returns a task ID; use task.checkStatus({ taskId: <id> }) in a follow-up script execution to poll for COMPLETE or FAILED status
Retrieve import result details from the task status response; on failure, access the error log file linked in the status to identify row-level errors
Known gotchas
The CSV import task runs asynchronously; submitting the task and immediately checking status often returns PENDING — build a polling loop with adequate delay rather than assuming the import is done
CSV import maps are version-sensitive to the record type schema; after a NetSuite release that changes field IDs, existing maps may silently drop unmapped fields rather than erroring
The N/task CSV import does not support all record types that the UI import wizard supports; verify that your target record type is available in the task.ImportType enum before building the integration
Give your agent this knowledge — and 15,500+ more routes
One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp
Need this verified for your stack — or a route we don't have yet?