Automation + Embedded Mode

Let's look at a case where you wish to use Rossum in Embedded Mode while having the Automation setting enabled. While we covered both cases in detail in other guides, combining the two may require some additional creativity.


Re-uploading the same document twice

You might be tempted to re-upload documents if they didn't meet the Automation requirements. It is a bad practice, and you should avoid it. You can always work with documents that are in the Rossum system already through our API.

1. Set Up The Automation Criteria

First of all, we need to have a Queue with working Schema. See First Configuration Steps.

Once you have your Queue ready, you can go into its settings in the Rossum app and set Automation Level and Default Score Threshold. We won't discuss this setting in-depth here since we already covered this step in the Data Capture Automation with Rossum guide.


Remember, that you can also add your custom criteria by introducing a connector. It can contain any business logic and can effectively prevent any document from being automatically exported in case of doubt. See Implementing Custom Rules for Automation in Rossum

2. Start Uploading Documents to Rossum

Your Rossum account should be ready for your documents now. There are many different ways how you can send your documents to Rossum. The most common way is to use our API. For guidance, refer to Uploading Documents in Rossum API.

3. List Documents in Your ERP System

Now let's get to the core of this article. To display a list of documents, you can use our List all annotations API. The query would look something like this:

GET /v1/annotations?queue=123&status=to_review,exported

This query will get you a list of Annotation objects, that are in status "to_review" or "exported". That will correspond to those annotations that were exported automatically via Automation settings (exported) and those that for some reason need users' assistance.

4. Retrieve/Extract Document Data

Here we have 2 kinds of documents.

Exported documents are ready to go, you can just call the Export annotations for each to retrieve the data.

To Review documents, however, require users' validation. That's where you can add a button "Open in Rossum' to your app, which will call /start_embedded endpoint.


Embedded Mode

For more info about embedded mode check out Rossum Embedded in Other Apps.

Once the user completes the document validation (by clicking the "Confirmed" button), the document will temporarily change its status to "exporting", enabling any connector to do its business. Finally, the document transitions to the final state "exported".

At this point, given the list in your ERP system was a refreshed, captured data can be retrieved just like with any other "exported" document.