Use AI to read credit report in efolder and push credit report generation date to field 5040 in encompass

Creating an Encompass plugin that reads a PDF from the eFolder, uses AI to detect the Credit Report generation date, and writes that date to Field 5040 involves a combination of:

  • Encompass Plugin SDK / API

  • PDF parsing (AI/NLP or regex for credit reports)

  • Integration with an OCR/AI engine

  • Writing values to loan fields

Overview of Steps:

1. Access the PDF document in eFolder

You’ll need to:

  • Use the Encompass SDK (or Encompass Web Services API if external)

  • Enumerate or search for the document named e.g. Credit Report

  • Download the PDF to a temporary local path

C# code

// Example (inside Encompass plugin)
var docService = EncompassApplication.Session.Loans.Current.Loan.Documents;
var creditDoc = docService.FirstOrDefault(d => d.Title.Contains(“Credit Report”));

if (creditDoc != null)
{
string tempPath = Path.Combine(Path.GetTempPath(), creditDoc.Title + “.pdf”);
creditDoc.SaveToFile(tempPath);
// Now tempPath contains the PDF
}

2. Extract the text from PDF using OCR/AI

Use a .NET-compatible PDF OCR/AI library like:

  • Tesseract.NET – open-source OCR

  • IronOCR – commercial, better for structured data

  • Azure Cognitive Services / AWS Textract – if calling external AI

  • PDFPig / iTextSharp / PdfSharp – for structured PDFs (non-image)

C# code

// Example using IronOCR (you need to add IronOcr NuGet package)
var Ocr = new IronTesseract();
using (var input = new OcrInput(tempPath))
{
var result = Ocr.Read(input);
string creditText = result.Text;
}

3. Parse the text to find credit report generation date

You can use regex or AI/NLP logic like:

// Example: try to find date patterns
string pattern = @”Report Date[:\s]+(\d{1,2}/\d{1,2}/\d{2,4})”;
Match match = Regex.Match(creditText, pattern);
if (match.Success)
{
string reportDate = match.Groups[1].Value;
// Convert to Encompass format (MM/dd/yyyy)
}

If OCR isn’t accurate or patterns are inconsistent, consider using an LLM-based local model or Azure OpenAI to extract date info.

Loan loan = EncompassApplication.Session.Loans.Current;
loan.Fields[“5040”].Value = reportDate;

Deployment Considerations

  • Package the plugin as .empkg or .dll

  • Ensure field 5040 is writable and not locked by rules

  • Optionally run on a button click or on loan open

  • Handle multiple credit reports (old vs new)

Security & Permissions

  • Plugin must run in context of user with permissions to:

    • Read eFolder documents

    • Update field 5040

  • Make sure antivirus allows temp file OCR

AI Model Enhancement Ideas

  • Fine-tune a GPT or T5 model to extract date from unstructured credit text

  • Use named entity recognition for DATE entities

  • Or leverage a few-shot prompt to extract report dates

 

 

Please let me know if you want complete details.

You may also like...

Popular Posts

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.