documentCapture.Feature

Note:

The content in this help topic pertains to SuiteScript 2.1.

Enum Description

Holds values for the feature to extract from a document.

Use this enum to specify the document features you want to extract when you call documentCapture.documentToStructure(options) (using the options.features parameter). If you don't specify any features when you call this method, the TEXT_EXTRACTION and TABLE_EXTRACTION features are used by default.

Module

N/documentCapture Module

Supported Script Types

Server scripts

For more information, see SuiteScript 2.x Script Types.

Since

2025.2

Values

Value

DOCUMENT_CLASSIFICATION

FIELD_EXTRACTION

TABLE_EXTRACTION

TEXT_EXTRACTION

Syntax

Important:

The following code sample shows the syntax for this member. It is not a functional example. For a complete script example, see N/documentCapture Module Script Samples.

            // Add additional code
...

const extractedData = documentCapture.documentToStructure({
    file: file.load("SuiteScripts/sample_invoice.pdf"),
    documentType: documentCapture.DocumentType.INVOICE,
    features: [
        documentCapture.Feature.TEXT_EXTRACTION,
        documentCapture.Feature.FIELD_EXTRACTION
    ]
});

...
// Add additional code 

          

General Notices