Table.confidence

Note:

The content in this help topic pertains to SuiteScript 2.1.

Property Description

The confidence level for the table.

This property is a number between 0 and 1 indicating how confident the service is in the accuracy of the extracted rows (Table.headerRows, Table.bodyRows, and Table.footerRows) of the table. For example, a confidence value of 0.95 means that the service is 95% confident about the extracted rows.

You can use the confidence level to set a threshold for accepting the extracted rows in your scripts. For example, to minimize the risk of errors, you could choose to accept only rows with a confidence level above 0.9 (or 90%).

Type

number

Supported Script Types

Server scripts

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

Module

N/documentCapture Module

Parent Object

documentCapture.Table

Sibling Object Members

Table 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"),
    documentType: documentCapture.DocumentType.INVOICE,
    features: [documentCapture.Feature.TABLE_EXTRACTION]
});

const tableToProcess = extractedData.pages[0].tables[0];

if (tableToProcess.confidence > 0.9) {
    // Accept the table
} else {
    // Reject the table
}

...
// Add additional code 

          

General Notices