N/documentCapture Module Members Overview and Usage

The N/documentCapture module provides various member types for document data extraction, including tables, fields, and lines.

·3 min read·View Oracle Docs

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 NameTypeDescriptionSupported Script Types
documentCapture.CellObjectRepresents an extracted table cell from a document.Server scripts
documentCapture.DocumentObjectContains the extracted data from a document.Server scripts
documentCapture.FieldObjectRepresents an extracted field from a document.Server scripts
documentCapture.FieldLabelObjectRepresents an extracted field label from a document.Server scripts
documentCapture.FieldValueObjectRepresents an extracted field value from a document.Server scripts
documentCapture.LineObjectRepresents an extracted line of text from a document.Server scripts
documentCapture.PageObjectRepresents an extracted page from a document.Server scripts
documentCapture.TableObjectRepresents an extracted table from a document.Server scripts
documentCapture.TableRowObjectRepresents an extracted table row from a document.Server scripts
documentCapture.WordObjectRepresents an extracted word from a document.Server scripts

Methods

The module also provides essential methods for extracting document data:

Method NameReturn TypeDescription
documentCapture.documentToStructure(options)documentCapture.DocumentExtracts content from a document.
documentCapture.documentToStructure.promise(options)PromiseAsynchronously extracts content from a document.
documentCapture.documentToText(options)stringExtracts text content from a PDF file.
documentCapture.documentToText.promise(options)PromiseAsynchronously extracts text content from a PDF file.
documentCapture.getRemainingConcurrency()numberReturns the number of available concurrent requests remaining.
documentCapture.getRemainingConcurrency.promise()PromiseAsynchronously returns the number of available concurrent requests remaining.
documentCapture.getRemainingFreeUsage()numberReturns the number of free document capture requests remaining for the current month.
documentCapture.getRemainingFreeUsage.promise()PromiseAsynchronously returns the number of free document capture requests remaining for the current month.
documentCapture.parseResult(options)documentCapture.DocumentConverts a JSON file into a documentCapture.Document object.

Enum Types

Additionally, the module contains several enumerators for the document types and features:

Enum NameTypeDescriptionSupported Script Types
documentCapture.DocumentTypeenumHolds values for the document type.Server scripts
documentCapture.FeatureenumHolds values for the feature to extract.Server scripts
documentCapture.FieldTypeenumHolds values for the type of a field.Server scripts
documentCapture.LanguageenumHolds 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.

Source: This article is based on Oracle's official NetSuite documentation.

Frequently Asked Questions (4)

What script types support the N/documentCapture module?
The N/documentCapture module is supported in server scripts.
Can document data be extracted asynchronously with the N/documentCapture module?
Yes, the module offers asynchronous methods such as 'documentCapture.documentToStructure.promise' and 'documentCapture.documentToText.promise' for extracting document data.
What types of documents can the N/documentCapture module process?
The module can extract information from various document types, including invoices and receipts.
Are there any concurrency limits when using the N/documentCapture module?
Yes, you can use 'documentCapture.getRemainingConcurrency()' to check the number of available concurrent requests remaining, and there's also a promise-based version for asynchronous usage.
Source: N/documentCapture Module Members Oracle NetSuite Help Center. This article was generated from official Oracle documentation and enriched with additional context and best practices.

Was this article helpful?

More in General

View all General articles →