N/documentCapture Module Members Overview and Usage
The N/documentCapture module provides various member types for document data extraction, including tables, fields, and lines.
TL;DR Opening
The N/documentCapture module in NetSuite offers a set of member types and methods designed to facilitate the extraction of structured data from documents. Understanding these components is crucial for developers working with server scripts to automate and enhance document processing.
What is the N/documentCapture Module?
The N/documentCapture module is utilized in NetSuite to extract valuable information from various document types, including invoices and receipts. It comprises several member types, each representing different elements of extracted data.
Member Types
Here’s a comprehensive list of the member types available in the N/documentCapture module:
| Member Name | Type | Description | Supported Script Types |
|---|---|---|---|
documentCapture.Cell | Object | Represents an extracted table cell from a document. | Server scripts |
documentCapture.Document | Object | Contains the extracted data from a document. | Server scripts |
documentCapture.Field | Object | Represents an extracted field from a document. | Server scripts |
documentCapture.FieldLabel | Object | Represents an extracted field label from a document. | Server scripts |
documentCapture.FieldValue | Object | Represents an extracted field value from a document. | Server scripts |
documentCapture.Line | Object | Represents an extracted line of text from a document. | Server scripts |
documentCapture.Page | Object | Represents an extracted page from a document. | Server scripts |
documentCapture.Table | Object | Represents an extracted table from a document. | Server scripts |
documentCapture.TableRow | Object | Represents an extracted table row from a document. | Server scripts |
documentCapture.Word | Object | Represents an extracted word from a document. | Server scripts |
Methods
The module also provides essential methods for extracting document data:
| Method Name | Return Type | Description |
|---|---|---|
documentCapture.documentToStructure(options) | documentCapture.Document | Extracts content from a document. |
documentCapture.documentToStructure.promise(options) | Promise | Asynchronously extracts content from a document. |
documentCapture.documentToText(options) | string | Extracts text content from a PDF file. |
documentCapture.documentToText.promise(options) | Promise | Asynchronously extracts text content from a PDF file. |
documentCapture.getRemainingConcurrency() | number | Returns the number of available concurrent requests remaining. |
documentCapture.getRemainingConcurrency.promise() | Promise | Asynchronously returns the number of available concurrent requests remaining. |
documentCapture.getRemainingFreeUsage() | number | Returns the number of free document capture requests remaining for the current month. |
documentCapture.getRemainingFreeUsage.promise() | Promise | Asynchronously returns the number of free document capture requests remaining for the current month. |
documentCapture.parseResult(options) | documentCapture.Document | Converts a JSON file into a documentCapture.Document object. |
Enum Types
Additionally, the module contains several enumerators for the document types and features:
| Enum Name | Type | Description | Supported Script Types |
|---|---|---|---|
documentCapture.DocumentType | enum | Holds values for the document type. | Server scripts |
documentCapture.Feature | enum | Holds values for the feature to extract. | Server scripts |
documentCapture.FieldType | enum | Holds values for the type of a field. | Server scripts |
documentCapture.Language | enum | Holds values for the language of a document. | Server scripts |
Who This Affects
This documentation is particularly relevant for:
- Developers working with SuiteScript and document processing.
- Administrators managing document workflows.
Key Takeaways
- The N/documentCapture module provides tools to extract structured data, which is essential for document automation.
- Developers can utilize various member types to represent different components of documents.
- Methods are available for both synchronous and asynchronous data extraction, providing flexibility based on application needs.
Frequently Asked Questions (4)
What script types support the N/documentCapture module?
Can document data be extracted asynchronously with the N/documentCapture module?
What types of documents can the N/documentCapture module process?
Are there any concurrency limits when using the N/documentCapture module?
Was this article helpful?
More in SuiteScript
- SuiteScript 2.1 Enhancements in NetSuite February Updates
SuiteScript 2.1 now supports async features and PATCH method. Discover the latest API and SuiteProcurement improvements.
- Scheduling Map/Reduce Script Deployments in NetSuite
Learn to schedule map/reduce script submissions, including one-time and recurring options in NetSuite.
- Binary File Support in N/https Module for SuiteScript
SuiteScript enhances capabilities with binary file support in the N/https module, allowing improved data handling in external communications.
- API Governance Units Calculation in NetSuite 2026.1
NetSuite 2026.1 introduces examples illustrating API governance unit calculations for both user event and scheduled scripts.
