N/documentCapture Module
The content in this help topic pertains to SuiteScript 2.1.
Load the N/documentCapture module to extract text content from supported documents.
The N/documentCapture module lets you programmatically extract structured content and key information from a variety of document types (such as invoices, receipts, contracts, and so on) directly within NetSuite. This module uses the AI-driven capabilities of the Oracle Cloud Infrastructure (OCI) Document Understanding service and can automate document processing, reduce manual data entry, and enhance business workflows. For more information about the OCI Document Understanding service, refer to Document Understanding in the Oracle Cloud Infrastructure Documentation.
This module provides the following features and benefits:
-
Automated content extraction – Extracts text, tables, and key-value pairs from scanned documents, PDFs, and images.
-
AI-powered data recognition – Uses advanced machine learning models from OCI to accurately identify and extract relevant information.
-
Support for multiple document types – Works with invoices, receipts, tax forms, and other business documents in PDF, PNG, JPG, and TIFF formats.
-
Synchronous and asynchronous requests – Supports synchronous requests (for documents up to five pages in length) and asynchronous requests (for documents longer than five pages).
-
Document classification – Automatically classifies documents by type, enabling use cases such as intelligent routing and processing.
-
Usage tracking – Tracks usage on the AI Preferences page in the NetSuite UI.
-
Support for multiple languages and layouts – Supports documents in multiple languages and using various layouts, increasing flexibility.
-
Error handling and confidence scores – Provides confidence scores for extracted data and error handling for improved reliability.
To learn how to get started with the N/documentCapture module, see Getting Started with the N/documentCapture Module.
In This Help Topic
N/documentCapture Module Members
|
Member Type |
Name |
Return Type / Value Type |
Supported Script Types |
Description |
|---|---|---|---|---|
|
Object |
Object |
Server scripts |
An extracted table cell from a document. |
|
|
Object |
Server scripts |
The extracted data from a document. |
||
|
Object |
Server scripts |
An extracted field from a document. |
||
|
Object |
Server scripts |
An extracted field label from a document. |
||
|
Object |
Server scripts |
An extracted field value from a document. |
||
|
Object |
Server scripts |
An extracted line of text from a document. |
||
|
Object |
Server scripts |
An extracted page from a document. |
||
|
Object |
Server scripts |
An extracted table from a document. |
||
|
Object |
Server scripts |
An extracted table row from a document. |
||
|
Object |
Server scripts |
An extracted word from a document. |
||
|
Method |
Server scripts |
Extracts content from a document. |
||
|
Promise |
Server scripts |
Asynchronously extracts content from a document. |
||
|
string |
Server scripts |
Extracts text content from a PDF file. |
||
|
Promise |
Server scripts |
Asynchronously extracts text content from a PDF file. |
||
|
number |
Server scripts |
Returns the number of available concurrent requests remaining. |
||
|
Promise |
Server scripts |
Asynchronously returns the number of available concurrent requests remaining. |
||
|
number |
Server scripts |
Returns the number of free document capture requests remaining for the current month. |
||
|
Promise |
Server scripts |
Asynchronously returns the number of free document capture requests remaining for the current month. |
||
|
Server scripts |
Converts a JSON file into a documentCapture.Document object. |
|||
|
Enum |
enum |
Server scripts |
Holds values for the document type. |
|
|
enum |
Server scripts |
Holds values for the feature to extract. |
||
|
enum |
Server scripts |
Holds values for the type of a field. |
||
|
enum |
Server scripts |
Holds values for the language of a document. |
Cell Object Members
|
Member Type |
Name |
Return Type / Value Type |
Supported Script Types |
Description |
|---|---|---|---|---|
|
Property |
number |
Server scripts |
The confidence level for the cell. |
|
|
string |
Server scripts |
The extracted text of the cell. |
Document Object Members
|
Member Type |
Name |
Return Type / Value Type |
Supported Script Types |
Description |
|---|---|---|---|---|
|
Property |
string |
Server scripts |
The MIME type of the document. |
|
|
Server scripts |
The pages of the document. |
|||
|
Method |
string |
Server scripts |
Returns the entire text of the document. |
Field Object Members
|
Member Type |
Name |
Return Type / Value Type |
Supported Script Types |
Description |
|---|---|---|---|---|
|
Property |
Server scripts |
The label (name) of the field. |
||
|
string |
Server scripts |
The type of the field. |
||
|
Server scripts |
The value of the field. |
FieldLabel Object Members
|
Member Type |
Name |
Return Type / Value Type |
Supported Script Types |
Description |
|---|---|---|---|---|
|
Property |
number |
Server scripts |
The confidence level for the field label. |
|
|
string |
Server scripts |
The name of the field label. |
FieldValue Object Members
|
Member Type |
Name |
Return Type / Value Type |
Supported Script Types |
Description |
|---|---|---|---|---|
|
Property |
number |
Server scripts |
The confidence level for the field value. |
|
|
string |
Server scripts |
The text of the field value. |
Line Object Members
|
Member Type |
Name |
Return Type / Value Type |
Supported Script Types |
Description |
|---|---|---|---|---|
|
Property |
number |
Server scripts |
The confidence level for the line. |
|
|
string |
Server scripts |
The text of the line. |
Page Object Members
|
Member Type |
Name |
Return Type / Value Type |
Supported Script Types |
Description |
|---|---|---|---|---|
|
Property |
Object[] |
Server scripts |
A set of confidence levels indicating whether the page represents a particular type of document. |
|
|
Server scripts |
The extracted fields from the page of a document. |
|||
|
Server scripts |
The extracted lines from the page of a document. |
|||
|
Server scripts |
The extracted tables from the page of a document. |
|||
|
Server scripts |
The extracted words from the page of a document. |
|||
|
Method |
string |
Server scripts |
Returns the entire text of the page. |
Table Object Members
|
Member Type |
Name |
Return Type / Value Type |
Supported Script Types |
Description |
|---|---|---|---|---|
|
Property |
Server scripts |
The extracted body rows from the table in a document. |
||
|
number |
Server scripts |
The number of extracted columns from the table in a document. |
||
|
number |
Server scripts |
The confidence level for the table. |
||
|
Server scripts |
The extracted footer rows from the table in a document. |
|||
|
Server scripts |
The extracted header rows from the table in a document. |
|||
|
number |
Server scripts |
The number of extracted rows from the table in a document. |
TableRow Object Members
|
Member Type |
Name |
Return Type / Value Type |
Supported Script Types |
Description |
|---|---|---|---|---|
|
Property |
Server scripts |
The extracted cells in the table row. |
Word Object Members
|
Member Type |
Name |
Return Type / Value Type |
Supported Script Types |
Description |
|---|---|---|---|---|
|
Property |
number |
Server scripts |
The confidence level for the word. |
|
|
string |
Server scripts |
The extracted text of the word. |