Processing actions
The Processing group on the Incoming Document holds one action per processing step, in the order a document goes through them. Each action runs the flow your company has published for that step – so what exactly happens is decided by the flow, not by the action.
| Action | Runs the flows on the trigger | What the flow typically does |
|---|---|---|
| Process ZUGFeRD | When processing a ZUGFeRD document | Extracts the ZUGFeRD/Factur-X data embedded in the PDF and attaches it as an XML file |
| Process E-Document | When processing an e-document | Reads the electronic invoice (XRechnung, Peppol, ZUGFeRD XML) and fills the document and its invoice lines |
| Process PDF (OCR) | When processing a PDF (OCR) | Sends a PDF without e-invoice data to an OCR service and fills the document and its lines from the result |
| Apply Assignment Rules | When applying incoming document rules | Assigns the lines with the vendor's document and line rules |
| Create Purchase Document | When creating a purchase document | Creates the purchase invoice or credit memo from the incoming document |
You do not have to run them one by one. A flow can hand the document on to the next step when it is done – from ZUGFeRD to the e-document, from the e-document to the assignment rules – so one click can take the document all the way through.
When an action is available
- An action only appears once a flow is published on its trigger. If a colleague publishes one while you have the document open, close and reopen the card to see the action.
- Actions are greyed out once the document is marked as processed. They stay visible, so you can still read what they do.
- Process ZUGFeRD is greyed out as soon as the document has an XML attachment – the ZUGFeRD data has been extracted, or the invoice arrived as XML in the first place.
- Apply Assignment Rules needs a vendor. Fill in Vendor No. first.
While the processing runs
The processing runs in the background, but the action stays with you: a Processing document window shows which step is running and how far along it is. It follows the whole chain, including steps that one flow hands on to the next, and closes when everything is done.
- If a step logs an error, it is shown to you when the processing has finished, and stays in the Errors and Warnings part of the document.
- If the processing takes unusually long, the window closes with a message and the processing continues in the background. Follow it in the execution log of the flow.
- If Manually start flows is switched on in the AutoFlow Setup, the processing is only queued. It runs once the job queue entry is started.
Create Purchase Document opens the purchase document the flow created as soon as it is done.
Starting the OCR processing from a flow
The step Process PDF (OCR) starts the When processing a PDF (OCR) flows from another flow. It takes two inputs:
| Input | Required | What to select |
|---|---|---|
| Document | Yes | The incoming document to process |
| No | The PDF to read by OCR: the Content field of an incoming document attachment |
The flow on the trigger receives both: the incoming document as Document and the attachment as PDF. Send its Content field to the OCR service, for example as a file in the form data of an HTTP Request ({{…PDF.Content}}, with PDF.Name as the file name). When the processing is started from the Process PDF (OCR) action on the document, or the step has no PDF, PDF is empty.
Business Central's own actions
Business Central's Create Manually, Create Document and Create Journal Line are hidden on the Incoming Document, because Create Purchase Document replaces them. Add them back with Personalize if you need them. Business Central's other actions, such as Release, are unchanged.
Editing the rules
The Assignment Rules group at the end of the ribbon opens the rules of the document's vendor: Edit Document Rules and Edit Line Rules. See Document and line rules.