🪟

Microsoft Dynamics 365 — Document Intelligence Integration

Integrate Cargoffer OCR with Dynamics 365 Finance and Supply Chain Management for automated invoice processing.

Overview

Dynamics 365 can consume OCR data via Power Automate. Cargoffer OCR provides a custom connector or direct HTTP action.

Power Automate Flow

1. Trigger: When a new email attachment arrives (invoice PDF)
2. Action: HTTP POST to Cargoffer OCR /api/upload
3. Action: Wait for analysis via /api/analyze/{job}
4. Action: Parse JSON → Create Dynamics 365 Vendor Invoice

C# Code (Console App)

csharp
using var client = new HttpClient();
client.DefaultRequestHeaders.Authorization =
    new AuthenticationHeaderValue("Bearer", "ocr_your_api_key");

var content = new MultipartFormDataContent();
content.Add(new ByteArrayContent(pdfBytes), "file", "invoice.pdf");

var upload = await client.PostAsync(
    "https://ocr.cargoffer.com/api/upload", content);
var job = await upload.Content.ReadFromJsonAsync<UploadResult>();

var analyze = await client.PostAsync(
    $"https://ocr.cargoffer.com/api/analyze/{job.Job}", null);
var result = await analyze.Content.ReadFromJsonAsync<OcrResult>();

// Create Dynamics 365 record
Console.WriteLine($"Invoice: {result.Results.First().InvoiceNumber}");

Ready to try it?

Start Free →