Type Maps
A type map is a mapping of key value pairs that enables a translator to map values from a source type in one system to a target type in another system. See the Type map scenario example below for more information.
The Type Maps page is where you can view and add your type maps.
On the Type Maps page, view the list of type maps.
Search for a type map
On the Type Maps page, you can search for a specific type map using the default search fields.
In the top right corner of the page, select Create Type Map.
In the Create Type Map dialog box, enter the type map information, and select Create.
Add a source value and a target value in the type map.
See the "New Type Map Field Descriptions" below for more information about the type map fields.
New Type Map Field Descriptions
Field | Description |
---|---|
Name | A relevant name that should ideally contain the name of the sending trading partner and the receiving trading partner. |
Key | A name that describes the value being mapped and passed into the type map. |
Type map scenario example
Note
To use a type map in a translator, you must first associate it with the translator.
Ligune Logistics (LL) and Waterside Widgets (WW) are integrated trading partners in X1.
LL must send a rate request to WW. The rate request contains weight totals for the freight.
LL's internal system processes weight units as lbs.
WW's internal system processes weight units as pounds.
LL creates a type map to convert from lbs to pounds in rate requests that LL sends to WW.
LL enters the following type map name: Ligune to Waterside Weight Unit
Here's a breakdown of the type map name:
LIGUNE_RATE_REQUEST is the "from" type.
WATERSIDE_WEIGHT_REQUEST is the "to" type.
weightUnit is the type key (value) that's being mapped. and passed into the type map.
LL also enters the following type key: weightUnit.
After the type map is created, LL goes to the type map's Type Map Details page.
On the Map tab, LL adds the following source value and target value:
Source Value = lbs
Target Value = pounds
LL's script calls the type key weightUnit and passes in the source value lbs.
Note
In the integration message flow that LL creates with WW, the translator will reference this type map to convert the source value lbs to the target value pounds.
When you edit a type map, you can do one or more of the following:
Rename the type map
Rename the type key
Add or remove a default value
Allow or disallow unmapped keys
Add or delete source values and target values
View or edit translators associated with the type map
Select in the Name field, and edit the type map name.
In the top right corner of the page, select Save.
The translator uses the type key to reference the type map.
You can also use the type key when writing scripts to pass a source value into the type map (such as pounds) to get out the target value lbs.
Select in the Type Key field, and edit the type key name.
In the top right corner of the page, select Save.
This is an optional value to prevent the mapping from failing because the source value isn't found in the type map.
Select in the Default Value field, and add or remove a default value.
In the top right corner of the page, select Save.
Default value scenario example
Ligune Logistics (LL) and Waterside Widgets (WW) are integrated trading partners in X1.
LL must send a rate request to WW. The rate request contains weight totals for the freight.
LL's internal system processes weight units as lbs.
WW's internal system processes weight units as pound.
LL creates a type map to convert between lbs and pounds in rate requests that LL sends to WW.
LL also enters the following key name: weightUnit.
After the type map is created, LL goes to the type map's Type Map Details page.
On the Map tab, LL adds the following:
Source Value = lbs
Target Value = pounds
Default Value = misc
LL's script calls the type key weightUnit and passes in the incorrect source value lb instead of the correct source value lbs.
The default value misc will become the source value to prevent the mapping from failing.
Note
In the integration message flow between LL and WW, the translator (add a cross reference to the Components > Translators page) will reference this type map to convert the incorrect source value lb to the target value pounds based on the default value misc.
This option is a boolean value indicating whether to allow keys that aren't found in the type map.
If you select Yes, whatever unlisted source value that gets passed in will come through.
On the Allow Unmapped Keys? option, select Yes or No.
In the top right corner of the page, select Save.
Unmapped keys scenario example
Allow Unmapped Keys? = Yes
Ligune Logistics (LL) and Waterside Widgets (WW) are integrated trading partners in X1.
LL must send a rate request to WW. The rate request contains weight totals for the freight.
LL's internal system processes weight units as lbs.
WW's internal system processes weight units as pound.
LL creates a type map to convert between lbs and pounds in rate requests that LL sends to WW.
LL also enters the following key name: weightUnit.
After the type map is created, LL goes to the type map's Type Map Details page.
On the Map tab, LL adds the following:
Source Value = lbs
Target Value = pounds
LL's script calls the type key weightUnit and passes in the incorrect source value lb instead of the correct source value lbs.
Note
In the integration message flow between LL and WW, the translator (add a cross reference to the Components > Translators page) will reference this type map to convert the incorrect source value lb to the target value pounds based on Allow Unmapped Keys? = Yes.
In this example scenario, if Allow Unmapped Keys? = No then the mapping will fail, unless a default value is specified.
Source Value = The value that the sending trading partner uses for a specific unit. For example,lbs for the weight unit.
Target Value = The value that the receiving trading partner uses for a specific unit. For example, pounds for the weight unit.
Note
In an integration flow, the translator (add a cross reference to the Components > Translators page) references the type map to convert the source value to the target value.
Select Add Entry. A new row displays in the table.
Enter a source value and a target value.
Note
You can also upload one or more source value and target value pairs using a CSV file to avoid manually entering each one.
Next to the Add Entry button, select the drop-down arrow, and select Upload. The Upload CSV dialog box displays.
Drag and drop the CSV file, or browse to it by selecting Choose.
Select Upload.
In the top right corner of the page, select Save.
Next to the Add Entry button, select the drop-down arrow, and select Download. The CSV file is saved in your default location for file downloads.
You can delete the source and target values one at a time or all at once:
Select
next to a key value pair.
Select Clear Entries to delete all the source and target values.
In the top right corner of the page, select Save.
You can view a list of all the translators that a type map is used in.
You can also edit any translators in the list.
Select the Translators tab.
Select a translator name. The Translator Message Details page displays in another browser tab so you can edit the information.
If you want to create a new type map, and all or most of its information will be the same as a current type map, you can clone the current type map. Cloning is a convenient way to avoid entering the same type map information multiple times.
Next to a type map, select
. The Type Map Details page displays for the type map clone.
Enter the type map information. See Edit a Type Map for more information.
Next to a type map, select
. The Delete Type Map dialog box displays.
Select Delete.