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
- Common SuiteScript Errors and Solutions for NetSuite
Common NetSuite script errors include INVALID_SCRIPT_DEPLOYMENT_ID and SSS_AUTHORIZATION_HEADER_NOT_ALLOWED. Learn effective solutions.
- Set Sublist Field Values in SuiteScript 2.x for Record Management
Set sublist field values in SuiteScript 2.x for effective record management using standard and dynamic modes.
- Setting Field Values in SuiteScript for Effective Record
Learn to set field values in SuiteScript effectively, troubleshooting common errors and understanding data types.
- SuiteScript 2.1 Enhancements and API Updates in NetSuite
SuiteScript 2.1 enables execution of 2.0 scripts and supports PATCH method for enhanced API capabilities.
Advertising
Reach SuiteScript Professionals
Put your product in front of NetSuite experts who work with SuiteScript every day.
Sponsor This Category