diff --git a/RFXtoRP_HsrPro_ExecutionflowDetected.ftl b/RFXtoRP_HsrPro_ExecutionflowDetected.ftl index a72d93e..bd37d45 100644 --- a/RFXtoRP_HsrPro_ExecutionflowDetected.ftl +++ b/RFXtoRP_HsrPro_ExecutionflowDetected.ftl @@ -57,7 +57,12 @@ "Address" : { "City" : "${(preparation_order.address.post_code_area_name!"")?json_string}", + <#assign isCountryCode = JsonUtil.isCountryCode(actor.supplier_structured_address.country_code?upper_case) /> + <#if isCountryCode> "CountryCode" : "${(preparation_order.address.iso_country_code!"")?json_string}", + <#else> + "CountryCode" : "", + "PostalCode" : "${(preparation_order.address.postal_code!"")?json_string}", "StreetAddressOne" : "${(preparation_order.address.street_and_number_and_po_box!"")?json_string}", "StreetAddressTwo" : "${(preparation_order.address.additional_address_data_1!"")?json_string}",