Page.detectedDocumentTypes

Note:

The content in this help topic pertains to SuiteScript 2.1.

Property Description

A set of confidence levels indicating whether the page represents a particular type of document.

This property is a set of objects, and each object has a documentType value and confidence value. The documentType value is a type of supported document (such as "INVOICE"), and the confidence value is a number between 0 and 1 indicating how confident the service is about whether the page is a document of that type. For example, a documentType value of "INVOICE" and a confidence value of 0.95 means that the service is 95% confident that the page represents an invoice.

This property has a value only when the documentCapture.Feature.DOCUMENT_CLASSIFICATION feature is specified when you call documentCapture.documentToStructure(options).

Type

Object[]

Supported Script Types

Server scripts

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

Module

N/documentCapture Module

Parent Object

documentCapture.Page

Sibling Object Members

Page Object Members

Since

2025.2

Errors

Error Code

Thrown If

READ_ONLY

You try to set the value of this property.

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"),
    features: [
        documentCapture.Feature.FIELD_EXTRACTION,
        documentCapture.Feature.DOCUMENT_CLASSIFICATION
    ]
});

const pageDetectedDocumentTypes = extractedData.pages[0].detectedDocumentTypes;

...
// Add additional code 

          

General Notices