Skip to content

Mappings⚓︎

Our API uses enums to describe the multiple statuses a task can be in during processing and various other type-like values.

We also return textual representations of these enums for ease of use where appropriate.

Below you can find these various enums and their respective mappings.

Task Status and Integration Status⚓︎

There are two distinct types of task statuses:

  • TaskStatus: this status identifies the processing state of the task. It shows if the task is queued, pre-processing, recognizing, processed or deleted, among others, with a high degree of granularity.
  • IntegrationStatus: this status identifies the integration state of the task. It shows if the task has been queued for integration, if it was successful or if it failed.

You can use both TaskStatus and IntegrationStatus to control and understand the lifecycle of your tasks. Common use cases include:

  • Creating detailed task listings, such as the Tasks Inbox page, with detailed information about the processing state of the task, and conditional access to the Task Viewer if the task is in the To Review state.
  • Understanding when the task needs manual (or automatic) re-processing, for example if it is stuck in Pre-Processing in Progress for long periods of time.
  • Creating batch logic in your application, by understanding if all tasks in your batch are already in the Processed state.
  • Understanding if a Task needs to be reviewed again, if the integration status is Failed.

Below you can find two tables mapping these values, with a small description for each one.

Task Status⚓︎

Task StatusValueDescription
Deleting19Task was queued for deletion
Deleted20Task was deleted and moved to history
QueuedForPreProcessing30Task was queued for pre-processing
PreProcessingInProgress31Task is currently in pre-processing
PreProcessingFailed32Task has failed pre-processing
PreProcessingDownloadFailed33Task has failed download at the pre-processing step
PreProcessingSuccessful34Task has completed pre-processing
PreProcessingGetPagesFailed35Task has failed due to not being able to obtain total pages
PreProcessingInsufficientVolume36Task has failed due to insufficient licensing volume
PreProcessingLicenseExpired37Task has failed due to an expired license
PreProcessingSplittingInProgress38Task is currently being split into multiple, smaller tasks
PreProcessingSplittingFailed39Task failed split
QueuedForRecognizing40Task was queued for recognizing
RecognizingInProgress41Task is currently being recognized
RecognizingFailed42Task has failed at the recognizing step
RecognizingSuccessful43Task has completed recognizing
QueuedForPostProcessing50Task was queued for post-processed
PostProcessingInProgress51Task is currently being post-processed
PostProcessingFailed52Task has failed post-processing
PostProcessingSuccessful53Task has completed post-processing successfully
ToReview60Task is ready for review
InReview70Task is currently being reviewed
QueuedForExport90Task was queued for integration with the external system
ExportInProgress91Task is currently being exported
ExportFailed92Task failed export
ExportSuccessful93Task has completed export
Processed100Task was successfully exported and has been fully processed
SplitProcessed101Task was successfully split into multiple parts
ProcessedAfterPeriodAndDeletedFiles110Task was processed after the time period and its additional files have been deleted
ValidationErrorInvalidDimensions400Task has invalid image dimensions
PreProcessingConvertToPdfFailed405Task failed due to an error while converting file to PDF
PreProcessingFileLengthCountFailed406Task failed due to an error while counting file length
PreProcessingUnknownLicenseError407Task failed due to an unknown license error
PreProcessingPDFReaderError408Task failed due to an error while attempting to read the PDF file

Integration Status⚓︎

Integration StatusValueDescription
Never1No integration attempt was ever issued for this task
Queued2Task is currently queued for integration
Successful3Last integration attempt was successful. All detected entities were added to the external system
Failed4Last integration attempt failed. One or more detected entities were not added to the external system

Task Type⚓︎

The TaskType enum describes the type of a given task in our system.

We can use this type not only to identify what kind of file is being processed, but also to write conditional logic and pages specific to each type of task.

Info

TaskType and Workspaces Each Workspace processes one - and only one - Task type at a time. The value of TaskType changes depending on the template you chose when creating a Workspace, which means it is also related to TemplateType.

Task TypeValueDescription
Invoice10For general invoices and Portuguese invoices tasks which may include supported QR Codes
Receipt20For receipt tasks
LegalDocument30For legal document tasks. Only available to certain Organizations
Transcript40For transcription tasks of audio and video files.
Labelling50For labeling tasks, used to label documents to create custom templates
Custom60For tasks using custom templates for recognition
Subtitles70For subtitling tasks of video files
DocumentAnonymization80For anonymizing data of document tasks
ImageAnonymization90For anonymizing data of images tasks
IdDocument100For identification documents tasks
Layout110For layout detection of tasks

Task Assignment Order Type⚓︎

The TaskAssignmentOrderType enum defines the sequence in which a task assignment must be reviewed.

Order TypeValueDescription
AnyUser10Any assigned user can conduct the review, and once one completes it, the task will be finished
AnyOrder20Any assigned user can review it, but the task will only be finished once all assignees have finished their revisions
Sequence30The task can only be reviewed by the assigned users in the specified sequence. The task will be finished only after all assignees have completed their revisions

Workspace Type⚓︎

The WorkspaceType enum describes the type of workspace you are working with.

Similarly to the TaskType enum, this enum allows us to completely change the UI/UX of a given workspace if necessary, providing custom logic depending on its value.

Workspace TypeValueDescription
Standard10For standard workspaces focused on processing Tasks and exporting them to some external system
LabelingAndTraining20For workspaces focused on loading files for labeling, and then using that information to train new custom templates

Template Type⚓︎

The TemplateType enum helps identify what kind of template was used to create a given workspace.

This enum is predominantly used for display purposes, or as a fallback when the actual template used cannot be identified.

Template TypeValueDescription
BuiltIn10The default built-in templates created by the SmartDocumentor team - the default template selections when you create a new workspace
Template20A custom template, created by an user of your Organization, of the Template type. This type excels at detecting fields in documents with very similar layouts and structure
TrainTemplate30A special built-in template type used to create workspaces to train custom Template models. This is the template type used when you create a new custom template and select the Template type
Neural40A custom template, created by an user of your Organization, of the Neural type. This type can use AI to detect fields in documents with irregular layouts and structures
TrainNeural50A special built-in template type used to create workspaces to train custom Neural models. This is the template type used when you create a new custom template and select the Neural type

Speaker Source⚓︎

The SpeakerSource enum helps identify which source the speaker was retrieved from.

Speaker SourceValueDescription
Task10Speaker belongs only to Task locally
Batch20The Speaker belongs to a Batch
Workspace30The Speaker belongs to a workspace

Known Metadata Keys⚓︎

These are case sensitive text values that can be matched to trigger specific behavior. However any text values can be considered for metadata key or metadata values.

Metadata Key Type Description Supported Values
SentByEmail string(optional, available in all Workspaces) Email address of the user that has inserted the document/task in the system Any valid email address

Receipt Type⚓︎

The ReceiptType enum helps identify which type of receipt was retrieved from the document.

Receipt TypeValueDescription
RetailMeal"Types.Receipts.Meal"For receipts related to meals
Supplies"Types.Receipts.Supplies"For receipts related to supplies
Hotel"Types.Receipts.Hotel"For receipts related to hotels
FuelAndEnergy"Types.Receipts.FuelAndEnergy"For receipts related to fuel and energy
Transportation"Types.Receipts.Transportation"For receipts related to transportation
Communication"Types.Receipts.Communication"For receipts related to communication
Subscriptions"Types.Receipts.Subscriptions"For receipts related to subscription
Entertainment"Types.Receipts.Entertainment"For receipts related to entertainment
Training"Types.Receipts.Training"For receipts related to training
Healthcare"Types.Receipts.Healthcare"For receipts related to healthcare
Other"Types.Receipts.Other"For other type of receipts

Id Document Type⚓︎

The IdDocumentType enum helps identify which type of Id was retrieved from the document.

Id Document TypeValueDescription
DriverLicense"Types.IdDocuments.DriverLicense"For driver license documents
Passport"Types.IdDocuments.Passport"For passport documents
NationalIdentityCard"Types.IdDocuments.NationalIdentityCard"For national identity card documents
ResidencePermit"Types.IdDocuments.ResidencePermit"For residence permit documents
UsSocialSecurityCard"Types.IdDocuments.UsSocialSecurityCard"For US social security card documents
IdDocument"Types.IdDocuments.IdDocument"For id documents
Other"Types.IdDocuments.Other"For other type of documents