<#-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <#-- xsi:schemaLocation="http://www.openapplications.org/161B_PROCESS_SHIPMENT_001 file:///C:/Documents%20and%20Settings/022523/My%20Documents/Vudu/XML%20Specs/REL%201%20-%20VER%202/161B_process_shipment_005.xsd" --> <#-- NOTE: not all of these are used --> <#assign partnerNameSize = 35/> <#assign partnerAddressLineSize = 35/> <#assign partnerAddressCitySize = 15/> <#assign partnerAddressStateSize = 2/> <#assign partnerAddressPostalSize = 9/> <#assign partnerAddressCountrySize = 2/> <#assign partnerContactNameSize = 35/> <#assign partnerContactPhoneSize = 21/> <#assign partnerContactFaxSize = 10/> <#assign partnerContactEmailSize = 65/> <#assign shipmentNotesSize = 65/> PROCESS SHIPMENT 001 ${logicalId} INVENTORY SHIPREQUEST ${referenceId} 1 ENG NONE ${authId?if_exists} ${sentDate?if_exists} ${shipment.shipmentId?if_exists} <#if shipperId?has_content> ${shipperId}<#-- fill in from PartyCarrierAccount.accountNumber; make sure filter by from/thru date and PartyCarrierAccount.carrierPartyId==orderItemShipGroup.carrierPartyId; get most recent fromDate --> <#-- this we will also only send if there is a SHIPPERID, normally fulfillment partner will select based on TRANSMETHD, address, weight, etc --> ${orderItemShipGroup.carrierPartyId?if_exists} <#if shipperId?has_content> COLLECT <#else> PREPAID ${orderItemShipGroup.shippingInstructions?if_exists?xml} ${shipnotes?if_exists?xml}<#-- if order was a return replacement order (associated with return), then set to RETURNLABEL otherwise leave blank --> ${orderItemShipGroup.shipmentMethodTypeId?if_exists} <#if address?has_content> <#if (partyNameView.firstName)?has_content><#assign partyName = partyNameView.firstName/> <#if (partyNameView.middleName)?has_content><#assign partyName = partyName + " " + partyNameView.middleName/> <#if (partyNameView.lastName)?has_content><#assign partyName = partyName + " " + partyNameView.lastName/> <#-- NOTE: this is the to name --> <#assign toName = (address.toName)?default(partyName)?if_exists/> <#if (toName?length > partnerNameSize)><#assign toName = (toName?substring(0,partnerNameSize))?if_exists/> ${toName?if_exists?xml} SHIPTO USD <#assign address1 = address.address1?if_exists/> <#if (address1?length > partnerAddressLineSize)><#assign address1 = (address1?substring(0,partnerAddressLineSize))?if_exists/> ${address1?if_exists?xml} <#if address.address2?exists> <#assign address2 = address.address2?if_exists/> <#if (address2?length > partnerAddressLineSize)><#assign address2 = (address2?substring(0,partnerAddressLineSize))?if_exists/> ${address2?xml} <#assign city = address.city?if_exists/> <#if (city?length > partnerAddressCitySize)><#assign city = (city?substring(0,partnerAddressCitySize))?if_exists/> ${city?if_exists?xml} <#assign countryGeoId = address.countryGeoId?if_exists/> <#if (countryGeoId?length > partnerAddressCountrySize)><#assign countryGeoId = (countryGeoId?substring(0,partnerAddressCountrySize))?if_exists/> ${countryGeoId?if_exists} <#-- --> ${address.postalCode?if_exists?xml} ${address.stateProvinceGeoId?if_exists} <#if telecomNumber?has_content> <#if telecomNumber.countryCode?has_content>${telecomNumber.countryCode?xml}-${telecomNumber.areaCode?if_exists?xml}-${telecomNumber.contactNumber?if_exists?xml} <#-- NOTE: this is the attention name --> <#assign attnName = (address.attnName)?default(partyName)?if_exists/> <#if (attnName?length > partnerContactNameSize)><#assign attnName = (attnName?substring(0,partnerContactNameSize))?if_exists/> ${attnName?if_exists?xml} ${emailString?if_exists?xml} <#----> <#if telecomNumber.countryCode?has_content>${telecomNumber.countryCode?xml}-${telecomNumber.areaCode?if_exists?xml}-${telecomNumber.contactNumber?if_exists?xml} <#list shipmentItems as shipmentItem> <#assign product = shipmentItem.getRelatedOne("Product")> <#assign productType = product.getRelatedOne("ProductType")> <#if productType.isPhysical == "Y" || productType.isPhysical == "y"> ${shipmentItem.quantity?if_exists} 0 + EACH ${shipmentItem.productId?if_exists} FIFO<#-- TODO: figure out if this is a reviewer order, if so set this to LIFO --> SHIPMENT ${shipment.shipmentId?if_exists} ${shipmentItem.shipmentItemSeqId?if_exists} <#list externalIdSet?if_exists as externalId> PARTNER_SO ${externalId?if_exists?xml} <#list correspondingPoIdSet?if_exists as correspondingPoId> CUST_PO ${correspondingPoId?if_exists?xml} <#-- data preparation code to create the replacementReturnId; this is the returnId if the order is a return replacement order --> <#if replacementReturnId?exists> RMA ${replacementReturnId} SO ${orderId}