Home » Categories » Solutions by Business Process » E-Business » XML

Example Datafile XML Template

Datafile Software

Example Datafile XML Template


The Datafile template below is the BOSSFed order template, which includes specific variations required to create order files. It is a regrettable fact of life that the opXML standards have been interpreted differently, and that certain suppliers have "invented” solutions when they could not find a solution from within the standard schema.

<?xml version="1.0"?>
<!-- Datafile XML purchase order processing template -->
<!-- Based on BOSSFed purchase order version 3.05-->
<!-- Created September 2006 -->
<!-- Revision history: September 2006: Special treatments for Kingfield Heath,
Spicers and ISA Wholesale Ltd included below-->
<!-- -->
<?dfd id="STA" path="DATA\???-STA.DFD" type="lookup" ?>
<?dfd id="SOH" path="DATA\???-SOH.DFD" type="lookup" ?>
<?dfd id="GLU" path="DATA\???-GLU.DFD" type="lookup" ?>
<?dfd id="ACC" path="DATA\???-ACC.DFD" type="accum" ?>
<?dfd id="CON" path="DATA\???-CON.DFD" type="constant" ?>
<!-- Note that POH, POD and PLA are already known to the transaction -->
<?break item="D001-ORDER-REF"?>
<!-- <?pathname path="!XMLOut\$$$\" $$$="GLU,D014-PATHNAME-1"?> -->
<!-- <?filename file="$$$" $$$="GLU,D015-FILENAME-1"?> -->
<!-- -->
<Order>
<OrderHead>
<Schema>
<Version dfd="GLU" key="D003-ACCOUNT">D050-PP-VER-ORD</Version>
</Schema>
<Parameters>
<Language>en-GB</Language>
<DecimalSeparator>.</DecimalSeparator>
<Precision>10.2</Precision>
</Parameters>
<OrderType Code="PUO">Purchase Order</OrderType>
<OrderCurrency>
<Currency Code="GBP">GB Pounds Sterling</Currency>
</OrderCurrency>
<Checksum/>
</OrderHead>
<OrderReferences>
<ContractOrderReference test="D057-CONTRACT-REF NB">D057-CONTRACTREF</
ContractOrderReference>
<BuyersOrderNumber Preserve="true">D001-ORDER-REF</BuyersOrderNumber>
</OrderReferences>
<!-- The following elements are opXML-specific elements. Spicers use "BOSS",
not "OP". -->
<OP:AdditionalOrderReferences test="D135-XML_SUPP NE SPIC" xmlns:OP="urn:schemasbossfed-
co-uk:OP-Order-v1">
<!-- The actual order type code sent is supplier-dependent, and so a lookup to
the GLU file is assumed, based on a concatenated item in the POH file.
Currently ISA Wholesale put this code elsewhere -->
<OP:OrderReference ReferenceType="TYP" ReferenceDesc="Order Type" test="D135-
XML_SUPP NE ISAW">
<OP:Reference dfd="GLU" key="D139-XML_LOOKUP">D004-PROC-FLAG
</OP:Reference>
</OP:OrderReference>
<!-- Elements needed by Kingfield Heath (and others?) for direct deliveries -->
<OP:OrderReference ReferenceType="DSO" ReferenceDesc="Dealers Sales Order
Number" test="D126-XML_DELVY? NB">
<OP:Reference>D058-SALES-ORDER</OP:Reference>
</OP:OrderReference>
<OP:OrderReference ReferenceType="ERF" ReferenceDesc="EndUsers Reference"
test="D126-XML_DELVY? NB">
<OP:Reference>D059-CUST-REF</OP:Reference>
– 70 –
</OP:OrderReference>
</OP:AdditionalOrderReferences>
<!-- The Spicers versions -->
<BOSS:AdditionalOrderReferences test="D135-XML_SUPP E SPIC"
xmlns:BOSS="urn:schemas-bossfed-co-uk:OP-Order-v1">
<!-- The actual order type code sent is supplier-dependent, and so a lookup to
the GLU file is assumed, based on a concatenated item in the POH file. -->
<BOSS:OrderReference ReferenceType="OTP" ReferenceDesc="Order Type">
<BOSS:Reference dfd="GLU" key="D139-XML_LOOKUP">D004-PROC-FLAG
</BOSS:Reference>
</BOSS:OrderReference>
<!-- Elements needed by Kingfield Heath (and others?) for direct deliveries -->
<BOSS:OrderReference ReferenceType="DSO" ReferenceDesc="Dealers Sales Order
Number" test="D126-XML_DELVY? NB">
<BOSS:Reference>D058-SALES-ORDER</BOSS:Reference>
</BOSS:OrderReference>
<BOSS:OrderReference ReferenceType="ERF" ReferenceDesc="EndUsers Reference"
test="D126-XML_DELVY? NB">
<BOSS:Reference>D059-CUST-REF</BOSS:Reference>
</BOSS:OrderReference>
</BOSS:AdditionalOrderReferences>
<!-- -->
<OrderDate>D004-DATE-INPUT</OrderDate>
<Supplier>
<SupplierReferences dfd="PLA">
<BuyersCodeForSupplier>D001-ACCOUNT</BuyersCodeForSupplier>
<GLN dfd="GLU" test="D003-INTERNAL-CODE NB">D003-INTERNAL-CODE</GLN>
</SupplierReferences>
<Party dfd="PLA">D002-NAME</Party>
<Address test="D135-XML_SUPP NE SPIC">
<AddressLine dfd="PLA">D003-ADD1</AddressLine>
<AddressLine dfd="PLA" test="D004-ADD2 NB">D004-ADD2</AddressLine>
<AddressLine dfd="PLA" test="D005-ADD3 NB">D005-ADD3</AddressLine>
<AddressLine dfd="PLA" test="D006-ADD4 NB">D006-ADD4</AddressLine>
<PostCode dfd="PLA">D007-POSTCODE</PostCode>
<Country Code="GB">United Kingdom</Country>
</Address>
</Supplier>
<Buyer>
<BuyerReferences>
<SuppliersCodeForBuyer test="D135-XML_SUPP NE SPIC" dfd="GLU" key="D003-
ACCOUNT">D009-HO-ACCOUNT
</SuppliersCodeForBuyer>
<SuppliersCodeForBuyer test="D135-XML_SUPP E SPIC" dfd="GLU" key="D003-
ACCOUNT">D114-COMB-AC-BR
</SuppliersCodeForBuyer>
<GLN dfd="CON" test="D047-EAN-CODE NB">D047-EAN-CODE</GLN>
</BuyerReferences>
<Party dfd="CON">D040-COMPANY</Party>
<Address test1="D135-XML_SUPP NE SPIC" dfd="CON" test2="D041-CO-ADDR1 NB">
<AddressLine>D041-CO-ADDR1</AddressLine>
<AddressLine test="D042-CO-ADDR2 NB">D042-CO-ADDR2</AddressLine>
<AddressLine test="D043-CO-ADDR3 NB">D043-CO-ADDR3</AddressLine>
<AddressLine test="D044-CO-ADDR4 NB">D044-CO-ADDR4</AddressLine>
<PostCode>D045-CO-PCODE</PostCode>
<Country Code="GB">United Kingdom</Country>
</Address>
</Buyer>
<Delivery>
<DeliverTo>
<!-- Required for ISA Wholesale even if neither labelled nor delivered -->
<DeliverToReferences test="D135-XML_SUPP E ISAW">
<BuyersCodeForLocation dfd="GLU" key="D139-XML_LOOKUP">D004-
PROCESS</BuyersCodeForLocation>
</DeliverToReferences>
<!-- Required for Spicers to hold RDC mnemonic -->
<DeliverToReferences test="D135-XML_SUPP E SPIC">
Datafile Software XML Module
– 71 –
<BuyersCodeForLocation dfd="GLU" key="D003-ACCOUNT">D112-RDCMNEMONIC</
BuyersCodeForLocation>
</DeliverToReferences>
<!-- End of special cases -->
<!-- For other than ISA Wholesale, normal rules apply -->
<DeliverToReferences test1="D135-XML_SUPP NE ISAW" test2="D135-XML_SUPP NE
SPIC" test3="D058-SALES-ORDER NB" test4="D060-SOH-DEL-CODE NB">
<BuyersCodeForLocation>D060-SOH-DEL-CODE</BuyersCodeForLocation>
</DeliverToReferences>
<Party test1="D058-SALES-ORDER NB" test2="D061-SOH-DEL-NAME NB">D061-SOH-DELNAME</
Party>
<Address test="D058-SALES-ORDER NB">
<AddressLine dfd="SOH" key="D058-SALES-ORDER">D050-DEL-ADD1</AddressLine>
<AddressLine dfd="SOH" key="D058-SALES-ORDER" test="D051-DEL-ADD2 NB">D051-
DEL-ADD2</AddressLine>
<AddressLine dfd="SOH" key="D058-SALES-ORDER" test="D052-DEL-ADD3 NB">D052-
DEL-ADD3</AddressLine>
<AddressLine dfd="SOH" key="D058-SALES-ORDER" test="D053-DEL-ADD4 NB">D053-
DEL-ADD4</AddressLine>
<PostCode dfd="SOH" key="D058-SALES-ORDER">D054-DEL-PC</PostCode>
<Country Code="GB">United Kingdom</Country>
</Address>
<Contact test="D058-SALES-ORDER NB">
<Name dfd="SOH" key="D058-SALES-ORDER" test="D044-CONTACT NB">D044-
CONTACT</Name>
</Contact>
</DeliverTo>
<!-- This is specific to Kingfield Heath -->
<LatestAcceptableDate test1="D020-DATE-REQURED NB" dfd="GLU" test="D004-PROCFLAG
E KING">D020-DATE-REQUIRED</LatestAcceptableDate>
<LatestAcceptableDate test1="D020-DATE-REQURED B" dfd="GLU" test="D004-PROCFLAG
E KING">0000-00-00</LatestAcceptableDate>
<!-- End Kingfield Heath specific -->
<!-- This is specific to Spicers -->
<PreferredDate test1="D020-DATE-REQURED NB" dfd="GLU" test="D004-PROC-FLAG E
SPIC">D020-DATE-REQUIRED</PreferredDate>
<!-- End Spicers specific -->
<DeliveryInformation test="D038-EXTRA-TEXT-1 NB">D038-EXTRA-TEXT-
1</DeliveryInformation>
<DeliveryInformation test="D039-EXTRA-TEXT-2 NB">D039-EXTRA-TEXT-
2</DeliveryInformation>
<DeliveryInformation test="D040-EXTRA-TEXT-3 NB">D040-EXTRA-TEXT-
3</DeliveryInformation>
<DeliveryInformation test="D041-EXTRA-TEXT-4 NB">D038-EXTRA-TEXT-
4</DeliveryInformation>
</Delivery>
<OrderLine dfd="POD">
<LineNumber test1="D110-DESCR-ONLY NE Y" test2="D158-XML_SENT B" test3="D003-
STATUS E A" flag="D158-XML_SENT" Preserve="true">D002-ENTRY</LineNumber>
<OrderLineReferences>
<BuyersOrderLineReference Preserve="true">D080-ORDER-REF/ENT
</BuyersOrderLineReference>
</OrderLineReferences>
<!-- More opXML-specific elements. Spicers use "BOSS" not "OP" -->
<OP:AdditionalOrderLineReferences test1="D157-XML_SUPP NE SPIC" test2="D111-
XML_BACK-ORD NB" xmlns:OP="urn:schemas-bossfed-co-uk:OP-Order-v1">
<OP:OrderLineReference ReferenceDesc="Back Order Flag">
<OP:Reference>Y</OP:Reference>
</OP:OrderLineReference>
</OP:AdditionalOrderLineReferences>
<BOSS:AdditionalOrderLineReferences test1="D157-XML_SUPP E SPIC" test2="D111-
XML_BACK-ORD NB" xmlns:BOSS="urn:schemas-bossfed-co-uk:OP-Order-v1">
<BOSS:OrderLineReference ReferenceDesc="Back Order Flag">
<BOSS:Reference>Y</BOSS:Reference>
</BOSS:OrderLineReference>
</BOSS:AdditionalOrderLineReferences>
<Product>
– 72 –
<!-- Various test to determine from where comes the supplier product code.
E.g. Assume there is a code to determine how to access product code:
IF code is blank, then use the POD stock code, ELSE
IF code "M", then use the POD item copied from supplier matrix item 13 ELSE
IF code 1-9, then use the POD alt stock code item copied from STA ELSE
IF code not blank, but the required item is blank, use POD stock code -->
<!-- For Datafile customer, however, Alt-Stk-Code4 always holds product
code. -->
<SuppliersProductCode test="D087-ALT-STK-CODE4 B">D112-STOCKONLY</
SuppliersProductCode>
<SuppliersProductCode test="D087-ALT-STK-CODE4 NB">D087-ALT-STKCODE4</
SuppliersProductCode>
<!-- End of product code tests -->
<BuyersProductCode>D112-STOCK-ONLY</BuyersProductCode>
<Description>D032-DESCRIPTION</Description>
</Product>
<Quantity>
<!-- The pack quantity is assumed to be that in the pack quantity field.
Some suppliers may require other descriptions, in which case further
elements with suitable tests will be required here -->
<Packsize test="D036-PACK-QTY E 0">1</Packsize>
<Packsize test="D036-PACK-QTY NE 0" decimals="0">D036-PACK-QTY</Packsize>
<Amount decimals="0">D007-ORDER-QTY</Amount>
</Quantity>
<Price test1="D009-COST NE 0.00">
<!-- Or... <Price test1="D009-COST NE 0.00" dfd1="GLU" key="D005-ACCOUNT"
test2="D092-XML_NO-PRICE B" dfd2="DFD"> if can make test -->
<UnitPrice>D009-COST</UnitPrice>
</Price>
<LineTotal test="D014-DETAIL-VALUE NE 0.00" addto="D001-XML-NetGoods">D014-
DETAIL-VALUE</LineTotal>
</OrderLine>
<OrderTotal>
<GoodsValue dfd="ACC" test="D001-XML_NetGoods NE 0.00" clear="yes">D001-XMLNetGoods"</
GoodsValue>
</OrderTotal>
</Order>
Custom Fields
  • Release ID: Standard
Attachments Attachments
There are no attachments for this article.
Related Articles RSS Feed
Purchase Order Header (POH)
Viewed 3105 times since Tue, Jul 10, 2012
Print of Output XML Files
Viewed 1291 times since Thu, Jul 5, 2012
Maintain XML Lookup Files
Viewed 1282 times since Thu, Jul 5, 2012
Formatting XML Files With “White Space”
Viewed 2446 times since Mon, Jul 9, 2012
Linking to POP Document Layouts
Viewed 1344 times since Mon, Jul 9, 2012
Sales Order Cycle
Viewed 1555 times since Tue, Jul 10, 2012
addto
Viewed 1252 times since Mon, Jul 9, 2012
Template Attributes
Viewed 1277 times since Mon, Jul 9, 2012
XML Audit Trail Error Codes
Viewed 1780 times since Tue, Jul 10, 2012
additions
Viewed 1243 times since Mon, Jul 9, 2012