DEALER
Nick Name Password
©2009 Morris Costumes. All Rights Reserved.
     Programmed by Star Web Creations
 
XML Real-time Error Messages   |   XML format for sending orders to Morris   |   Specification for Morris Realtime XML Protocol


XML format for sending orders or returns
FOR WEB CUSTOMERS ONLY

STOP!

If you haven't read the "XML Availability Schedule and Naming Conventions" page, please do so before reading on!

What you see in this color = DATA
What you see in this color = INSTRUCTION ONLY
What you see in this color = RETURN PROCESSING

The count of orders and lines must be correct. An order or return will be rejected if anything is wrong with it and the entire order will be deleted.
***For more information, that's FREE, about illegal actions/characters in XML, please visit
www.w3schools.com.***
~~~~~~~~~~~~~~~~~~~~

There are two ways to send orders or returns to Morris Costumes. Individually (by PO) or by Batch. Below is a detailed description of the XML file(s) used to order (via the web) from Morris. Towards the end of this documentation will be more detail about posting orders or returns to Morris. (Example of the file names:   batch_#####.XML       OR      po_#####.xml).

WHEN NAMING FILES:
They can be a number or alphanumeric and must NOT have punctuation; they must be unique; AND have a maximum of 15 characters - NO MORE than that can be used.


Format:

<Batch>

  <Number>####</Number>

  <Count>###</Count>
        <Order>

              <otype>#</otype>


              <pickmsg>###</pickmsg>




              <po>###</po>


              <via>###</via>




              <terms>####</terms>


              <magic>####</magic>

              <count>###</count>
              <ShipTo>


                   <Address>
                         <Line1>####
                           </Line1>
                         <Street1>###
                           </Street1>
                         <Street2>###
                           </Street2>
                         <City>###</City>
                         <State>###</State>
                         <Zip>###</Zip>
                         <Country>###
                           </Country>
                         <Phone>###</Phone>
                    </Address>
               </ShipTo>




               <LineItems>
                    <Line>

                         <sku>##</sku>
                         <part>###</part>






                         <qty>##</qty>
                         <message>####
                         </message>
                    </Line>
               </LineItems>
         </Order>
    </Batch>



<Batch> thru <Count> are used IF there are multiple orders.
<Number> may be any number; no punctuation. Must match the file name!
<Count> is the number of orders in the batch.
<Order> is the start of the block of info you will repeat, for each order.
<otype> is an optional field and identifies the order type. The default is "O" for order. To send a return, enter the letter "R".
<pickmsg> is the (optional) message that you enter. Morris, along with your customer, will see this. It will be at the bottom of the picking ticket. There is no limit to the number of characters (can be alphanumeric, NO punctuation.)
<po> no more than 15 characters (can be alphanumeric, NO punctuation.) For returns you must enter the original purchase order number.
<via> is an optional field. If left blank, it will default from your customer file. Keep in mind that not all ship via's are validate for certain addresses. Discuss with Morris' Costumes if any questions.  Click HERE for your ship via options.
If you are paying by credit card, in the <terms> field, pass the last 4 digits of the credit card on file at Morris Costumes.
<magic> is the 3 or 4 digit code on the back of the credit card.
<count> is the number of lines on the order.
<ShipTo> maximum of 30 characters (can be alphanumeric, NO punctuation.)

ADDRESS RULES: (for US and Canada only)
1) A name or company name must be provided (<Line>); (30 spaces).
2) An address street, city, state, (<-30 characters for street and city, 2 characters for state) and zip must be provided.
3) Zip code must be 5 or 9 digits in length; numeric only (US) or alphanumeric (CA).
4) The <Street1> or <Street2> must contain a number.
5) The country code must be correct.
6) The city and state must be valid for the zip code provided.
7) For return orders, you must enter the address of the original order.
<Street2> is an optional field.
Please visit the ISO website for accurate information regarding ADDRESS COUNTRY CODES.
Please visit the MaxMind website for accurate information regarding STATE and province codes.

<Line> is the start of the block of info you will repeat for EACH line item.
<sku> is Morris' internal part number.
<part> is Morris' catalog part number.

DO NOT enter a catalog number if you choose to enter an internal part number -AND-
DO NOT enter an internal part number if you choose to enter a catalog number!!


<message> is an optional field up to 78 characters in length. For returns, you must enter the reason for returning the goods.

Remember, </Batch> is only needed if multiple orders are being submitted.

For an example of a batch file (more than one order), click HERE. (batch_#####.XML)
For an example of an individual order request, click HERE. (po_#####.xml)

For an example of an individual RETURN request, click HERE.

Note that either sku or part may be sent in a line; If you send both, only sku is looked at.
A cross reference is sent in the availability.

~~~~~~~~~~~~~~~~~~~~

"Order Results":

After an order/batch has loaded, you will get a batch reply back ("Results" file) via email and in the email will be a link to the .xml file. You will need to download it. This will be the result of your order(s). When orders are rejected, canceled, or deleted, comments will be attached to this "Results" file.


    <Orders>
         <Order>
               <po>##</po>
               <Status>##</Status>






               <Text>## </Text>
         </Order>
         <Count>##</Count>
         <Date>mm/dd/yyyy</Date>
         <Time>hh:mm:ss</Time>
    </Orders>


<Order> is the start of the block of info that will repeat for EACH order.
Possible statuses:
    "OK" - in this case, text may not appear.
    "Warning" - (got it, liked some of it, see orders)
    "Rejected" - (got it, did not like it, your fault :-)
    "Failed" - (got it, system error, my fault :-)
(your/my is not personal comment, indicates which system had error)
<Text> field will only exist if the status is not "OK".
<Count> is how many orders.

<Time> should be military time.

For an example of a RESULTS status file, click HERE.

For an example of a RESULTS status file, with a REJECTED ORDER, click HERE.

Possible values of "Code" in XML are the same as "Status" in POST with the addition of "Warning" which you may treat as "OK" and perhaps put on an exception report ...
You may not send me the same PO more than once if we got it!

On order create commands, if an order is OK or WARNING it is added to our system. If Failed or Rejected it is not (actually failed is uncertain in that certain system errors could kill me before I can delete the order). I will also delete the XML, allowing you to thereby send again (with correction :-).
If you are uncertain, you can always try and send it again ... and let me reject it.

~~~~~~~~~~~~~~~~~~~~

"Return Results":

After a return order has loaded, you will get a reply back ("Results" file) via email and in the email will be a link to the .xml file. You will need to download it. This will be the result of your return(s). When returns are rejected, canceled, or deleted, comments will be attached to this "Results" file.


    <Order Detail>
         <Order>

              <Xmode>##</Xmode>
              <otype>##</otype>
              <ReturnCode>##</ReturnCode>












          <ReturnReason>## </ReturnReason>




              <Hold>##</Hold>

              <Status>##</Status>
              <StatusDate>MM/DD/YYYY</StatusDate>
              <Header>
                  <OrderNum>###</OrderNum>
                  <Location>###</Location>

                  <Shipment>#</Shipment>

                  <po>###</po>
                  <Total>###</Total>
                  <Terms>###</Terms>
                  <Via>###</Via>
                  <BillTo>
                    <Address>
                      <Line1>###</Line1>
                      <Name>###</Name>
                      <Street1>###</Street1>
                      <Street2>###</Street2>
                      <City>###</City>
                      <State>###</State>
                      <Zip>###</Zip>
                      <Country>###</Country>
                      <Phone>###</Phone>
                    </Address>
                  </BillTo>
                  <ShipTo>
                    <Address>
                      <Line1>###</Line1>
                      <Name>###</Name>
                      <Street1>###</Street1>
                      <Street2>###</Street2>
                      <City>###</City>
                      <State>###</State>
                      <Zip>###</Zip>
                      <Country>###</Country>
                      <Phone>###</Phone>
                    </Address>
                  </ShipTo>
               </Header>
                  <LineItems>
                    <Line>
                      <No>###</No>
                      <Sku>###</Sku>
                      <Location>###</Location>

                      <Ordered>###</Ordered>

                      <Ship>###</Ship>

                      <Price>###</Price>

                      <Net>###</Net>
                    </Line>
                  </LineItems>
         </Order>


<Order> is the start of the block of info that will repeat for EACH order.
<Xmode> ignore it's for the programmer.
<otype> is set to Return for return orders.
<ReturnCode> the following numbers correspond to the return codes.
1 - Good Product return accepted
2 - Customer damaged packaging or opened packaging
3 - Customer used/wore item
4 - Customer abused product
5 - Customer returned incomplete item
6 - Return exceeds time limit
7 - UPS filed claim or damaged claim
8 - Shortage credit
9 - Defective credit
10 - Freight only credit
<ReturnReason> The return reason can be the generic reason listed above or a more descriptive reason (i.e. if the ReturnCode was set to 5, the ReturnReason might be customer did not return mask).
<Hold> will be "Y" if the credit is on credit hold.
<Status> The status values are picking, deleted, or open.
<StatusDate> The date the return was last updated.
<OrderNum> The credit memo number.
<Location> The location where the goods were returned to.
<Shipment> Will be set to 0 (zero), if the return is not yet invoiced.
<po> The purchase order number.
<Total> The total credit dollar amount.
<Terms> The terms on the credit memo.
<Via> The ship via.
<BillTo> The billing address block.




<Street2> is an optional field.



<Country> may or may not exist.
<Phone> may or may not exist.


<ShipTo> The shipping Address block.




<Street2> is an optional field.



<Country> may or may not exist.
<Phone> may or may not exist.




<Line> repeats for every line item.
<No> is the line number.

<Location> is optional if not the same as the order header.
<Ordered> the quantity returned (shown as negative).
<Ship> the quantity returned (shown as a negative).
<Price> the price given on the return (shown as a negative).
<Net> the price * the quantity returned (shown as a negative).

For an example of a RESULTS status file, click HERE.

For an example of a RESULTS status file, with a REJECTED ORDER, click HERE.

Possible values of "Code" in XML are the same as "Status" in POST with the addition of "Warning" which you may treat as "OK" and perhaps put on an exception report ...
You may not send me the same PO more than once if we got it!

On order create commands, if an order is OK or WARNING it is added to our system. If Failed or Rejected it is not (actually failed is uncertain in that certain system errors could kill me before I can delete the order). I will also delete the XML, allowing you to thereby send again (with correction :-).
If you are uncertain, you can always try and send it again ... and let me reject it.

~~~~~~~~~~~~~~~~~~~~

"Available Batch":
[1]

There are three different "Available Batch" XML updates you can get. The updates will come in an email that will contain a link to the XML file. The XML files will persist for at least 48 hours. The first update is a list that contains all of the changes that have occurred in the last 2 days. This is currently being sent every 30 minutes. It looks like:

    <AvailableBatch>
         <Type>Changes</Type>
         <Date>mm/dd/yyyy</Date>
         <Available>
               <Sku>####</Sku>
               <Part>####</Part>
               <Gtin>####</Gtin>
               <Loc>###</Loc>
               <Qty>###</Qty>
               <Time>hh:mm:ss</time>
         </Available>
    </AvailableBatch>



<Date> = Batch date
The "<available>" block will repeat.
<Sku> - Internal Morris sku.
<Part> - Catalog part number.
<Gtin> - Manufacturer's UPC code.
<Loc> will only exist if location not combined.

<Time> = military time.


Example of a "COMBINED location" changes file, (withOUT detail), click here

Example of a "SEPARATE location" changes file, (withOUT detail), click here

~~~~~~~~~~~~~~~~~~~~

"Available Batch":
[2]

The second is also an "Available Batch", but contains all active items, with detail. It is currently being sent to customers with "combined" locations default on the 1st & 3rd Sunday of the month. And to customers with "separate" locations default on the 2nd & 4th Sunday of the month.

<AvailableBatch>
   <Date>mm/dd/yyyy</Date>
   <Type>Full</Type>

   <Available>
      <Sku>####</Sku>
      <Part>####</Part>
      <Gtin>####</Gtin>
      <Loc>###</Loc>
      <Qty>###</Qty>
       <ActiveStatus>
          <Code>###</Code>
          <Desc>###</Desc>
          <ReplacedBy>###
          </ReplacedBy>
       </ActiveStatus>
       <Time>###</Time>
     <Detail>
          <Desc>####</Desc>
          <Weight>####</Weight>
          <Length>####</Length>
          <Width>####</Width>
          <Height>####</Height>
          <Cubes>####</Cubes>           <Domestic_Air_Dim_Weight>####           </Domestic_Air_Dim_Weight>           <Intl_Dim_Weight>####
          </Intl_Dim_Weight>
          <Domestic_Gnd_Dim_Weight>####           </Domestic_Gnd_Dim_Weight>
          <hazardous_material>
            <description>####
            </description>
            <applies to>
             <state>####</state>
           </applies_to>
           <allow_international>####
           </allow_international>
           <allow_ground>####
           </allow_ground>
           <allow_air>####
           </allow_air>
           <allow_usps>####
           </allow_usps>
          </hazardous_material>
          <Related>
            <Sku>####</Sku>
            <Part>####</Part>
            <Desc>####</Desc>
          </Related>
          <Price>###</Price>
       </Detail>
       <Time>hh:mm:ss</time>
    </Available>
</AvailableBatch>


<Date> is the Batch date
<Type> Full (all parts); Changes (Only changed parts)
The "<available>" block will repeat.
<Sku> The Internal Morris sku.
<Part> The catalog part number.
<Gtin> The part upc number.
<Loc> is optional, only if location not combined.

<Code> Part status; I-instock, N-discontinued
<Desc> Description of code
<ReplacedBy> is the Internal Morris replacement sku

<Time> is the military time.








<Dim_Weight> the dimensional weight for extremely light or heavy packages





<hazardous> a description of the hazard, if it can ship ground, air or overseas and which states disallow the product.












<Related> related items to the sku; this block may repeat
<Sku> the related sku


Example of a "COMBINED location" file of ALL active items, (WITH detail), click here

Example of a "SEPARATE location" file of ALL active items, (WITH detail), click here

~~~~~~~~~~~~~~~~~~~~

"Available Batch":
[3]

And the third is also an "Available Batch", but contains all active items, without detail. It is currently being sent every night.


    <AvailableBatch>
       <Detail>n</Detail>
       <Date>mm/dd/yyyy</Date>
       <Available>
            <Sku>####</Sku>
            <Part>####</Part>
            <Loc>###</Loc>
            <Qty>###</Qty>             <Time>hh:mm:ss</time>
        </Available>
    <AvailableBatch>




<Date> = Batch date
The "<available>" block will repeat.
<Sku> - Internal Morris sku.
<Part> - Catalog part number.
<Loc> is optional, only if location not combined.


<Time> = military time.


here
Example of a "COMBINED location" file of ALL active items, (WITHOUT detail), click:
here

Example of a "SEPARATE location" file of ALL active items, (WITHOUT detail), link:
http://morris.morriscostumes.com/out/available_batchnyyny.xml

~~~~~~~~~~~~~~~~~~~~

"Open Orders Summary":

If you so choose, the "Open Orders Summary" is also available; currently being sent out every night.
An example of an open orders file NAME follows:

ex: [111111/out/openorders_summary_05012006.xml]
(the "111111" representing the customer number, and the "05012006" representing the date of the file).



<Summary>
    <Type>Open Orders</Type>
    <StartDate>##/##/####</StartDate>
    <EndDate>##/##/####</EndDate>
    <OrderDetail>
        <Order>

            <Xmode>#</Xmode>

            <Status>###</Status>
            <Header>
               <OrderNum>###</OrderNum>
               <Location>###</Location>
               <Shipment>###</Shipment>
               <po>###</po>
               <InvoiceNum>#</InvoiceNum>
               <InvAmt>##.##</InvAmt>
               <ChargeAmt>#.##</ChargeAmt>
               <DiscAmt>###.##</DiscAmt>
               <Shipping>###.##</Shipping>
               <Tax>###.##</Tax>
               <Total>###.##</Total>
               <Terms>##-#####</Terms>

               <Via>##-#####</Via>
               <ShipTo>
                    <Address>
                      <Line1>####<Line1>
                      <Street1>###</Street1>
                      <Name>####</Name>
                      <Street2>###</Street2>
                      <City>###</City>
                      <State>###</State>
                      <Zip>###</Zip>
                      <Country>###</Country>
                      <Phone>####</Phone>
                    </Address>
                   </ShipTo>
               </Header>
               </LineItems>
                    <Line>
                      <No>##</No>
                      <Sku>##</Sku>
                      <Part>##</Part>
                      <Location>##</Location>
                      <Ordered>###</Ordered>
                      <Ship>###</Ship>
                      <Backorder>###</Backorder>
                      <Price>###</Price>
                      <Net>###</Net>
                    </Line>
               <Boxes>

                    <Box>
                        <No>##</No>
                        <TrackNum>##</TrackNum>
                    </Box>
               </Boxes>
               <UntrackedBoxes>##</UntrackedBoxes>
         </Order>
    </OrderDetail>
    <Date>mm/dd/yyyy</Date>
    <Time>hh:mm:ss</time>
    <CancelCode>:#</CancelCode>
    <CancelReason>###</CancelReason>
    <Count>hh:mm:ss</Count>
</Summary>





<Order> block repeats for POs with splits/multi.
<Xmode> <--Ignore (it's for the programmer).

<Status> values: invoiced, shipped or deleted. 'Invoice', 'Deleted' & 'shipped' have mm/dd/yyyy appended.

<Shipment> - Zero means no shipments.

<Invoice Num> thru <Total> are optional tags, used only if invoiced, shipped and non-zero.





<Terms> determined by you and Morris' Costumes.
<Via> = Ship Via. Click HERE for detail.





<Street2> is an optional field.



<Country> may or may not exist.





<Line> repeats for every line item.
<No> = Line number.


<Location> is optional if not same as Header.

<Ship> is optional (used only if shippable/shipped).
<Backorder> is optional, (used if NOT shippable/shipped).


<Boxes> is an optional block, used for UPS only shipments.
<Box> thru </Box> repeat for every box (if shipped).




<UntrackedBoxes> - Enter quantity. *This field is optional, for NON-UPS shipments (if shipped).


<Time> = military time.
<Count> is how many orders there are.

<CancelCode> is an optional field. Possible values are 1,2,3,4 or 5.

<CancelReason> 1 - Out of Stock, 2 - Credit Card Problem, 3 - Invalid Address, 4 - Order did not complete, please reorder, 5 - Customer Requested cancellation.

For an example of an "Open Orders" file, click HERE.

~~~~~~~~~~~~~~~~~~~~

"Daily Summary":
At the end of the day, you will get a summary of all XML created for you in the last 24 hours.
It will look JUST LIKE the "Open Orders" batch (see above), the only difference is...

<Type>###</Type> will say "Daily".

This notification is only to advise you that a package of returned product has been received. It will be examined for credit processing in the near future.

If Morris has received retuned product, you will receive the following information about your return.

<OrderReturns>
  <Return>
    <Status>Received</Status>
    <ReceivedDate>mm/dd/yyyy</ReceivedDate>
    <ReturnNum>######</ReturnNum>       The return authorization (RA) number.
    <Location>##</Location>                      The location where the product was returned.
    <po>####</po>                                     The po on the returned goods
  </Return>
</OrderReturns>

An example of a daily summary file NAME: ex: [111111/out/daily_summary_05012006.xml]
(the "111111" representing the customer number, and the "05012006" representing the date of the file).

Also, keep in mind that the "Daily Summary" is all orders that "changed" that day... this could mean added, invoiced, picked, etc.
However, "Open Orders" batch is ALL open orders.


~~~~~~~~~~~~~~~~~~~~

"Weekly Summary":
You will also recieve a "Weekly Summary", which is no different than the "Daily Summary", other than it's weekly and not daily.

~~~~~~~~~~~~~~~~~~~~

"Current Load History":
A record of the most current (real-time) orders/batches loaded, whether successful or not.
An example of a "current load history" file name follows:

ex: [111111/out/current_loadhistory_05012006_120000.xml]
(the "111111" representing the customer number, the "05012006" representing the date of the file, and "120000" represents the file number).

For an example of a "Current Load History" file, click HERE.

In the example above, be sure to notice the "Failed PO" and the status of "Rejected" it received. Also, there's another batch status of "Warning" to notice as well. For another reminder of all possible statuses, click STATUS.

NOTE:
There's a plethora of reasons that an order could fail and it's important that you pay attention to the text attached.

~~~~~~~~~~~~~~~~~~~~

"Daily Load History":
Same as "current load history", just daily.

ex: [111111/out/daily_loadhistory_05012006_120000.xml]

~~~~~~~~~~~~~~~~~~~~

"Weekly Load History":
Same as "daily load history", just weekly.

ex: [111111/out/weekly_loadhistory_05012006_120000.xml]

~~~~~~~~~~~~~~~~~~~~

Exactly which ones you get & how often are not fixed in cement. So, if you need to, you can download them as often (or not often) as you like. You may also post them.
Always post to:
cgi-bin/doxml.cgi&userid=xxxx&password=yyyy&xml_url=piggy&message=done


Incoming format always:
     userid=xxxxxx
     password=yyyyyy
     xml_url=full path (URL) to xml file
     message=done

Note on XML files given to you:
They will persist a few days so you can pick them up whenever. The XML for a given po will have the same name, so if you wait a day and you got three emails, there will still be only one XML file (the latest).


For help with this web site


 


XML Real-time Error Messages   |   XML Availability Schedule and Naming Conventions   |   Specification for Morris Realtime XML Protocol