Page Object Members for Document Capture in SuiteScript

Page Object Members enables powerful document classification and extraction features in SuiteScript for improved document processing.

·2 min read·View Oracle Docs

The Page Object Members are part of the document capture functionality in SuiteScript. This feature facilitates the extraction of relevant information from documents, enhancing automation and processing accuracy.

What Are Page Object Members?

The Page Object Members in SuiteScript help developers extract vital data from uploaded documents, such as invoices or receipts. The main members include properties and methods that provide insights into the document content.

Key Properties and Methods

Here's a breakdown of the key properties and methods available in the Page Object:

MemberReturn TypeDescription
Page.detectedDocumentTypesObject[]Provides confidence levels indicating whether the page represents a specific document type.
Page.fieldsdocumentCapture.Field[]Contains extracted fields from the document page.
Page.linesdocumentCapture.Line[]Comprises extracted lines from the document page.
Page.tablesdocumentCapture.Table[]Includes extracted tables from the document page.
Page.wordsdocumentCapture.Word[]Contains extracted individual words from the document page.
Page.getText()stringReturns the entire text of the page.

Using Page Object Members

To utilize these members, ensure the relevant feature flags are enabled in your documentCapture.documentToStructure(options) call. This will allow you to extract desired fields based on your specific needs.

Example Syntax

The following code snippet demonstrates how to use the Page Object Members:

suitescript
1const extractedData = documentCapture.documentToStructure({
2 file: file.load("SuiteScripts/sample_invoice.pdf"),
3 features: [
4 documentCapture.Feature.FIELD_EXTRACTION,
5 documentCapture.Feature.DOCUMENT_CLASSIFICATION
6 ]
7});
8const pageDetectedDocumentTypes = extractedData.pages[0].detectedDocumentTypes;

This simple setup lets you load a document and extract critical information, enhancing the overall productivity of your NetSuite instance.

Who This Affects

  • Developers: They can leverage the Page Object Members to enhance document processing scripts.
  • Administrators: Understanding these features helps in configuring document capture settings effectively.

Key Takeaways

  • Page Object Members allow for efficient data extraction from documents.
  • Key properties provide insights into document types, fields, lines, tables, and raw words.
  • The Page.getText() method offers a quick way to fetch all text content from a document page.

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

Frequently Asked Questions (4)

Do I need to enable a feature flag to use Page Object Members in SuiteScript?
Yes, you need to enable relevant feature flags in your documentCapture.documentToStructure(options) call to utilize Page Object Members.
How can developers extract specific document fields using SuiteScript's Page Object Members?
Developers can extract specific fields by accessing the Page.fields property, which contains extracted fields from the document page.
What data can be extracted using the Page Object Members in SuiteScript?
Page Object Members can extract document types, fields, lines, tables, and individual words from a document page, as well as the entire text using the Page.getText() method.
Are there any prerequisites for using document capture functionality with Page Object Members?
The article does not specify prerequisites beyond enabling the relevant feature flags in the documentCapture.documentToStructure(options) call.
Source: Page Object 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 Platform

View all Platform articles →