NetSuite REST icon

NetSuite REST

Call NetSuite SuiteTalk REST operations.

Actions979

Employee → Insert or update record

AI-generated

Summary

Create or modify an employee record by sending a PUT request to NetSuite’s /employee endpoint with a unique external ID.

Inputs

  • isDebugMode — Include raw request and response objects in the output when true.
  • id (required) — External identifier for the employee to update or create.
  • additionalFields — Collection of standard employee fields (e.g. entityId, firstName, lastName, email, department, location, etc.) that will be sent in the body of the request.
  • customFields — Fixed collection of custom field values to be added to the employee record. Each item must specify the field name, type, and value.

Output shape

A list of records returned by NetSuite for the updated employee(s). When debug mode is enabled, each record also contains the raw request and response objects.

If multiple updates are processed in a batch, the output contains a record for each. Sublist lines or references that are omitted from the request will retain their previous values unless the replace/replacerSelectedFields flags are used.

Examples

Example 1: Add a new employee with minimal required fields

Set isDebugMode to false, id to "EMP001", additionalFields -> entityId=‘EMP001’, firstName=‘John’, lastName=‘Doe’, email=‘john.doe@example.com’, giveAccess=true.

Example 2: Update an existing employee’s title and department

Set id to the existing external ID, isDebugMode false, additionalFields -> title=‘Senior Analyst’, department.id=‘5’.

Example 3: Update with custom field and request debug

Set id, isDebugMode true, additionalFields -> entityId, firstName, lastName, giveAccess false, customFields -> { fieldName: ‘customJobTitle’, fieldType: ‘string’, value: ‘Lead Engineer’ }.

Discussion