Deep Dive: Document Lifecycle Management
Introduction
Every document processed by Zudello moves through a series of stages, known as its lifecycle. This lifecycle is primarily represented by the document's Status. Understanding this lifecycle, the typical statuses involved, how transitions occur (via user actions or automation), and the implications of each status is crucial for effective use and configuration of Zudello.
This guide explores the typical lifecycle for common document types, the key statuses and their meanings, common user actions that influence the lifecycle, and the role of automation (Sentences) in managing status transitions.
See also: Zudello v3 Architecture Overview, Understanding Document Statuses
Statuses and Status Types
- Status: A specific label indicating the current stage of a document (e.g.,
User Review
,Manager Approval
,Ready for Payment
,Placed
). Statuses are configurable per Document Type. - Status Type: A broader category that groups statuses with similar behaviour or purpose (e.g.,
SCANNING
,REVIEW
,ACTIVE
,PROCESSING
,APPROVE
,PENDING
,COMPLETE
,CLOSED
,FLAGGED
,UNSUPPORTED
). Status Types are system-defined and control core behaviours like editability or visibility in certain processes.
Typical Lifecycle Stages (Simplified)
While highly configurable, most documents follow a general pattern:
- Ingestion/Creation: Document enters Zudello (upload, email, manual creation).
- Extraction/Enrichment: Data is extracted, linked, and coded.
- Review/Validation: User reviews data, corrects errors, ensures compliance.
- Submission: Document is submitted for further processing (approval, integration).
- Approval (Optional): Document routes through approval steps.
- Processing/Integration: Document is processed (e.g., PO placed, Invoice sent to ERP).
- Completion/Archival: Document reaches its final state.
Common Statuses and Transitions
(Note: Status Keys (e.g., REVIEW
) are used here for clarity; the user-facing Label might differ based on configuration).
1. Ingestion & Extraction
SCANNING
(Type:SCANNING
)- Entry: Document received via upload/email.
- Process: Document is in the pipeline undergoing OCR/LLM extraction and initial classification. Resource is locked.
- Exit: Moves automatically to
REVIEW
,READY
,FLAGGED
, orUNSUPPORTED
based on pipeline outcome.
UNSUPPORTED
(Type:UNSUPPORTED
)- Entry: Pipeline identifies the file as unsupported (e.g., non-document file type, password protected).
- Process: Document processing stops. User intervention needed (e.g., delete, download, potentially convert).
- Exit: Manual status change (e.g., to
DELETED
).
FLAGGED
(Type:FLAGGED
- Deprecated/AI v2)- Entry: Pipeline extraction failed validation checks (AI v2).
- Process: Requires user interaction via AI Assistant or manual coding.
- Exit: User clicks "Next", triggering Enrichment and transition to
REVIEW
orREADY
.
2. Review & Validation
REVIEW
(Type:REVIEW
)- Entry: Default status after extraction if Enrichment identifies potential issues (e.g., failed validation, missing required links like Supplier). Also default for manually created documents (configurable).
- Process: Document is editable. User reviews data, corrects errors, links records (Supplier, Items), adds coding.
- Exit: User clicks Save and Submit (if enabled) ->
PROCESSING
. User clicks Save -> remainsREVIEW
(or potentially moves toREADY
if all issues resolved). Manual status change possible.
READY
(Type:ACTIVE
)- Entry: Default status after extraction if Enrichment completes successfully without major issues. Also default status after Revert action.
- Process: Document is editable. User performs final review/coding.
- Exit: User clicks Save and Submit (if enabled) ->
PROCESSING
. Manual status change possible.
3. Submission & Processing
PROCESSING
(Type:PROCESSING
)- Entry: User clicks Save and Submit.
- Process: Document is locked. Backend processes (Sentences) are triggered to evaluate the next step (e.g., start approval, mark as complete, send to ERP).
- Exit: Automation (Sentence) sets the next status (e.g.,
APPROVAL
,COMPLETE
,UNABLE
).
4. Approval
APPROVAL
(Type:APPROVE
- Example Key)- Entry: Automation (Sentence) triggers a "Get Approval" action. The specific status key is defined in the Approval Milestone configuration.
- Process: Document editability depends on Milestone setting (
resource_editable
). Approval Service manages assignments, notifications, responses. Users Approve/Reject via UI or external channels. - Exit: Approval Service notifies Automation upon Milestone completion (
APPROVED
orREJECTED
). Automation (Sentence triggered by "Approval outcome received") sets the next status (e.g.,COMPLETE
,REJECT_REVIEW
, anotherAPPROVAL
status).
REJECT_REVIEW
(Type:REVIEW
- Example Key)- Entry: Automation (Sentence) sets this status after an approval milestone is
REJECTED
. - Process: Document becomes editable. Submitter/relevant user reviews rejection reason, makes corrections.
- Exit: User clicks Save and Submit ->
PROCESSING
(restarting the flow).
- Entry: Automation (Sentence) sets this status after an approval milestone is
5. Integration & Completion
UNABLE
(Type:REVIEW
- Example Key)- Entry: Automation (Sentence/Workflow) sets this status if an integration attempt (e.g., sending to ERP) fails.
- Process: Document is editable. User reviews error message (often posted as a note), corrects data or configuration.
- Exit: User clicks Save and Submit ->
PROCESSING
(retrying the integration/flow).
COMPLETE
(Type:COMPLETE
)- Entry: Automation (Sentence) sets this status after successful approval and/or integration. Can also be set manually via "Mark as Complete" action (permission controlled).
- Process: Document becomes read-only. Triggers "Complete" type Enrichment functions (e.g., learning alternatives). Represents a successful end state.
- Exit: User action: Revert, Archive, Delete.
PLACED
(Type:PENDING
- PO Specific)- Entry: User clicks Place Order action on a PO (typically in
PENDING
status). - Process: Document is locked. Indicates order sent to supplier. Awaits receiving/invoicing.
- Exit: Automation (Sentence triggered by related Invoice/Receipt update) sets next status (e.g.,
PARTIALLY_RECEIVED
,INVOICED_NOT_RECEIVED
,COMPLETE
). User action: Revert.
- Entry: User clicks Place Order action on a PO (typically in
RECEIVED
(Type:PENDING
- PO Specific)- Entry: Automation (Sentence triggered by related Receipt update) sets this status when all quantities on the PO have been received.
- Process: Document is locked. Awaits invoicing.
- Exit: Automation (Sentence triggered by related Invoice update) sets next status (e.g.,
COMPLETE
). User action: Revert.
6. Archival & Deletion
ARCHIVED
(Type:COMPLETE
)- Entry: User clicks Archive action.
- Process: Document is read-only, typically hidden from default views. Retained for historical reporting.
- Exit: User action: Unarchive (moves back to previous status), Delete.
DELETED
(Type:CLOSED
)- Entry: User clicks Delete action.
- Process: Document is soft-deleted (marked as deleted, hidden from UI, data retained in backend). Allocations are typically cleared.
- Exit: No standard exit. Requires backend intervention to restore.
Key User Actions Influencing Lifecycle
- Upload/Create: Initiates the lifecycle.
- Save: Saves changes, triggers validation, but typically doesn't advance status significantly (unless resolving blocking errors).
- Save and Submit: Saves changes and triggers the
PROCESSING
status and associated automations (approvals, integrations). RequiresSubmit
button enabled on Form. - Approve/Reject: Actions taken during an
APPROVAL
status type. - Place Order (PO): Moves PO from
PENDING
toPLACED
. - Create Goods Receipt (PO): Creates a related GR document.
- Convert: Creates a new document based on the current one (e.g., Requisition -> PO). Often used with "Duplicate" setting.
- Revert: Moves a document from a
COMPLETE
orPENDING
type status back to an editable status (usuallyREADY
). Clears some flags (e.g.,is_placed
). Requires specific permissions. - Archive/Delete: Moves document to final inactive states.
- Split/Merge: Actions that create/modify documents, potentially impacting lifecycle status.
Role of Automation (Sentences)
Sentences are the primary driver for automatic status transitions:
- Trigger: Status changes (
When a resource status has changed
), events (When extracted
,When submitted
,When approval outcome received
,When related resource updated
). - Conditions: Evaluate document data (totals, coding, allocation status, validation level, budget exceptions) to determine the correct path.
- Actions: Use Set Field action to update the
status
field, moving the document to the next stage in the configured workflow.
Troubleshooting Lifecycle Issues
- Document Stuck: Check current status, review Sentence logs, verify approver validity/permissions, check for validation errors. See Document Stuck Processing.
- Wrong Status Applied: Review Sentence logic (triggers, conditions, actions), check execution order, ensure "And cancel processing" is used correctly.
- Action Button Disabled/Missing: Check document status type, user permissions, validation errors. See Approving and Rejecting Documents.
- Revert Not Working: Check user permissions (
#REVERT
,#REVERT:APPROVAL
,#REVERT:COMPLETE
), check document status type.
Understanding the interplay between statuses, user actions, and automation is key to designing and troubleshooting efficient document workflows in Zudello.