63 lines
2.5 KiB
Java
63 lines
2.5 KiB
Java
<#include "ReflexUtils.ftl">
|
|
<#include "HfRpConfig.ftl">
|
|
<#include "ActorPrefix.ftl">
|
|
[
|
|
{
|
|
"Header": {
|
|
"ProjectID": "${projectRP}"
|
|
},
|
|
"ID": {
|
|
<#if uniqueness?? && uniqueness!="" >
|
|
"RefID": "${depot.physical_depot_code?trim?json_string}"
|
|
<#else>
|
|
"RefID": "${depot}${depot.physical_depot_code?trim?json_string}"
|
|
</#if>
|
|
},
|
|
"Payload": {
|
|
"Name": "${depot.physical_depot_designation?json_string}",
|
|
"ManagedStock": true,
|
|
"IsCarrier": false,
|
|
<#-- ***Partner ID could be added here *** -->
|
|
<#-- "PartnerID": "${}", -->
|
|
|
|
|
|
<#include "RFXtoRP_HsrDepot_ActorCreated_Metadata.ftl">,
|
|
|
|
|
|
"Address":
|
|
{
|
|
<#-- if Reflex WMS address is structured -->
|
|
<#if depot.physical_depot_structured_address?? >
|
|
|
|
"Name": "${depot.physical_depot_structured_address.name_or_company?json_string}",
|
|
"StreetAddressOne" : "${depot.physical_depot_structured_address.street_and_PO?json_string}",
|
|
"StreetAddressTwo" : "${depot.physical_depot_structured_address.additionnal_data?json_string}",
|
|
"PostalCode" : "${depot.physical_depot_structured_address.postal_code?json_string}",
|
|
"City" : "${depot.physical_depot_structured_address.post_code_area_name?json_string}",
|
|
<#assign isCountryCode = JsonUtil.isCountryCode(depot.physical_depot_structured_address.country_code?upper_case) />
|
|
<#if isCountryCode >
|
|
"CountryCode" : "${depot.physical_depot_structured_address.country_code?upper_case?json_string}",
|
|
<#else>
|
|
"CountryCode" : "",
|
|
</#if>
|
|
"ProvinceCode": "${depot.physical_depot_structured_address.territorial_div_code?json_string}",
|
|
"State": "${depot.physical_depot_structured_address.country_designation?json_string}"
|
|
|
|
<#-- if Reflex WMS address is not structured -->
|
|
<#else>
|
|
"Name": "${depot.physical_depot_address.company_name?json_string}",
|
|
"StreetAddressOne" : "${depot.physical_depot_address.address_1?json_string}",
|
|
"StreetAddressTwo" : "${depot.physical_depot_address.address_2?json_string}",
|
|
"StreetAddressThree" : "${depot.physical_depot_address.address_3?json_string}",
|
|
"CountryCode" : ""
|
|
</#if>
|
|
|
|
},
|
|
"Phones": ["${depot.physical_depot_address.telephone?json_string}",
|
|
"${depot.physical_depot_address.other_number?json_string}"
|
|
],
|
|
"Typology": "TYPOLOGY_UNKNOWN"
|
|
}
|
|
}
|
|
]
|