Configuring XML templates for the IBM Master Data Management migration proxy service
In the IBM Master Data Management migration proxy service, XML templates define field-level mappings between IBM Master Data Management JSON data and InfoSphere MDM XML responses. Each template corresponds to a business object and specifies how to transform IBM Master Data Management record attributes into InfoSphere MDM XML elements.
XML templates enable the proxy service to:
- Map IBM Master Data Management field names to InfoSphere MDM element names
- Transform IBM Master Data Management JSON paths to XML structure
- Handle static values and computed fields
Template files are autogenerated based on InfoSphere MDM metadata.
Template naming conventions
Template file names must match the business object name exactly. Use the following format:
TCRM{EntityName}BObj.xml
Examples:
TCRMPersonBObj.xml- Person business object templateTCRMContractBObj.xml- Contract business object templateTCRMAddressBObj.xml- Address business object template
Template structure
Each XML template uses a simple structure where the root element matches the business object name and child elements define field mappings:
<TCRMBobjName>
<FieldName>jsonpath.to.field</FieldName>
<AnotherField>jsonpath.to.another.field</AnotherField>
<!-- More field mappings -->
</TCRMBobjName>
Key elements
- Root element: Must match the business object name exactly
- Field elements: InfoSphere MDM field names as XML elements
- Field values: JSONPath expressions or static values that reference IBM Master Data Management data
Field mapping
A field mapping connects an InfoSphere MDM field name to its IBM Master Data Management data source using JSONPath expressions.
Basic field mapping
The following example maps the InfoSphere MDM DisplayName field to the IBM Master Data Management display_name attribute:
<DisplayName>record.attributes.display_name.value</DisplayName>
Components:
- Element name: InfoSphere MDM field name (
DisplayName) - Element value: JSONPath to IBM Master Data Management field (
record.attributes.display_name.value)
Nested field mapping
For nested objects in IBM Master Data Management, use dot notation to navigate the JSON structure:
<NestedField>record.attributes.nested_obj.field_name</NestedField>
Direct attribute mapping
Some fields map directly to record attributes without additional nesting:
<RecordId>record.attributes.record_id</RecordId>
JSONPath expressions
Templates use JSONPath-like expressions to navigate IBM Master Data Management JSON structure. These expressions define the path from the root record object to the target field.
Basic path syntax
A basic path references a field within the record attributes:
<FieldName>record.attributes.field_name</FieldName>
Nested path syntax
For nested objects, chain multiple levels with dots:
<NestedField>record.attributes.parent_obj.child_obj.field_name</NestedField>
Value extraction
Most IBM Master Data Management attributes store values in a value property. Include .value at the end of the path to extract the actual data:
<FirstName>record.attributes.first_name.value</FirstName>
Static value mapping
Static values are prefixed with an exclamation mark (!) to distinguish them from JSONPath expressions:
<PartyType>!P</PartyType>
<EntityCategory>!STANDARD</EntityCategory>
<DefaultValue>!DEFAULT</DefaultValue>
Common use cases
Static values are typically used for:
- Type indicators: Values like
!Pfor Person or!Ofor Organization - Default values: Predefined values required by InfoSphere MDM
- Constant values: Fixed values that don't vary by record
Template scope
Each template defines mappings for a single business object. Nested business objects require separate templates.
Single business object templates
Each business object has its own template file:
TCRMPersonBObj.xml- Person fields onlyTCRMPersonNameBObj.xml- Person name fields onlyTCRMAddressBObj.xml- Address fields only
Nested business object handling
When a business object contains nested business objects, the proxy service:
- Processes the parent business object template
- Identifies nested business objects in the response structure
- Applies the appropriate template for each nested business object
- Assembles the complete XML hierarchy
Validation rules
Templates must conform to the following rules:
- Root element: Must match the business object name exactly
- Well-formed XML: Must be valid XML with properly closed tags
- Optional fields: All fields in templates are optional. If IBM Master Data Management doesn't have the field, it's omitted from the response.
Template examples
Example: Person business object template
This example shows a template for the Person business object with basic person attributes:
<TCRMPersonBObj>
<PartyId>record.attributes.record_id</PartyId>
<PartyType>!P</PartyType>
<DisplayName>record.attributes.display_name.value</DisplayName>
<FirstName>record.attributes.first_name.value</FirstName>
<LastName>record.attributes.last_name.value</LastName>
<BirthDate>record.attributes.birth_date.value</BirthDate>
<Gender>record.attributes.gender.value</Gender>
</TCRMPersonBObj>
Example: Address business object template
This example shows a template for the Address business object with address components:
<TCRMAddressBObj>
<AddressId>record.attributes.address_id</AddressId>
<AddressLineOne>record.attributes.address_line_1.value</AddressLineOne>
<AddressLineTwo>record.attributes.address_line_2.value</AddressLineTwo>
<City>record.attributes.city.value</City>
<StateProvince>record.attributes.state_province.value</StateProvince>
<PostalCode>record.attributes.postal_code.value</PostalCode>
<Country>record.attributes.country.value</Country>
<AddressType>record.attributes.address_type.value</AddressType>
</TCRMAddressBObj>
Example: Template with static values
This example shows a template that combines JSONPath expressions with static values:
<TCRMOrganizationBObj>
<PartyId>record.attributes.record_id</PartyId>
<PartyType>!O</PartyType>
<EntityCategory>!STANDARD</EntityCategory>
<OrganizationName>record.attributes.organization_name.value</OrganizationName>
<TaxId>record.attributes.tax_id.value</TaxId>
<IndustryCode>record.attributes.industry_code.value</IndustryCode>
</TCRMOrganizationBObj>
Example: Template with nested paths
This example shows a template that uses nested JSONPath expressions to access deeply nested data:
<TCRMContactMethodBObj>
<ContactMethodId>record.attributes.contact_method_id</ContactMethodId>
<ContactType>record.attributes.contact_type.value</ContactType>
<ContactValue>record.attributes.contact_details.value.contact_value</ContactValue>
<IsPrimary>record.attributes.contact_details.value.is_primary</IsPrimary>
<PreferredContactTime>record.attributes.preferences.preferred_time.value</PreferredContactTime>
</TCRMContactMethodBObj>
Learn more
- Migrating data into IBM Master Data Management
- Enabling proxy communication
- Configuring additional transactions for the migration proxy service
- Configuring mapping for the migration proxy service
- Configuring properties for the migration proxy service
- Configuring query logic for the migration proxy service