Cell.confidence

Note:

The content in this help topic pertains to SuiteScript 2.1.

Property Description

The confidence level for the cell.

This property is a number between 0 and 1 indicating how confident the service is in the accuracy of the extracted text (Cell.text) within the cell. For example, a confidence value of 0.95 means that the service is 95% confident about the extracted text.

You can use the confidence level to set a threshold for accepting the extracted text in your scripts. For example, to minimize the risk of errors, you could choose to accept only text 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.Cell

Sibling Object Members

Cell 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 cellToProcess = extractedData.pages[0].tables[0].bodyRows[0].cells[0];
if (cellToProcess.confidence > 0.9) {
    // Accept the cell text
} else {
    // Reject the cell text
}

...
// Add additional code 

          

General Notices