DimensionPointID Processing Instructions in Generic JSON

Values in Generic JSON for the same attribute in different languages could be represented using the same ID with an additional attribute stating the language. This normally causes a name collision in Generic JSON. However, Generic JSON can import such dimension-dependent data using the "[?DimensionPointID?]" instruction. This instruction can be used in a "[?Repeated?]" block, in combination with "[?SourceID?]", or alone. When the "[?DimensionPointID?]" instruction is used, the name of the field extracted is appended with the value of the "[?DimensionPointID?]" in square brackets, thus avoiding the name collision.

The values appended to the column names using the "{?DimensionPointID?]" do not have to match the Dimension Point IDs, as this can be handled in the Map Data step of the Import Manger. It is important to note that the use of the "[?DimensionPointID?]" instruction does not actually import into the specified dimension points; this has to be set up using transformations in the Map Data step on the Import Manager. For more on this functionality, refer to the Inbound Map Data - Map topic here.

The following example shows how language-dependent data can be extracted using Generic JSON. Note that the ID for both the English and German attribute is the same value, 52.

Copy
{
  "Products": [
    {
  "ID": "EXA-5002-1004",
  "Attributes": [
{
"AttributeID": 52,
"Lang": "Eng",
"Value": "Some English descriptive text"
},
{
"AttributeID": 52,
"Lang": "De",
"Value": " Einige beschreibenden Text "
}
]
}
  ]
}  

The following Generic JSON template extracts the ID source from a value and appends the value inside the "Lang" attribute in square brackets, e.g., '52[Eng]' and '52[De]'. The template applies this format so the attributes can be mapped to the respective languages with a Dimension Point Transformation and selection of the corresponding context.

Copy
{
  "Products": [
    {
  "[?Instruction?]": "[?Record?]",
  "ID": "[?Source?]",
  "Attributes": [
{
"[?Instruction?]": "[?Repeated?]",
"AttributeID": "[?SourceID?]",
"Lang": "[?DimensionPointID?]",
"Value": "[?Source?]"
}
]
}
  ]
}