<#include "HfRpConfig.ftl"> <#include "ReflexUtils.ftl"> [ { <#assign planned_final_delivery_start_datetime = RfxDateTimetoUTC(order.planned_final_delivery_start_datetime,time_zone_offset_rfx) /> <#assign pro_creation_datetime = RfxDateTimetoUTC(order.creation_datetime,time_zone_offset_rfx) /> "Header": { "ProjectID": "${projectRP}" }, "ID": { "RefID": "${order.originator_reference}", "RefDate": { "DateTime": "${pro_creation_datetime}", "AuthorTimeZone": "${time_zone_rfx}" } }, "Payload": { "CreationDateTime": { "DateTime": "${pro_creation_datetime}", "AuthorTimeZone": "${time_zone_rfx}" }, <#-- Header Metadata inclusion --> <#include "RFXtoRP_HsrPro_ExecutionflowDetected_HeaderMetadata.ftl">, "ShipFrom": { "ActorID": "${order.physical_depot_code}" }, "ShipFromAcked": true, "ShipTo": { <#if order.end_consignee_code != "ECOM"> "ActorID": "${order.end_consignee_code}" <#else> <#if order.address != ""> "Actor": { "Name" : "${order.address.name_or_company_name!""}", "Address" : { "City" : "${order.address.post_code_area_name!""}", "CountryCode" : "${order.address.iso_country_code!""}", "PostalCode" : "${order.address.postal_code!""}", "StreetAddressOne" : "${order.address.street_and_number_and_po_box!""}", "StreetAddressTwo" : "${order.address.additional_address_data_1!""}", "StreetAddressThree" : "${order.address.additional_address_data_2!""}" } }, "Contact" : { "FirstName" : "${order.address.first_name!""}", "LastName" : "${order.address.last_name!""}", "Emails" : ["${order.address.mail_address!""}"], "Phones" : ["${order.address.mobile_phone_number!""}"] } }, <#if order.line_list??> "Lines" : [ <#list order.line_list as line> { <#if (line.originator_reference_line_number!0) != 0> "LineID": "${line.originator_reference_line_number}", <#else> "LineID": "${line.preparation_order_line_number!0}", <#-- Line Metadata inclusion --> <#include "RFXtoRP_HsrPro_ExecutionflowDetected_LineMetadata.ftl">, "RequestedContent": { "Goods": { "ItemID": "${line.item_code!"0"}", "LVBranchID": "${line.item_lv_code!"0"}", <#if (line.optional_attributes.forced_priority_date?length != 0) && (line.optional_attributes.forced_priority_date?starts_with("00") == false)> <#assign forced_priority_date = line.optional_attributes.forced_priority_date?datetime(rfx_date_format_default)?iso_utc /> "PriorityDate": "${forced_priority_date}", <#-- Line Segmentation Keys inclusion --> <#include "RFXtoRP_HsrPro_ExecutionflowDetected_LineSegmentationKeys.ftl"> }, "Quantity" : { "LVID": "${quantity_in_base_lv_RP_Cst}", "Value": "${line.base_lv_quantity_to_prepare!0}" } } }<#sep>, ], "RequestedMilestones" : { "RequestedDeliveryDateTime" : { "DateTime": "${planned_final_delivery_start_datetime}", "AuthorTimeZone": "${time_zone_rfx}" } } } } ]