DocumentCaptureTask Object Members Reference for NetSuite
The DocumentCaptureTask object in NetSuite allows asynchronous document processing and task dependencies for efficient data handling.
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
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
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 Name | Type | Description |
|---|---|---|
DocumentCaptureTask.id | string | The unique ID of the task. |
DocumentCaptureTask.documentType | string | The type of document to process. |
DocumentCaptureTask.features | string[] | Features to extract from the document (fields, tables, etc.). |
DocumentCaptureTask.inputFile | file.File | The document file for content extraction. |
DocumentCaptureTask.language | string | Language of the document being processed. |
DocumentCaptureTask.outputFilePath | string | Path for exporting document capture results as JSON. |
DocumentCaptureTask.ociConfig | Object | OCI credentials for unlimited usage mode operations. |
DocumentCaptureTaskStatus Object
Once a DocumentCaptureTask has been submitted, the status can be monitored through the DocumentCaptureTaskStatus object:
| Property Name | Type | Description |
|---|---|---|
DocumentCaptureTaskStatus.status | string (read-only) | Displays the current processing status of the document capture task. |
DocumentCaptureTaskStatus.taskId | string (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
DocumentCaptureTaskenables 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.
Frequently Asked Questions (4)
How can I add a dependency to a DocumentCaptureTask in NetSuite?
What types of documents can be processed using DocumentCaptureTask?
What is required to submit a DocumentCaptureTask for processing?
Can DocumentCaptureTask results be exported, and if so, how?
Was this article helpful?
More in SuiteScript
- SuiteScript 2.1 Enhancements in NetSuite February Updates
SuiteScript 2.1 now supports async features and PATCH method. Discover the latest API and SuiteProcurement improvements.
- Scheduling Map/Reduce Script Deployments in NetSuite
Learn to schedule map/reduce script submissions, including one-time and recurring options in NetSuite.
- Binary File Support in N/https Module for SuiteScript
SuiteScript enhances capabilities with binary file support in the N/https module, allowing improved data handling in external communications.
- API Governance Units Calculation in NetSuite 2026.1
NetSuite 2026.1 introduces examples illustrating API governance unit calculations for both user event and scheduled scripts.
