reflex-wms-connector/RFXtoRP_HsaSup_ActorCreated.ftl
2024-02-29 13:34:59 +01:00

55 lines
2.0 KiB
Java

[
{
"Header": {
"ProjectID": "${projectRP}"
},
"ID": {
"RefID": "${actor.code?trim?json_string}"
},
"Payload": {
"Name": "${actor.designation?json_string}",
"ManagedStock": false,
"IsCarrier": false,
<#-- ***Partner ID could be added here *** -->
<#-- "PartnerID": "${}", -->
<#--
<#include "RFXtoRP_HsaSup_ActorCreated_Metadata.ftl">,
-->
"Address":
{
<#-- if Reflex WMS address is structured -->
<#if actor.supplier_structured_address?? >
"Name": "${actor.supplier_structured_address.name_or_company?json_string}",
"StreetAddressOne" : "${actor.supplier_structured_address.street_and_PO?json_string}",
"StreetAddressTwo" : "${actor.supplier_structured_address.additionnal_data?json_string}",
"PostalCode" : "${actor.supplier_structured_address.postal_code?json_string}",
"City" : "${actor.supplier_structured_address.post_code_area_name?json_string}",
"CountryCode" : "${actor.supplier_structured_address.country_code?json_string}",
"ProvinceCode": "${actor.supplier_structured_address.territorial_div_code?json_string}",
"State": "${actor.supplier_structured_address.country_designation?json_string}"
<#-- if Reflex WMS address is not structured -->
<#else>
<#if actor.optional_attributes?? >
"Name": "${actor.optional_attributes.company_name?json_string}",
"StreetAddressOne" : "${actor.optional_attributes.address_1?json_string}",
"StreetAddressTwo" : "${actor.optional_attributes.address_2?json_string}",
"StreetAddressThree" : "${actor.optional_attributes.address_3?json_string}"
</#if>
</#if>
},
<#if actor.optional_attributes?? >
"Phones": ["${actor.optional_attributes.telephone?json_string}",
"${actor.optional_attributes.other_number?json_string}"
],
</#if>
"Typology": "TYPOLOGY_UNKNOWN"
}
}
]