編集

次の方法で共有


Use OCR to Turn PDF and Image Files into Electronic Documents

From PDF or image files that you receive from your trading partners, you can have an external OCR service (Optical Character Recognition) generate electronic documents that can be converted to document records in Business Central. For example, when you receive an invoice in PDF format from your vendor, you can send it to the OCR service from the Incoming Documents page.

As an alternative to sending the file from the Incoming Documents page, the OCR service can offer the option to process files forwarded to a dedicated email address. Then, when you receive the electronic document back, a related incoming document record is created automatically in Business Central.

After some seconds, the OCR service will send the processed file to the Incoming Documents page as an electronic document record that can be converted to a purchase invoice for the vendor, a sales invoice, credit memo or a journal entry.

Because OCR is based on optical recognition, it's likely that the OCR service will interpret characters in your PDF or image files wrongly when it first processes a certain vendor's documents, for example. It may not interpret the company logo as the vendor's name or it may misinterpret the total amount on a receipt because of its layout. To avoid these errors going forward, you can correct the errors in a separate version of the Incoming Document page. Then you send the corrections back to the OCR service to train it to interpret the specific characters and fields correctly next time it processes a PDF or image document for the same vendor. For more information, see Train the OCR service to avoid errors.

The traffic of files to and from the OCR service is processed by a dedicated job queue entry. This job queue is created automatically when you enable the external OCR service connection. For more information, see Set Up Incoming Documents.

Note

The OCR feature is provided by external providers. Choose a service package that is appropriate for your organization and/or country/region. Find services compatible with Business Central and details on available features at AppSource.microsoft.com.

To send a PDF or image file to the OCR service from the Incoming Documents page

  1. Choose the Lightbulb that opens the Tell Me feature. icon, enter Incoming Documents, and then choose the related link.

  2. Create a new incoming document record and attach the file. For more information, see Create Incoming Document Records.

  3. On the Incoming Documents page, select one or more lines, and then choose the Send to Job Queue action.

    The value in the OCR Status field changes to Ready. The attached PDF or image file is sent to the OCR service by the job queue according to the schedule, if no errors exist.

  4. Alternatively, on the Incoming Documents page, select one or more lines, and then choose the Send to OCR Service action to immediately send the files for processing.

    The value in the OCR Status field changes to Sent, if no errors exist.

To send a PDF or image file to the OCR service by email

From your email application, you can forward an email to the OCR service provider with the PDF or image file attached. For information about the email address to send to, see the OCR service provider's web site.

Since no incoming document record exists for the file, a new record will be created automatically on the Incoming Documents page when the OCR service sends the resulting electronic document. For more information, see Create Incoming Document Records.

Note

If you work on a tablet or phone, you can send the file to the OCR service as soon as you have taken a photo of the document, or you can create an incoming document directly. For more information, see Create an incoming document record by taking a photo.

To receive the resulting electronic document from the OCR service

The electronic document that is created by the OCR service from the PDF or image file is automatically received into the Incoming Documents page by the job queue entry that is set up when you enable the OCR service.

If you aren't using a job queue, or you want to receive a finished OCR document sooner than per the job queue schedule, you can choose the Receive from OCR Service action. This option will get any documents that are completed by the OCR service.

Note

If the OCR service is set up to require manual verification of processed documents, then the OCR Status field will contain Awaiting Verification. In that case, perform the following steps to sign in to the OCR service website to manually verify an OCR document.

  1. In the OCR Status field, choose the Awaiting Verification hyperlink.

  2. On the OCR service website, sign in using the credentials of your OCR service account. For more information, see Set up an OCR service.

    Information for the OCR document is displayed, showing both the source content of the PDF or image file and the resulting OCR field values.

  3. Review the field values and manually edit or enter values in fields that the OCR service has tagged as uncertain.

  4. Choose the OK button. The OCR process is completed and the resulting electronic document is sent to the Incoming Documents page in Business Central, according to the job queue schedule.

  5. Repeat steps 2 through 4 for any other OCR document to be verified.

Now you can proceed to create document records for the received electronic documents in Business Central, manually or automatically. For more information, see the next procedure. You can also connect the new incoming document record to existing posted or non-posted documents so that the source file is easy to access from Business Central.

To create a purchase invoice from an electronic document received from the OCR service

The following procedure describes how to create a purchase invoice record from a vendor invoice received as an electronic document from the OCR service. The procedure is the same when you create, for example, a general journal line from an expense receipt or a sales return order from a customer.

Note

The Description and No. fields on the created document lines will only be filled if you have first mapped text found on the OCR document to the two fields in Business Central. You can do this mapping as item references, for document lines of type Item. For more information, see Use Item References. You can also use the Text-to-Account Mapping function. For more information, see Map text on an incoming document to a specific vendor, G/L, or bank account.

  1. Select the line for the incoming document, and then choose the Create Document action.

A purchase invoice will be created in Business Central based on the information in the electronic vendor document that you received from the OCR service. Information will be inserted in the new purchase invoice based on the mapping that you've defined as a reference or as text-to-account mapping.

Any validation errors, typically related to wrong or missing data in Business Central, will be shown on the Errors and Warnings FastTab. For more information, see Handle errors when receiving electronic documents.

To map text on an incoming document to a specific vendor account

For incoming documents, you typically use the Map Text to Account action to define that a certain text on a vendor invoice received from the OCR service is mapped to a certain vendor account. Going forward, any part of the incoming document description that exists as a mapping text means that the Vendor No. field on resulting document or journal lines of type G/L Account are filled with the vendor in question.

In addition to mapping to a vendor account or G/L accounts, you can also map text to a bank account. This option is useful, for example, for electronic documents for expenses that are already paid, and for which you want to create a general journal line that is ready to post to a bank account.

  1. Select the relevant incoming document line, and then choose the Map Text to Account action. The Text-to-Account Mapping page opens.

  2. In the Mapping Text field, enter any text that occurs on vendor invoices that you want to create purchase documents or journal lines for. You can enter up to 50 characters.

  3. In the Vendor No. field, enter the vendor that the resulting purchase document or journal line will be created for.

  4. In the Debit Acc. No. field, enter the debit-type G/L account that will be inserted on resulting purchase document or journal line of type G/L Account.

  5. In the Credit Acc. No. field, enter the credit-type G/L account that will be inserted on resulting purchase document or journal line of type G/L Account.

    Note

    Do not use the Bal. Source Type and Bal. Source No. fields in connection with incoming documents. They are used for automatic payment reconciliation only. For more information, see Map Text on Recurring Payments to Accounts for Automatic Reconciliation.

  6. Repeat steps 2 through 5 for all text on incoming documents that you want to automatically create documents for.

To handle errors when receiving electronic documents

  1. On the Incoming Documents page, select the line for an electronic document received from the OCR service with errors, indicated by the Error value in the OCR Status field.
  2. Choose the Edit action to open the Incoming Document page.
  3. On the Errors and Warnings FastTab, select the message, and then choose the Open Related Record action.
  4. The page that contains the wrong or missing data, such as a vendor card with a missing field value, opens.
  5. Correct the error or errors as described in each error message.
  6. Proceed to process the incoming electronic document by choosing the Create Manually action again.
  7. Repeat steps 5 and 6 for any remaining errors until the electronic document can be received successfully.

To train the OCR service to avoid errors

Because OCR is based on optical recognition, the OCR service can wrongly interpret characters in your PDF or image files when it first processes documents from a certain vendor, for example. It may not interpret the company logo as the vendor's name or it may misinterpret the total amount on an expense receipt because of its layout. To avoid such errors going forward, you can correct data received by the OCR service and then send the feedback to the service.

The OCR Data Correction page, which you open from the Incoming Document page, shows the fields from the Financial Information FastTab in two columns, one with the OCR data editable and one with the OCR data read-only. When you choose the Send OCR Feedback button, the content of the OCR Data Correction page is sent to the OCR service. Next time the service processes PDF or image files that contain the data in question, your corrections will be incorporated to improve the document recognition.

  1. Choose the Lightbulb that opens the Tell Me feature. icon, enter Incoming Documents, and then choose the related link.
  2. Open an incoming document record that contains data received from the OCR service that you want to correct.
  3. On the Incoming Document page, choose the Correct OCR Data action.
  4. On the OCR Data Correction page, overwrite the data in the editable column for each field that has an incorrect value.
  5. To undo corrections that you have made since you opened the OCR Data Correction page, choose the Reset OCR Data action.
  6. To send the corrections to the OCR service, choose the Send OCR Feedback action.
  7. To save the corrections, close the OCR Data Correction page.

The fields on the Financial Information FastTab on the Incoming Document page are updated with any new values that you entered in step 4.

See also

Create Incoming Document Records Create Incoming Document Records Directly from Documents and Entries Incoming Documents
Purchasing
Work with Business Central

Find free e-learning modules for Business Central here