NetSuite REST icon

NetSuite REST

Call NetSuite SuiteTalk REST operations.

Actions979

Department → Insert record

AI-generated

Summary

Create a new Department record in NetSuite with specified details and custom fields.

Inputs

  • Name (required) — Enter a name for the department. This name will appear in lists on records and transactions and can be up to 60 alphanumeric characters.
  • Class Translation — Configure translations for the department name in various languages and locales.
  • Department is Inactive — Set to true to inactivate the department, preventing it from appearing in lists.
  • External ID — Provide an external ID to uniquely identify this department from an external system.
  • Full Name — Enter the full name of the department.
  • Include Children — Set to true to associate the department with all sub-subsidiaries linked to the selected subsidiary.
  • Parent — Link this department to an existing parent department using its internal or external identifier.
  • Prefer — Specify 'respond-async' to execute the request asynchronously. A 'Preference-applied: respond-async' header will be returned if applied.
  • Reference Name — Enter a reference name for the department.
  • Subsidiary — Associate this department with a specific subsidiary using its internal or external identifier.
  • X - Net Suite - Idempotency - Key — Provide a unique UUID key for asynchronous requests to ensure the operation is executed only once.
  • X - Net Suite - Property Name Validation — Set the strictness for property name validation (Error, Warning, or Ignore).
  • X - Net Suite - Property Value Validation — Set the strictness for property value validation (Error, Warning, or Ignore).
  • Custom Fields — Add one or more custom fields to the department record, specifying the field name, type, and value.
  • Debug Mode — Set to true to include full request and response information in the output.

Output shape

A single record representing the newly created Department.

The output will include the NetSuite internal ID and other properties of the new department. If 'Debug Mode' is enabled, the output will also contain the raw request and response data.

Examples

Example 1: Create a new active department.

Set 'Name' to 'Sales Department'.

Example 2: Create an inactive department linked to a specific subsidiary.

Set 'Name' to 'R&D (Archived)', 'Department is Inactive' to true, and specify the 'Subsidiary' by its internal ID.

Example 3: Create a department with a custom field and an external ID.

Set 'Name' to 'Marketing APAC', 'External ID' to 'MARKETING_APAC_001', and add a custom field 'Region' with value 'APAC'.

Discussion