Email ingestion enables organizations to submit documents to Docupath by sending them to organization email addresses that you configure. This capability streamlines document entry for high-volume workflows, allowing users to route documents to specific sub-organizations through intelligent email parsing.
Understanding email configuration and sub-organization assignment logic is critical for multi-tenant deployments.
How It Works
When you create an organization in Docupath, you set up the email address(es) used for document ingestion. (These addresses are configured by you; they are not generated automatically by the system.) Documents can be submitted to a Main Organization address or directly to a Sub Organization address.
Each organization has two ingestion email addresses, and the address you send to determines how the email's attachments are handled:
Single Primary Document with Optional Attachments: The email is processed as one primary document. Any other files attached to the email are kept as optional supporting attachments on that single primary document, rather than being treated as separate documents.
Multiple Primary Documents: Each attachment in the email is processed as its own independent primary document, with separate extraction, status tracking, and audit trail.
Email Submission Process
Email Sending
User sends email to one of the organization's ingestion email addresses
The address chosen determines how attachments are handled (single primary document with optional attachments, or multiple primary documents)
Subject and body are optional; note that on the Single Primary Document address, the body is processed as the document when the email has no valid business-document attachment
Attachment Processing
Multiple Primary Documents address: Each attachment is processed as a separate primary document, extracted and queued independently, with no cross-document dependencies or batch grouping
Single Primary Document with Optional Attachments address: The email produces one primary document, and the remaining attachments are stored as supporting attachments on that document
Sub-Organization Assignment
Docupath loads all sub-organization configurations under the receiving Main Organization
If the Main Organization has exactly one sub-organization, the document is routed to that sub-organization
Otherwise, checks if the Primary Party (extracted from the document) matches any sub org's override trading party, and routes to the matching sub org if a single match is found
If no single override match is found, checks whether the sender (the email's From address, matched to a Docupath user account) is assigned to exactly one sub-organization under this Main Organization, and routes there if so
Records "No sub organization detected" when none of the above resolves a single sub-organization
Status Updates
Processed documents appear in assigned organization's inbox
Email activity is recorded in the audit trail
Failed attachments logged with specific error details
Example Sub-Organization Routing
Scenario: Three Sub-Organizations with Override Parties
This example uses the Multiple Primary Documents address, so each attachment is treated as a separate document and routed on its own.
Main Org Email: financedocs-tenantname@docupath.app Sub Organization 1 (US Finance) Override Trading Party: "Apple Inc." Sub Organization 2 (EU Finance) Override Trading Party: "Siemens AG" Sub Organization 3 (APAC Finance) Override Trading Party: "Sony Corporation"
Email Received with Attachments:
Invoice from Apple Inc. routed to US Finance (override trading party match)
PO from Siemens AG routed to EU Finance (override trading party match)
Receipt from Sony Corporation routed to APAC Finance (override trading party match)
Payment from an unknown party: if the sender is a Docupath user assigned to exactly one of these sub-organizations, it is routed there; otherwise it is recorded as "No sub organization detected"
Note: If a Main Organization has only one sub-organization, every document sent to its address routes to that sub-organization automatically, without needing an override trading party match or a sender lookup.
Supported Configurations and Options
Email Address Configuration
Configuration Level | Email Address | Scope |
Main Organization | Two ingestion addresses you configure (Single Primary Document with Optional Attachments; Multiple Primary Documents) | Documents submitted to the main organization; can route to sub-organizations by primary party matching |
Sub Organization | Organization-specific address(es) you configure | Documents submitted directly to that sub-organization |
Attachment Processing Rules
Supported File Types
PDF documents
Image files (JPG, PNG, TIFF, etc.)
Structured documents (XML, JSON where applicable)
Attachment Limits
Maximum 10 attachments per email
Total email size limit: per organization policy
Oversized emails: rejected with notification
Per-Attachment Processing
On the Multiple Primary Documents address, each attachment receives a unique document ID, runs through an independent extraction pipeline, and has separate status tracking and audit trail, with no grouping or batching
On the Single Primary Document with Optional Attachments address, the attachments are grouped under one primary document as supporting files
Sub-Organization Assignment Logic
When a document is sent to a Main Organization address, Docupath resolves the sub-organization in the following order of precedence and stops at the first rule that identifies a single sub-organization:
Single sub-organization. If the Main Organization has exactly one sub-organization, the document is routed to it. No further checks are performed.
Override trading party match. The Primary Party extracted from the document is compared against each sub-organization's override trading party. If exactly one sub-organization matches, the document is routed to it.
Sender membership. If no single override match is found, Docupath identifies the sender by matching the email's From address to a Docupath user account. If that user is assigned to exactly one sub-organization under this Main Organization, the document is routed to it.
No match. If none of the above resolves a single sub-organization, the document is recorded as "No sub organization detected."
Ambiguity and safeguards
Multiple override trading party matches record "No sub organization detected" (ambiguity safeguard)
A sender assigned to multiple sub-organizations under the Main Organization does not resolve a routing decision, and the document records "No sub organization detected"
A sender who is not a Docupath user, or is assigned to no sub-organization under this Main Organization, does not affect routing
Override Trading Party Configuration
Defined at sub organization level
Typically represents vendor/supplier identifier
Must be unique across sub organizations (no overlaps)
Can be updated without re-submitting documents
Document Retention Per Sub Org
Documents remain in assigned sub org inbox
Cannot be moved between sub orgs post-assignment
Original routing decision is immutable
Other Technical Specifications
Email Processing Architecture
Type: asynchronous processor
Trigger: email received at organization address
Processing: documents are queued and processed after receipt
Retry Logic: automatic retry on transient failures
Subject and Body Handling
Subject line: optional metadata, not parsed for routing (use for human reference only)
Body text: not used for routing. On the Single Primary Document address, the email body is processed as the document when the email has no valid business-document attachment; when a valid document is present, the body is kept as a read-only reference and is not parsed. See Processing the Email Body as a Document.
Primary Party Extraction
Source: document content (invoice, PO, receipt, etc.)
Method: AI-powered entity extraction
Fallback: "Unknown Party" if extraction fails
Email Address Configuration
Addresses are configured by the organization (not auto-generated) on the docupath.app domain
Aliases: additional email addresses can forward to a primary address
Audit Trail
Email metadata logged: sender, recipient, timestamp, attachment count
Document-level log: routing decision, extracted party, assigned sub org
Retention: per organization policy
Notes
Multiple Matching Parties
If document lists multiple parties, only primary party used for routing
Secondary parties ignored for sub-organization assignment
Scenario: invoice lists "Sold By: Apple Inc., Billed To: Acme Corp"
Behavior: routes based on "Sold By" (primary); Acme assignment ignored
Mitigation: ensure primary party is unambiguous in document
No Sub Organization Match
Document receives "No sub organization detected" status and remains in the Main Organization inbox for manual review
Unmatched documents are visible to parent/admin users for triage; sub-organization users do not see them until they are assigned
A reviewer can assign the correct sub-organization from the organization selector (which lists the document's Main Organization and its sub-organizations) and reprocess the document
Does NOT default to any sub-organization beyond the assignment rules above
Best Practice: investigate and classify unmatched documents
Party Extraction Failure
If Docupath cannot identify a Primary Party, it defaults to "Unknown Party"
Without a Primary Party, the override trading party match cannot apply, but the single sub-organization rule and the sender membership rule can still route the document
If no rule resolves a single sub-organization, the document falls back to the Main Org inbox as "No sub organization detected"
Recovery: manually assign the organization and reprocess, or re-submit with a clearer document
Attachment Order
On the Multiple Primary Documents address, attachments are processed in the order received, with no dependencies between them
If one fails, others continue processing (partial success is possible: 9 succeed, 1 fails)
Email Duplicate Submissions
No deduplication on re-sent emails
Sending same email twice creates duplicate documents
Mitigation: unique document IDs prevent confusion; operators must deduplicate manually
Override Party Changes
Changing a sub org's override party does NOT affect already-routed documents
New routing rules apply only to future emails
Existing documents locked to original assignment
Workaround: manual re-assignment if necessary
Subject Line Ambiguity
Subject lines are NOT parsed for routing information
Even if subject contains org name or party, ignored for assignment
Document content only determines routing
Prevention: rely on document content, not email metadata
