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
- Common SuiteScript Errors and Solutions for NetSuite
Common NetSuite script errors include INVALID_SCRIPT_DEPLOYMENT_ID and SSS_AUTHORIZATION_HEADER_NOT_ALLOWED. Learn effective solutions.
- SuiteScript 2.x Sublist Values: Standard and Dynamic Mode
Use setSublistValue in standard mode; select a line, set its current value and commit it in dynamic mode. Choose the API from the record's mode.
- SuiteScript Record.setValue: Body Fields, Types and Errors
Set NetSuite body fields with Record.setValue, matching field IDs and value types and checking common API errors.
- SuiteScript 2.1 Enhancements and API Updates in NetSuite
SuiteScript 2.1 enables execution of 2.0 scripts and supports PATCH method for enhanced API capabilities.
