Integrations and Service Exchange

One normalization layer instead of every team's workaround

External system integration and REST response normalization

1 layer normalizing an external API for every consumer

The problem

Consumers of an authoritative external data source were each implementing independent handling for the same response defects.

What we built

  • A layered architecture separating API communication, data normalization and downstream processing
  • A dedicated Script Include executing calls through the RESTMessageV2 framework, validating HTTP status codes and returning normalized JSON
  • A normalization engine absorbing the response defects so no consumer has to handle them
  • Recursive processing, so nested structures normalize to the same contract as top-level ones
  • A coordinated flow storing the normalized response as a snapshot, then distributing it across target tables with referential integrity maintained

Issues resolved

  • Every consumer of this data was writing its own defensive code against the same defects, and getting it subtly different. The API returns JSON generated from XML-based backends, so single records arrive as objects while multiple records arrive as arrays — normalized to consistent arrays so iteration is safe regardless of record count.
  • Null values throughout the responses caused runtime errors in string operations; converted to empty strings at the normalization layer.
  • Empty values arrived as literal quote characters, and real values came wrapped in unnecessary quotes — both stripped before storage.
  • Code values returned in extended format and had to be translated to the formats the platform expected.
  • The REST Message sat in global scope while the integration ran inside a scoped application, requiring deliberate cross-scope access handling.

Outcome

Reliable real-time access to authoritative external data, with response inconsistencies absorbed by one normalization layer instead of leaking into every consumer.