| |
|
XML format for sending
orders
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
The count of orders
and lines must be correct. An order 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 to Morris Costumes. Individually (by
PO) or by Batch. Below is a detailed description of the XML file(s) used
to order (via web) from Morris. Towards the end of this documentation will
be more detail about posting orders 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 they have a maximum of 15 characters - NO MORE than that can
be used.
|
Format:
<Batch>
<Number>####</Number>
<Count>###</Count>
<Order>
<pickmsg>###</pickmsg>
<po>###</po>
<location>##</location>
<via>###</via>
<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>
<location>##</location>
</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.
<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.)
<Location> is an optional field.
If left blank, it will default from your customer file. Your options
are:
"20" - North Carolina
location
"60" - California
location
"100" - Manufacturers location
<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.
<Count>
is the number of lines on the order.
<ShipTo> maximum of 30
characters (can be alphanumeric, NO punctuation.)
ADDRESS RULES:
(for US only)
1) A name or company name must be provided
(<Line>); (30 spaces).
2) An address street, city, state,
(<-30 spaces each) and zip must be provided.
3) Zip code must be 5
or 9 digits in length; numeric only.
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.
<Street2> is an optional field.
Please visit the ISO website for accurate information regarding ADDRESS
COUNTRY 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!!
<location>
is an optional field. If left blank, it will default from your customer
file trying the header first.
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)
|
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.
~~~~~~~~~~~~~~~~~~~~
"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>blah
blah
blah</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.
~~~~~~~~~~~~~~~~~~~~
"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>
<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> will only exist if location not
combined.
<Time> = military time.
Example of a "COMBINED location" changes file,
(withOUT detail), link:
http://morris.morriscostumes.com/out/available_batchnyyyn.xml
Example
of a "SEPARATE location" changes file, (withOUT detail), link:
http://morris.morriscostumes.com/out/available_batchnyynn.xml
|
~~~~~~~~~~~~~~~~~~~~
"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>
<Detail>n</Detail>
<Date>mm/dd/yyyy</Date>
<Available>
<Sku>####</Sku>
<Part>####</Part>
<Loc>###</Loc>
<Qty>###</Qty>
<Detail>
<Desc>####</Desc>
<Weight>####</Weight>
<Price>###</Price>
</Detail>
<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.
Example of a "COMBINED location"
file of ALL active items, (WITH detail), link:
http://morris.morriscostumes.com/out/available_batch_customeryyyyy.xml
Example
of a "SEPARATE location" file of ALL active items, (WITH detail),
link:
http://morris.morriscostumes.com/out/available_batch_customeryyyny.xml
|
~~~~~~~~~~~~~~~~~~~~
"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.
Example of a "COMBINED location" file of ALL active
items, (WITHOUT detail), link:
http://morris.morriscostumes.com/out/available_batchnyyyy.xml
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>
<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. 'Invoice' &
'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.
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
"DailySummary".
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: www.morriscostumes/cgi-bin/doxml.cgi
Incoming
format always:
userid=xxxxxx
password=xxxxxx
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
|
|