How to confirm a form is actually an invoice with analyze invoice (forms recognizer)

SKT 141 Reputation points
2021-07-01T03:54:20.24+00:00

Hi

I am using logic apps "Forms Recognizer" with the "Analyze Invoice" version 2.1 action to analyze invoice attachments that are sent to an email address.

It works fine, but sometimes we received emails with attachments that are not invoices.

How can I say:

Analyze Invoice...

If is an invoice, do something

if not an invoice do something else

??

This question would equally apply to Analyze ID or Analyze Business Card etc.

Thanks, sos

Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
2,901 questions
Azure AI Document Intelligence
Azure AI Document Intelligence
An Azure service that turns documents into usable data. Previously known as Azure Form Recognizer.
1,445 questions
0 comments No comments
{count} votes

Accepted answer
  1. MayankBargali-MSFT 69,581 Reputation points
    2021-07-01T05:24:06.923+00:00

    Hi @SKT

    Welcome to Microsoft Q&A! Thanks for posting the question.

    Based on the response from your action of Form Recognizer you can use create conditional statement that control workflow action in logic app.

    Update 7/5:
    The Analyze Invoice action returns InvoiceAnalyzeOperationResult which has multiple properties and analyzeResult property is one of the response with this output.
    Behind the scene logic app uses the form recognizer API and returns the response. I have tested with the sample input and I don't see any field that can mapped directly for your scenario. There is no functionality to confirm confidence score from the service perspective. For form recognizer perspective it is basically a form where you are training a custom model for a particular form type. It will simply extract fields and provide an output in JSON. The analyze invoice is a prebuilt model to extract certain fields it has been trained on.

    Basically if you are receiving fake invoices the processed data from the API should be validated in your application. It is easy to fake a format and send a similar form but your apps needs to validate this.

    From logic app perspective there are no connectors that can help in validating fake invoices.

    Please feel free to raise a feature request on UserVoice to support it, if this is something that you would want to see in form recognizer.

    Feel free to get back to me if you have any queries or concerns.

    Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.


0 additional answers

Sort by: Most helpful