An Azure service that provides an event-driven serverless compute platform.
Thank you for reaching out to Microsoft Q&A.
The current approach using Power Automate with rule-based classification works well for basic email routing; however, it has limitations when scaling to enterprise manufacturing scenarios where documents vary in format (orders, confirmations, invoices, delivery notes) and may not follow consistent templates. Additionally, extracting order numbers and matching documents across different communication types requires structured data extraction and correlation logic, which Power Automate alone cannot efficiently handle. This leads to challenges such as inaccurate extraction, difficulty in handling PDF attachments, and lack of robust matching between related documents. To address these gaps, Azure provides an end-to-end scalable architecture that combines document AI, serverless processing, and event-driven workflows to automate extraction, classification, and intelligent matching of documents.
Refer below points to resolve this issue or this is the workaround
Use Azure AI Document Intelligence for extraction of order data
Azure AI Document Intelligence is designed to extract structured information such as key-value pairs, tables, and layout from documents like invoices, orders, and confirmations. This enables reliable extraction of order numbers, vendor details, and amounts from PDFs and email content.
- Use prebuilt invoice models for standard documents
- Train custom models for your manufacturing-specific formats
- Output is structured JSON, which can be easily used for matching
Use Azure Functions (Durable Functions) for workflow orchestration and matching logic
Azure Functions act as the processing layer that handles document extraction results and performs matching logic.
- Trigger functions when a document is uploaded or email is received
- Store extracted data in a database
- Implement matching logic using:
- Order number
- Vendor name
- Date / amount
- Vendor name
- Order number
Example pseudo logic:
if invoice.orderId == order.orderId:
status = "Matched"
elif fuzzy_match(invoice.vendor, order.vendor):
status = "Probable Match"
else:
status = "Unmatched"
Durable Functions help maintain state across multi-step workflows like order → confirmation → delivery → invoice.
Use Azure Storage (Blob Storage) to store emails and attachments
Instead of processing documents directly in Power Automate, store all incoming emails and attachments in Blob Storage.
- Acts as a centralized document repository
- Enables reprocessing and auditing
- Triggers Azure processing pipeline
Use Azure Service Bus or Event Grid for scalable event-driven processing
For high-volume manufacturing scenarios, event-driven architecture is critical.
- Push document processing events to a queue
- Azure Functions consume messages asynchronously
- Enables retry, buffering, and decoupling
This ensures your system can handle spikes in incoming orders without failure.
Use Azure OpenAI for advanced document matching and reasoning.
For cases where:
- Order numbers are missing
- Documents have different formats
- Matching requires semantic understanding
Azure OpenAI can analyze and compare extracted content. Example use cases:
- "Find the best matching order for this invoice"
- Detect inconsistencies between order and invoice
Use a Database (Azure SQL or Cosmos DB) to store extracted and matched data
Store all structured data to enable querying and tracking.
- Maintain relationships between documents
- Track status (matched / unmatched / pending)
- Enable reporting dashboards
Upgrade classification using AI instead of static rule tables
Your current SharePoint rule tables can be replaced or enhanced with AI-based classification:
- Use Document Intelligence for document-type classification
- Use OpenAI for email content classification (orders vs invoices vs confirmations)