The EHP Parts EStore XML Specification

The EHP Parts EStore can process pre-formatted parts orders. They must follow the XML format specified below.

<EHPPO>

<PO>

<Id>

<Acct>Account Number</Acct>

<User>User Name</User>

</Id>

<Header>

<PONumber>Customer PO Number</PONumber>

<Name>Receiving Name</Name>

<Addr1>Address Line 1</Addr1>

<Addr2>Address Line 2</Addr2>

<City>City</City>

<State>State</State>

<Zip>Zip Code</Zip>

<Country>Country</Country>

<ShipMethod>Shipping Method</ShipMethod>

<ShipDate>Requested Ship Date</ShipDate>

<ShipComments>Shipping Comments</ShipComments>

</Header>

<Detail>

<Item>

<ProductId>Product Number</ProductId>

<Quantity>Number of Items</Quantity>

</Item>

</Detail>

</PO>

</EHPPO>

<EHPPO>

Every file must have exactly one <EHPPO> tag. It tells the EStore that it is dealing with a valid purchase order. Multiple purchase orders may be enclosed within a single <EHPPO> tag as so:

<EHPPO>

<PO>

</PO>

<PO>

</PO>

</EHPPO>

<PO>

The <PO> tag encapsulates a single purchase order. Each purchase order must contain exactly one <Id>, one <Header>, and one <Detail> tag.

<ID>

The <Id> tag contains the user information under which the purchase order should be posted.

The <Acct> tag contains the purchasing company’s EStore account number.

The <User> tag must contain a valid user login name for the specified account number.

<Header>

**NOTE: If you specify a <Name> you must specify the rest of the address fields, otherwise the system will default to your ship to address on file. **

The <Header> tag contains the purchase order’s shipping information.

The <PONumber> tag contains the number assigned to the purchase order by the purchasing company. This tag may contain any combination of letters and numbers and may be up to 22 characters in length.

The <Name> tag contains the name to which the order will be shipped.

The <Addr1> and <Addr2> tags contain the street address to which the order will be shipped. Each tag will accept up to 32 characters. **This field is required if the Name tag is filled in.**

The <City> tag contains the name of the city to which the order will be shipped. City names longer than 20 characters will be truncated. **This field is required if the Name tag is filled in.**

The <State> tag contains the two digit abbreviation of the state to which the order will be shipped. **This field is required if the Name tag is filled in.**

The <Zip> tag contains the five or nine digit zip code to which the order will be shipped. **This field is required if the Name tag is filled in.**

The <Country> tag contains the name of the country to which the order will be shipped. Country names longer than 32 characters will be truncated. **This field is required if the Name tag is filled in.**

The <ShipMethod> tag contains the number identifier for the method by which the order will be shipped. The following values may be used:

0  Stocking Order

1  Second Day Air

2  Next Day Air

3  Ground

The <ShipDate> tag contains the requested date of shipment. The date must be in a valid date format such as MM/DD/YY. This tag is optional. Orders not containing this tag will be shipped on the day that they are processed.

The <ShipComments> tag contains any comments to be placed on the shipping label. The tag may contain up to 630 characters. The shipping label will display the comments on five lines of 66 characters each. This tag is optional.

<Detail>

The <Detail> tag contains a list of the items included in the purchase order. Each purchase order must contain exactly one <Detail> tag.

The <Item> tag contains information for a single item. Multiple <Item> tags may be present in a single <Detail> tag. Each <Item> tag contains exactly one <ProductID>, and one <Quantity> tag.

The <ProductID> tag contains the EHP-assigned ID of the product to be ordered.

The <Quantity> tag contains the number of items to be ordered.

A Quick Note On XML

XML has strict rules on tags and the formatting of text within those tags. The following list highlights some of the rules that will be important when creating an XML-formatted purchase order:

1.  XML tags are case sensitive.

2.  All XML tags must be accompanied by a corresponding closing tag.

3.  Special characters must be enclosed in a CDATA tag.

XML tags are case sensitive

This rule is simple. <ID>, <id>, <Id> are three different tags. The EStore specification calls for a <Id> tag. If a mistake is made and a <ID> tag is included instead of a <Id> tag, the EStore will return an error because it could not find the required tag.

All XML tags must be accompanied by a corresponding closing tag

Data in XML is enclosed within tags. A <Id> tag must be closed by a </Id> tag.

Special characters must be enclosed in a CDATA tag

XML considers anything other than letters and numbers as special characters. For example the characters !,@,#,$,%,^,&,* are all considered special characters. If data within a tag will contain any special characters, that data must be enclosed within a CDATA tag. The CDATA tag is formatted as follows:

<![CDATA[ place data here ]]>

For example, if a shipping name such as “A & A Warehouses” is to be included in the <Name> tag, it would be placed in the purchase order as follows:

<Name<![CDATA[A & A Warehouses]]</Name>

As it will not affect the EStore, it is a good idea to always use the CDATA tag with any fields that may include special characters.

A Helpful Hint

Internet Explorer 5 and higher is capable of displaying XML-formatted text. A purchase order can be checked for syntactical errors by attempting to open it with Internet Explorer. Internet Explorer will display any syntax errors contained within the XML.