37
Views
22
Comments
Solved
Auto fill form inputs after document upload using AI agent in ODC

Hi Everyone,

 I’m working on a use case in an OutSystems Developer Cloud (ODC) application where a customer uploads a document (for example, an ID proof, invoice, or any supporting document). Once the document is uploaded, it should be processed by an AI/ML service to extract key information, and then the extracted data should automatically populate the corresponding fields in a form. After reviewing the pre-filled form, the customer will be able to submit it. 

I’m looking for guidance on how to implement this end‑to‑end flow in ODC. Could someone suggest the step-by-step approach, best practices, or recommended integrations/tools to achieve the following?

1) Uploading documents in an ODC app 
2)Sending the file to an AI model for document reading (OCR / metadata extraction) 
2)Receiving the AI output and mapping it back to form fields 
4)Auto‑filling the form with the extracted data
5) Allowing the customer to review and submit the form 

If you have examples, architecture patterns, or references related to AI-assisted data extraction in ODC, that would be very helpful. 

Thanks in advance for your support!

2018-12-10 12-16-21
Goncalo Duarte Almeida
Solution

Hello @Ajit Kurane 

Here is the oml from agent, from app and also the image used to test.

It's a fake card generated by IA.

AI Extraction.oml
Extract Info App.oml
fakeId.png
2018-12-10 12-16-21
Goncalo Duarte Almeida
Solution

Hello @Ajit Kurane 

Here is the oml updated and also the pdf tested.

fakeId.pdf
Extract Info App.oml
2025-04-17 05-42-16
Ajit Kurane

Thanks

2025-04-17 05-42-16
Ajit Kurane

Hi All,

I have implemented the above use case using AI agent but getting the below error and getting blank response from the AI model.

OS-BERT-00000 - Failed to call AI model. Status code: BadRequest. The Unknown Provider AI model provider returned this message: "You passed in model=a42ec97a-540c-49cc-a988-12af7129a9a5. There are no healthy deployments for this model." (OS-ABRS-FM-40001).

Please check the implemented agentic flow in the oml as well and guide on the same if anything is missing into the implementation.

Thanks in advance.

Document Scan Agent.oml
2026-01-28 16-57-48
Mihai Melencu
Champion

Hi,

Last time I encountered this issue, it was caused by an outdated initial deployment of the model. The solution was to delete the model and add it again. If you’re using trial models, this approach should work as well.

If you run into any issues, feel free to let us know.

2025-04-17 05-42-16
Ajit Kurane

Hello Mihai,

I did the same and tried but still getting the similar issue.

And have you looked at the code into the OML file ? 

Anything I am missing in the implementation?

Please let me know if any changes are needed into the implementation and the best way to implement the same.

Thanks,

Ajit Kurane 


2026-01-28 16-57-48
Mihai Melencu
Champion

I'm unable to open the file. But the error is not due to your implementation, is an issue with the AI Model you are using. What model you are using? 

2026-01-28 16-57-48
Mihai Melencu
Champion

Can you test the model to see if you get the same error? 

2025-04-17 05-42-16
Ajit Kurane

Have tested model and there it's working. But there binary data we cannot pass I believe. Using test input it's returning output as customer name as I defined the same in output structure of the model. But when passing binary file through grounding data and build message functions it's not working as expected.

2025-04-17 05-42-16
Ajit Kurane

Do you have any sample demo oml of Agent which accept binary file and after scanning this binary file in output it gives text data from the binary file like Customer name from his identity card? It will help me to cross verify my implementation flow as well.

2018-12-10 12-16-21
Goncalo Duarte Almeida

I had a similar requirement, and the solution was to convert the binary data into text  before invoking the agent. After converting the binary to a text-based representation, the agent could be called without issues.

2025-04-17 05-42-16
Ajit Kurane

I was trying to retest now and getting below error in the logs,

OS-BERT-00000 - Failed to deserialize JSON to CustomerInfoList: Unexpected character encountered while parsing value: <. Path '', line 0, position 0. 


CustomerInfo is the output structure of AI model which I have added there.

Thanks.

2025-04-17 05-42-16
Ajit Kurane

I was trying to retest now and getting below error in the logs,

OS-BERT-00000 - Failed to deserialize JSON to CustomerInfoList: Unexpected character encountered while parsing value: <. Path '', line 0, position 0. 


CustomerInfo is the output structure of AI model which I have added there.

Thanks.

2018-12-10 12-16-21
Goncalo Duarte Almeida

It seems that the structure you're trying to deserialize does not match the CustomerInfoList definition. You should verify whether the JSON returned by the agent has the same schema as the CustomerInfoList structure you're deserializing into.

2025-04-17 05-42-16
Ajit Kurane

Could you please check in my OML and let me know where it's failing and if you have similar kind demo  agent app then please share here for reference.

2025-04-17 05-42-16
Ajit Kurane
2018-12-10 12-16-21
Goncalo Duarte Almeida

Can't Open the OML.

When I try to open in ODC gives this error


and if I try in O11

That's why in my comment I assume was built in O11.

2025-04-17 05-42-16
Ajit Kurane

I have converted binary data to text and implemented the same but now its giving blank output as customer name after reading document.

Please find the attached OML here if it is able to open or not.

File Reading Agent.oml
2018-12-10 12-16-21
Goncalo Duarte Almeida

I'm not able to open the OML file; it still throws the same error.

If the blank state is coming from the agent’s response, you may need to adjust the prompt so that it returns the expected data. If the agent is already returning the data correctly, try debugging the flow to identify where the data is being lost.

2018-12-10 12-16-21
Goncalo Duarte Almeida

Hello @Ajit Kurane 

The app where you're trying to consume the agent was built in OutSystems 11 (O11), and at the moment that scenario is not supported yet.

You currently have two alternatives:

  1. Build the app in ODC and consume the agent directly.
  2. If you want to keep consuming the agent from O11, you can expose a REST API in the agent app and then consume that API from your O11 application.
2025-04-17 05-42-16
Ajit Kurane

Hello Goncala,

I have developed this Agentic app into ODC itself and consumed this Agent into ODC web app.

There is one service action agent documentscan that I am using in the consumer app.


Thanks 

2018-12-10 12-16-21
Goncalo Duarte Almeida
Solution

Hello @Ajit Kurane 

Here is the oml from agent, from app and also the image used to test.

It's a fake card generated by IA.

AI Extraction.oml
Extract Info App.oml
fakeId.png
2018-12-10 12-16-21
Goncalo Duarte Almeida
Solution

Hello @Ajit Kurane 

Here is the oml updated and also the pdf tested.

fakeId.pdf
Extract Info App.oml
2025-04-17 05-42-16
Ajit Kurane

Thanks

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.