Types of Extension Interfaces
We offer three interfaces that extension microservices can use. Each API has a different purpose, feel, and characteristics, and you can even combine both APIs in a single microservice.
Webhooks
The three most common use cases for applying a custom logic are when you want to perform custom checks on annotation data, match the extracted data against a database, or save extracted data to another system.
In the first use case, when you could check or update the data, annotation data is sent to a predefined endpoint of your microservice. According to the check, you could show the user an error, warning, or info icon in the Rossum validation screen. Such checks could include validating the values format against your custom format requirements.
In the second use case, you may want to compare the extracted data such as a purchase order number or a vendor name against an existing database. When the data is matched, a field in Rossum will be prefilled with an ID that you can use to pair the document with its purchase order or the vendor easily.
The third use case is when you would like to take the reviewed data and save it to some other system, e.g., your accounting system. In such a case, the extracted data is sent to another predefined endpoint where some transformation usually must be done to send the data to the other system.
You can implement all the use cases above by using Webhooks. You can set up Webhooks for sending notifications about specific events from the Rossum app to the specified Webhook.
Read a guide about developing custom webhook or check out technical description of the webhook API in our reference documentation.
Serverless Functions
If implementing and maintaining Webhooks is too demanding, you can extend Rossum by using Serverless Functions. In a few minutes, you can write a piece of code that can:
- show users custom messages in the validation screen,
- compute missing values such as tax rate,
- send data to external systems.
Moreover, such code is run on Rossum's infrastructure and needs no maintenance from your side. Using the Functions is very easy to configure and deploy. However, you should still consider using Webhooks when building a larger-scale extension. If your extension requires database resources or contains so much code it should be versioned and split into several files, you should still choose the Webhooks interface.
For a high-level understanding of Serverless Functions, read our Help Center article.
For more technical details, read a developer guide.
Custom UI Extension
At Rossum, we are trying to make the validation screen as customizable as possible.
For now, Rossum has an option where you can add a custom button to the sidebar field panel of the validation screen. Such a button can open a pop-up browser window where you can reuse the extracted data from the document. Or you can use the button to trigger a custom check when using a webhook to validate the data.
Read a technical description of the custom UI API in our reference documentation.
Updated about 2 years ago