ai integration

Bring AI to PowerBuilder

AI Integration for PowerBuilder

Integrate AI features via APIs + JSON — and surface results inside PowerBuilder DataWindows.

We help enterprises add real AI capabilities to existing PowerBuilder applications using secure REST APIs and JSON payloads — without destabilizing the core system. From OCR/document intelligence to classification and decision support, we integrate AI into the workflows users already rely on.

Why

Why AI integration is practical for legacy PB apps

PowerBuilder does not need to “become AI.” It only needs a reliable way to consume AI services. With REST + JSON support, PB apps can call AI endpoints and display outcomes in existing DataWindows and workflows.

Faster outcomes

Add AI features without rewriting your application — integrate via APIs and return structured JSON results.

🛡 Controlled risk

We keep AI “outside” the core system via a gateway pattern, so models can evolve without breaking PB logic.

📊 UI-first adoption

Users see AI suggestions directly inside PowerBuilder DataWindows with confidence and audit-friendly metadata.

How

How we integrate AI into PowerBuilder

A simple, dependable pattern: PB calls an API endpoint, receives JSON, parses it, and pushes the result into DataWindows. We prefer an internal “AI Gateway” so security and model changes are centralized.

1

Design the contract

Define request/response JSON that fits your DataWindow columns, including confidence, source, and timestamps.

2

PB calls the API

Use PowerBuilder HTTP client calls with correct headers (content-type, auth token, etc.).

3

Parse & reshape JSON

Use JSONParser/JSONPackage to extract the required fields or reshape into a DataWindow-friendly array format.

4

Load into DataWindows

Import JSON into DataWindows/DataStores and enable human review → save → continue workflow.

🔒 Recommended architecture

  • PB → AI Gateway → AI provider (best for security)
  • Hide API keys and provider complexity from desktop clients
  • Consistent JSON schema for DataWindows
  • Central logging, throttling, caching, and model switching

PowerBuilder can also call provider APIs directly, but the gateway approach is more robust for enterprise governance.

// Pattern (conceptual): HTTPClient → GetResponseBody → JSONPackage/ImportJson
httpclient lc = create httpclient
lc.SetRequestHeader("Content-Type", "application/json")
// lc.SetRequestHeader("Authorization", "Bearer <token>")
if lc.SendRequest("POST", "https://your-ai-gateway/api/ocr") = 1 and lc.GetResponseStatusCode() = 200 then
  string ls_json
  lc.GetResponseBody(ls_json)
  // reshape/extract if needed; then import into DataWindow
  dw_1.ImportJson(ls_json)
end if
destroy lc
Real projects

Recent AI integrations delivered

Two examples of how AI becomes a practical feature inside PowerBuilder — integrated into workflows, not bolted on.

Project 1 — OCR integration for logistics
Document AI
What we integrated

OCR / document intelligence to read multi-language documents, different templates, and handwritten fields.

How it worked in PB

Extracted JSON fields were mapped and pushed into PowerBuilder DataWindows for review, correction, and downstream processing.

Key outcomes

Faster data entry, fewer manual errors, and consistent extraction across document variants.

Why it was safe

The AI layer stayed behind an API contract; PB continued using existing workflows and validations.

Project 2 — AI profiling for waste categorization
Classification
What we integrated

AI profiling strategy to classify waste profiles (e.g., hazardous vs non-hazardous) with confidence signals.

How it worked in PB

The API returned structured JSON categories and confidence; PowerBuilder displayed suggestions inside DataWindows for user confirmation.

Key outcomes

More consistent categorization and faster processing while keeping human override and auditability.

Governance

Centralized model updates in the gateway without changing PB client behavior or redeploying frequently.

FAQ

Common questions

Focused on what’s possible in PowerBuilder and how to keep it enterprise-safe.

Yes. PowerBuilder supports HTTP requests and JSON parsing/generation. We implement a stable JSON contract so responses map cleanly to DataWindows and business flows.
No. We recommend an AI Gateway/middleware that stores keys securely server-side, applies policies, and provides a consistent API surface to PowerBuilder.
Yes. We shape the JSON response so it can be imported or mapped into DataWindow rows/columns. Users can review, correct, and continue existing workflow steps.
Keep model logic in the gateway. PowerBuilder calls the same endpoint contract while the gateway updates prompts/models, adds caching, and improves observability.
Ready to Integrate AI into PowerBuilder?
Share your use case — OCR, classification, recommendations, summarization — and we will propose the right API contract, gateway approach, and DataWindow mapping plan.
📧 pb.solutions@optisol.us 📞 +1 412 406 9010
Or fill out the form — we respond within 1 business day.