<img height="1" width="1" style="display:none;" alt="" src="https://dc.ads.linkedin.com/collect/?pid=89122&amp;fmt=gif">
Maximo |  6 min read

JSON Mapping configuration for Outbound on Locations with multiple spec attributes

Problem

We have an ARCGIS Outbound processing set up for Locations, where the JSON Mapping is designed to have both the Location header attributes and spec attributes with their ALN values respectively. 

If the JSON Mapping is not mapped appropriately the json message created on outbound will not carry the ALN values against the mapped spec attributes from the location records, due to which the outbound json picks the same random ALN value for all the spec attributes of a location. 

 

Example

Below is an example that explains the problem where we can see the JSON Map with the spec attributes mapped: 

Dash 1

Dash 2

When an outbound is triggered on the locations object we can see that the outbound json has picked the same ALN value WATER for all the spec attributes. WATER is an ALN value of the spec attribute UTILITY and should not have come onto the rest of the spec attributes. 

 

Reason behind the outbound json having the same value for the spec attributes is due to the JSON Mapping not mapped appropriately for the spec attributes respectively. 

 

Solution

Spec attributes needs to be configured with conditions to map it with its related ALN values. Steps to configure: 

1. Create an outbound JSON Mapping record: 

Mapping: GIS_LOCATION 

Description: Outbound Layer 

Object Structure: ARCGISLOCATION 

Processing: Outbound Processing 

End Point: GIS_LOC 

Json Data: 

 

2.Under Properties Tab:

Add JSON Object Mapping by clicking on Map More Objects. 

Dash 3

Add as many as spec attributes by specifying the object path as LOCATIONS/LOCATIONSPEC as shown in the above screen shot like process order 4 and 5. 

Under each spec attribute object mapping, you should add properties as shown below for spec attributes and its ALN value mapping. 

Dash 4

 

3. ALN value for the property is mapped as a condition: 

Add details as shown below by clicking on the conditional values button. 

Dash 5

Note: Ensure the JSON Mapping is mapped under service layer at the outbound JSON Mapper Name in the Map Manager application. 

Test the outbound on location SAVE transaction. The outbound JSON should look like below: 

 

Stay up to date

Stay up-to-date with the latest news and receive notifications right to your inbox when new articles are published by subscribing now.