This mutation allows you to upload a PDF or image file (or XML file for DE legislation) of a purchase invoice for automated OCR analysis.
AP AUTOMATION (Accounts Payable Automation) is a variant of UploadFileToEntity, specifically designed for the case where entityType = "AP_AUTOMATION".
When this value is used, the system analyzes the file to automatically create a purchase invoice draft based on the content extracted by the OCR engine.
Unlike uploads to existing business records, here:
- no
entityIdis provided, since the purchase invoice does not yet exist at upload time; - only specific file types are allowed (
pdf,jpg,jpeg,png).
For theDElegislation, XML invoice files (.xml) are also supported.
The generated purchase invoice will appear in the Purchase Invoices module after the OCR process completes, ready for validation and accounting posting.