I introduced this topic in a previous post, but now to a concrete application of what was discussed. Here we have a scenario of documents being uploaded in a content management system. These documents could be purchase orders, invoices etc. and they need to be processed automatically, as much as possible. This post details how such could be implemented with OIC. I have added an extra step for human approvals, as this is often the case; there always are occasions where some documents need to be validated before further processing can take place. The graphic below illustrates the demo flow I have created. Documents are uploaded to a CMS. An OIC integration can be triggered each time a document is created, or else we could have an OIC scheduled job polling the CMS on a regular basis for new files.
The OIC integration passes the document to OCI AI-Vision. The latter parses the document, returning document type, key values etc. In my case, all invoices need to be approved by finance before being created in Netsuite. In my example I only implement the Invoice "route", but I'm sure we can all extrapolate from that.
As in the previous post, I am using OCI Object Storage as my "CMS". Naturally, in the real world, you would be using a proper CMS such as Oracle Content Management. Object Storage can emit an event - new object created - and this event can raise an OCI Notification, which results in an OIC integration being triggered. As mentioned above, OIC could also poll the CMS for new documents on a regular basis. The mechanics of setting up Object Storage -> Events Service -> Notification Service-> OIC are discussed in the previous post on this topic.
OCI AI Vision
OCI AI Vision Service has also been discussed in the previous post on this topic. Net, net, the service has a rich REST api you can leverage to analyze documents. Here is an example with my sample invoice.
First the invoice -
then the analysis -
The Response json is worth reviewing as this is what needs to be parsed in the OIC Integration.