DocumentCaptureTask Object Members Reference for NetSuite

The DocumentCaptureTask object in NetSuite allows asynchronous document processing and task dependencies for efficient data handling.

·3 min read·1 views·View Oracle Docs

TL;DR Opening

The DocumentCaptureTask object in NetSuite facilitates the asynchronous processing of documents, enabling users to extract key information and set up task dependencies effectively. This capability is essential for automating workflows and improving overall operational efficiency.

What is the DocumentCaptureTask?

The DocumentCaptureTask is part of the N/task module in SuiteScript that allows developers to create tasks specifically aimed at processing documents. This includes defining various document types, the features to be extracted, and managing task dependencies for enhanced functionality.

Key Features of DocumentCaptureTask

A DocumentCaptureTask can manage several aspects related to document processing, including:

  • Document Type: Defines the specific type of document being processed, such as invoices or receipts.
  • Features Extraction: Allows for specifying which elements (like fields or tables) of the document should be captured and processed.
  • Dependency Management: Supports scheduling other tasks that must be completed before or after the document capture occurs.

Methods of DocumentCaptureTask

The DocumentCaptureTask object comes with various methods that help in task manipulation:

DocumentCaptureTask.addInboundDependency

javascript
DocumentCaptureTask.addInboundDependency(options);

Adds a scheduled script task as a dependent task to the current document capture task. This is useful for setting up workflows that require sequential execution of tasks.

DocumentCaptureTask.submit

javascript
DocumentCaptureTask.submit();

Submits the document capture task for asynchronous processing and returns the task ID. This method is crucial for initiating the document processing workflow.

Properties of DocumentCaptureTask

The following properties are available to configure a DocumentCaptureTask:

Property NameTypeDescription
DocumentCaptureTask.idstringThe unique ID of the task.
DocumentCaptureTask.documentTypestringThe type of document to process.
DocumentCaptureTask.featuresstring[]Features to extract from the document (fields, tables, etc.).
DocumentCaptureTask.inputFilefile.FileThe document file for content extraction.
DocumentCaptureTask.languagestringLanguage of the document being processed.
DocumentCaptureTask.outputFilePathstringPath for exporting document capture results as JSON.
DocumentCaptureTask.ociConfigObjectOCI credentials for unlimited usage mode operations.

DocumentCaptureTaskStatus Object

Once a DocumentCaptureTask has been submitted, the status can be monitored through the DocumentCaptureTaskStatus object:

Property NameTypeDescription
DocumentCaptureTaskStatus.statusstring (read-only)Displays the current processing status of the document capture task.
DocumentCaptureTaskStatus.taskIdstring (read-only)The task ID associated with the submitted document capture task.

Conclusion

The DocumentCaptureTask provides a robust mechanism for asynchronous document processing within NetSuite, allowing for seamless integration into existing workflows and automation strategies. By using the properties and methods outlined above, developers can effectively manage document capture and associated tasks.

Key Takeaways

  • The DocumentCaptureTask enables asynchronous document processing in NetSuite.
  • Methods allow for adding dependencies and submitting tasks for efficient execution.
  • Properties can be utilized to specify document type, features, and output configuration.

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

Frequently Asked Questions (4)

How can I add a dependency to a DocumentCaptureTask in NetSuite?
You can add a dependency to a DocumentCaptureTask in NetSuite by using the `addInboundDependency` method. This method allows you to specify a scheduled script task that must be completed before or after the document capture task, facilitating sequential task execution in workflows.
What types of documents can be processed using DocumentCaptureTask?
The `DocumentCaptureTask` can process various types of documents, such as invoices or receipts. The specific document type is defined using the `documentType` property, allowing developers to tailor document processing to the business's needs.
What is required to submit a DocumentCaptureTask for processing?
To submit a DocumentCaptureTask for processing, you need to call the `submit` method. This method initiates asynchronous processing of the document capture task and returns a task ID for monitoring purposes.
Can DocumentCaptureTask results be exported, and if so, how?
Yes, DocumentCaptureTask results can be exported. The results can be exported as JSON to a specified path using the `outputFilePath` property. This allows for easy integration of processed data into other systems or storage solutions.
Source: DocumentCaptureTask 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 General

View all General articles →