All posts · OIC Integrations

XSLT Mapping in OIC: Techniques That Actually Scale

Beyond drag-and-drop field mapping — how to use XSLT functions, conditional logic, and custom transformations to handle real-world data complexity in OIC.

Anurag Jangra · January 24, 2026 · 8 min read · ... views

Most OIC tutorials show the happy path: drag a source field, drop it on a target, done. Real enterprise integrations involve conditional logic, string manipulation, date conversions, and lookups that can’t be handled by simple field-to-field mapping. Here’s how to handle them.

Understanding the OIC mapper

OIC’s mapper generates XSLT 2.0 under the hood. Everything you do in the visual mapper translates to XSLT — which means anything you can write in XSLT 2.0 is available to you, even if the visual builder doesn’t expose it directly.

You can switch to “Code” view in the mapper to write or inspect the raw XSLT. This is invaluable for complex transformations.

Conditional mapping with xsl:if and xsl:choose

<xsl:choose>
  <xsl:when test="$source/status = 'ACTIVE'">
    <status>A</status>
  </xsl:when>
  <xsl:when test="$source/status = 'INACTIVE'">
    <status>I</status>
  </xsl:when>
  <xsl:otherwise>
    <status>U</status>
  </xsl:otherwise>
</xsl:choose>

Use this for status code translations — one of the most common mapping requirements in ERP integrations.

String functions you’ll use constantly

  • fn:concat() — combining fields (full name from first + last)
  • fn:substring() — extracting fixed-width substrings from legacy formats
  • fn:translate() — character-level replacements
  • fn:normalize-space() — trimming whitespace from incoming data
  • fn:upper-case() / fn:lower-case() — normalising case before comparison

Date format conversion

Fusion ERP expects ISO 8601 dates. Legacy systems often send DD/MM/YYYY. Convert using:

<xsl:value-of select="
  concat(
    substring($inDate, 7, 4), '-',
    substring($inDate, 4, 2), '-',
    substring($inDate, 1, 2)
  )"/>

Using OIC lookup tables in mappings

Reference lookup tables directly in your mapper using the lookupValue() function. This keeps your transformation logic in the mapper, not buried in a database query:

lookupValue("CurrencyMap", "SourceCode", $source/currencyCode, "FusionCode", "USD")

The last parameter is the default value if no match is found — always provide one.

Performance tip

Avoid calling lookup functions inside a loop on large payloads. Pre-load lookup values into a variable before the loop and reference the variable inside it.

Think Beyond the Implementation

Questions worth sitting with after reading this

01

Why is this architecture appropriate for this specific context — and where would it be the wrong choice?

02

What assumptions did we make that aren't stated explicitly? What happens if those assumptions are wrong?

03

What would break first if the requirements changed — volume doubled, a third system was added, or the deadline halved?

04

What alternatives did we reject, and why? Was the decision made on evidence — or habit?

AJ
Anurag Jangra
Oracle Cloud PaaS Consultant · OIC & VBCS Specialist

4.5+ years delivering enterprise Oracle Cloud integrations and VBCS applications across manufacturing, IT services, and financial sectors. OCI Certified — writes about real-world OIC, VBCS, SQL, and BI Publisher patterns from production experience.

Chat on WhatsApp