The custom Mapping Rules editor enables you to use graphical mappings to define how the connector transforms data.
Field mapping
The simplest way to create a mapping rule is to create a field mapping by dragging and dropping a field from the source system to the target system.
Constant
Use constant values to map fields that are required in your target system but are not present in your source system.
Value map
Use a value map when you want to substitute values. Here's an example:
Custom XSLT snippets
Additional features
- Default values: For a field that is likely to change, it's a good idea to provide a fallback mapping -- when the connector does not know how to map a certain field value, it uses the fallback value instead. For example, when a user id is not known, map it to a default user. By using default values, you'll avoid artifacts failing to ship.
- Conditions: Use if-else filters for fields that you want transformed only under certain conditions. For example, you might want to map a field only if it does not contain an empty value.
- Top level attributes: Experiment with top level attributes. Let's say you want to update but not create new attributes. You could use a value map (with a default value) for the artifactAction attribute that outputs "ignore" for all values except "update".
Tip: Don't map fields that you do not want to override. If you don't map a
field, the connector will not change its value. Make sure that you do map all
required fields -- otherwise, you will not be able to create new artifacts.