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 formatsfn:translate()— character-level replacementsfn:normalize-space()— trimming whitespace from incoming datafn: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.