Document Processing

Operations teams spend hours every day reading documents, typing data into systems, comparing numbers across spreadsheets, and producing reports. Lotics handles all three stages of the document lifecycle: extracting data from incoming documents using AI, cross-checking values across related records, and generating outgoing documents from templates. The entire pipeline runs within workflows, so a single trigger can process a document from arrival to final output without manual intervention.

Incoming document processing

Lotics uses AI to read and extract structured data from any document format: scanned PDFs, photos, Word files, Excel spreadsheets, or email bodies. The AI understands document layouts and can identify fields like invoice numbers, dates, line items, totals, container numbers, vessel names, and addresses without requiring predefined templates or OCR zones. You upload or attach a document, and the AI returns structured data that maps directly to your table fields.

The extraction works across document types commonly found in operations: invoices, bills of lading, purchase orders, customs declarations, inspection reports, delivery orders, packing lists, and certificates of origin. For each document type, the AI adapts to the specific layout and terminology, even when formats vary between vendors or shipping lines.

Extraction happens within workflows, meaning it can be fully automated. An email trigger receives a document attachment, a tool_call step extracts the data, and subsequent steps create or update records with the extracted values. The operations team only intervenes when the AI flags low-confidence extractions for human review.

Cross-checking and validation

Extracting data is only half the problem. The other half is verifying that the data is correct and consistent across related documents. Lotics workflows can compare values between records, checking that an invoice total matches the sum of its line items, that a bill of lading container number matches the booking confirmation, or that a delivery order quantity matches the purchase order.

Cross-checking is built into the workflow step sequence. After extracting data from an incoming document, a tool_call step queries related records and an if/else step compares the values. When a discrepancy is found, the workflow can flag the record, notify the responsible person, or halt processing until the issue is resolved. This replaces the manual process of opening multiple spreadsheets side by side and scanning for mismatches.

For high-volume operations, automated cross-checking catches errors that manual review would miss. With Lotics, every document is checked against every related record, every time, with zero human effort.

Document types commonly processed

Lotics handles the full range of documents that flow through operations teams in logistics, trade, manufacturing, and professional services. The AI extraction adapts to each document type without requiring separate configuration. The same extraction tool handles invoices from different vendors with different layouts.

Below are the most commonly processed document types and the fields typically extracted from each. The AI can extract additional fields beyond these based on your specific needs.

Document typeTypical fields extracted
InvoicesVendor name, invoice number, date, line items (description, quantity, unit price, amount), subtotal, tax, total, payment terms, bank details
Bills of ladingShipper, consignee, notify party, vessel name, voyage number, port of loading, port of discharge, container numbers, seal numbers, cargo description, weight, volume
Purchase ordersBuyer, supplier, PO number, date, line items (item code, description, quantity, unit price), delivery address, delivery date, payment terms
Customs declarationsDeclaration number, importer, exporter, HS codes, goods description, quantity, value, origin country, duty amount, clearance date
Inspection reportsInspector, date, container number, condition (new/used/damaged), damage descriptions, photo references, repair estimates, pass/fail status
Delivery ordersConsignee, container number, release reference, pickup location, delivery address, free time expiry, demurrage charges

Outgoing document templates

Lotics generates outgoing documents from three template types, each suited to different use cases. Templates are populated with record data and can be generated manually or automatically within workflows. All generated documents are stored as file attachments on the relevant record.

You upload or create templates once, map the data fields, and reuse them across all records. The AI assistant can help create templates by generating the HTML/CSS or mapping PDF form fields from your existing documents.

Template typeHow it worksBest for
PDF Form FillUpload an existing PDF with form fields (AcroForm). Map each form field to a record field or expression. Lotics fills the form and produces a flat PDF.Government forms, customs declarations, standardized industry documents where the layout is fixed and you need to fill in specific fields
HTML to PDFWrite an HTML/CSS template with Handlebars variables ({{field_name}}). Lotics renders the template with record data and converts it to PDF. Supports loops, conditionals, and computed values.Invoices, quotations, reports, certificates, letters. Any document where you control the layout and need flexible formatting
Excel GenerationUpload an .xlsx template with mapped cells and array ranges. Lotics populates the template with record data, expanding array ranges for line items. Produces a downloadable .xlsx file.Financial reports, inventory summaries, data exports, reconciliation sheets. Any document where recipients need to work with the data in Excel

Templates in workflows

Document generation becomes most powerful when embedded in workflows. A single workflow can extract data from an incoming document, create or update records, generate an outgoing document from a template, and email it to the recipient, all triggered by a single event.

For example, a freight forwarder receives a booking confirmation email. The workflow extracts the booking details, updates the shipment record, generates a customer-facing confirmation PDF from an HTML template that includes the vessel name, ETA, container number, and booking reference, and emails it to the customer. The operations team does not touch the document at any point.

Templates support conditional content within the document itself. An HTML template can show different sections based on record data, including a hazardous goods declaration only when the cargo is classified as dangerous, or showing different payment terms based on the customer's credit agreement. This means one template can serve multiple scenarios without duplication.

Frequently asked questions

Lotics processes PDFs (including scanned documents), images (JPEG, PNG), Word documents (.docx), Excel files (.xlsx), and plain text from email bodies. The AI extraction works on any format. It reads the content visually, so even photos of handwritten forms can be processed.

Accuracy depends on document quality and complexity. For standard typed documents like invoices and bills of lading, extraction accuracy is typically above 95%. For handwritten or low-quality scanned documents, the AI flags low-confidence fields for human review rather than guessing. You can review and correct extractions before the data is committed to records.

Yes. Upload any PDF that contains AcroForm fields (fillable form fields). Lotics detects the form fields automatically and lets you map each one to a record field or expression. The generated output is a flat PDF with the form fields filled in.

Yes. The AI supports multilingual document extraction, including Vietnamese, Chinese, Japanese, Korean, Thai, and all major European languages. It can handle documents that mix languages, such as a bill of lading with English headers and Vietnamese cargo descriptions.

Document processing steps are regular workflow steps. An email trigger receives a document as an attachment, a tool_call step extracts data from it, and subsequent steps create records, cross-check values, generate outgoing documents, and send notifications. The entire pipeline runs automatically from trigger to completion.