Setting Default Values in the Mapper

You may have scenarios in which you need to set some fields to default values. The mapper contains a set of functions (for example, the when function available under Mapping Components > XSL Elements) that you can use to set default values.

For example, the following payload is sent to Oracle Sales Cloud from Oracle Integration Cloud.

In the payload for the conflictID, you can set the default value in the mapper using the when function.

<xsl:when test="nssrcmpr:process/oppourtinity/confictID">  
  <xsl:value-of select = '/nssrcmpr"process/oppourtinity/confictID">  
  <xsl:otherwise/>  1000

This syntax checks if the <opp:conflictID> node is present in the payload. If so, it assigns that value. Otherwise, it adds the default value, which in this case is 1000 .