Discoverable Procedures
Discoverable procedures in the NetSuite (BDK) Book.
Ensure that you have connected the NetSuite book and then created a new playground before using these automation procedures.
Overview
In NetSuite, an entity is any object or record type that stores business data, such as a customer, employee, sales order, or custom record. Entities define how information is structured, including the fields, relationships, and operations available for that data.
Discovery scans your connected NetSuite account to identify these entities, their fields, and the actions they support. Each discovery generates these five automation procedures for a given entity:
Create: Add new records to NetSuite.
Retrieve: Fetch preview lists of records.
Retrieve Record Details: Get full record details including nested data.
Update Record: Modify existing records with new data.
Upload File Attachment: Upload files to NetSuite and link them to records.
Discovery
Use the following syntax to discover entities from your NetSuite instance and generate automation procedures. Replace ENTITY with the entity type to be discovered:
discover "ENTITY" from netsuiteNetSuite Entities
To view all discoverable entities, use:
retrieve discoverables from netsuiteCommon NetSuite entities include:
People:
customer,employee,vendor,partner,contactItems:
item,inventoryItem,serviceItem,kitItemTransactions:
salesOrder,invoice,purchaseOrderSupport:
supportCase,task,phoneCallCustom Records: Your custom record types (e.g.,
customrecord_myrecord)
Check out NetSuite's REST API documentation for additional details.
Examples
Procedures
After discovery, you can use the five generated procedures for that entity:
1. Create Record
Create a new record of the discovered entity type.
Parameters
the body is [DATA]
The data for the new record
Yes
Example
Returns: The newly created record with preview fields populated (includes ID and basic information).
Important Notes
Only required and create-able fields need to be provided
NetSuite will generate system fields like ID, creation date, etc.
The returned record is a "preview" version with essential fields
2. Retrieve Records
Get a list of records from the discovered entity type using SuiteQL queries.
Parameters
the limit is [NUMBER]
Maximum number of records to retrieve (default: 10)
Optional
the offset is [NUMBER]
Number of records to skip for pagination (must be a multiple of the limit)
Optional
whose [FIELD] is [VALUE]
Filter records by specific criteria.
Note: Filter expressions are case-sensitive (e.g., "KOGNITOS" ≠ "Kognitos"). Use the "has" operator for partial matching, "is" for exact matching.
Optional
Examples
Returns: A list of preview records matching the criteria.
Important Notes:
Uses SuiteQL for efficient querying
Returns "preview" records (lighter weight with essential fields)
Offset must be a multiple of the limit
For full record details, use the "retrieve details" procedure
3. Retrieve Record Details
Get the complete, detailed information for a specific record. Use this procedure when you need all the record information and not just the preview fields.
Parameters
the record is [RECORD]
The preview record to get full details for
Yes
Example
Returns: The complete record with all fields and nested data.
4. Update Record
Update an existing record with new data.
Parameters
the record is [RECORD]
The record with updated data (must include ID)
Yes
Example
Returns: The updated record with current values.
Important Notes:
Only sends fields that have changed (differential update)
Automatically fetches remote record to compute differences
More efficient than sending entire record
5. Upload File Attachment
Upload a file to NetSuite's File Cabinet and attach it to a record. For this procedure, you need to select the folder in which the attachments will be saved.
Parameters
the record is [RECORD]
The record to attach the file to
Yes
the file is [FILE]
The file to upload
Yes
the file name is "[NAME]"
Name for the uploaded file
Yes
the folder id is "[FOLDER_ID]"
Specific File Cabinet folder to upload to
Optional
Examples
Returns: The file ID of the uploaded attachment.
Important Notes:
Requires a File Cabinet folder ID (either in call or configured globally)
In order to configure a folder ID, you can do:
Uses SOAP API for file operations
If attachment fails, the uploaded file is automatically deleted (cleanup)
File is first uploaded to File Cabinet, then linked to the record
Complete Workflow Examples
1. Retrieving Message Attachments
This example shows how to retrieve messages and download their attachments:
2. Comprehensive Record Management
This example demonstrates schema retrieval, filtering, creating, and updating records:
Understanding Record Types
NetSuite has three record views for discovered entities:
Preview Records
Retrieve Records, Create Record
Essential fields like ID, name, basic information
Lightweight for listing and selection
Fast — efficient for bulk operations
Detail Records
Retrieve Record Details
All fields including nested data and relationships
Complete record information
Slower — use when you need everything
Create Records
Create Record
Only create-able fields
Defines what you can set when creating
Excludes system-generated and read-only fields
Typical Workflow
Use retrieve to get preview records (fast)
User selects a specific record
Use retrieve details to get complete information (when needed)
Last updated
Was this helpful?
