diff --git a/RPtoRFX_PrepOrder.ftl b/RPtoRFX_PrepOrder.ftl index 0f18d90..a792ab3 100644 --- a/RPtoRFX_PrepOrder.ftl +++ b/RPtoRFX_PrepOrder.ftl @@ -54,7 +54,11 @@ "address_type_code" : "${adresstypecode}", "first_name": "${(executionflow.ShipTo.Contact.FirstName!"")?json_string}", "last_name" :"${(executionflow.ShipTo.Contact.LastName!"")?json_string}", - "name_or_company_name" : "${(executionflow.ShipTo.Contact.FirstName!"")?json_string} ${(executionflow.ShipTo.Contact.LastName!"")?json_string}", + <#if executionflow.ShipTo.Actor.Address.Name?? && executionflow.ShipTo.Actor.Address.Name!=""> + "name_or_company_name" : "${(executionflow.ShipTo.Actor.Address.Name!"")?json_string}", + <#else> + "name_or_company_name" : "${(executionflow.ShipTo.Contact.FirstName!"")?json_string} ${(executionflow.ShipTo.Contact.LastName!"")?json_string}", + <#if executionflow.ShipTo.Contact.Emails?? && executionflow.ShipTo.Contact.Emails[0]!=""> "mail_address": "${executionflow.ShipTo.Contact.Emails[0]}",