Importing from a Yahoo Shopping Cart
Format of the Data
This import allows you to import orders directly from a Yahoo Shopping Cart. Fishbowl uses the XML
option of Yahoo's Merchant Services exports to do this import.
Customers
By default, Fishbowl Inventory will import the order using a generic customer name like 'Yahoo Shopping Cart.'
To use a separate customer for each order, you can create an 'SCImportCustomers' system property and set the
value to true. You can also specify the customer name by creating a 'YahooSCCustomer' system property and
setting the value to the desired customer name.
Payments
By default, Fishbowl Inventory will import a payment for all orders that have a successful payment. If
you would like to turn off this function for any reason, such as if the payments are processed into the Accounting
System another way, you can create an 'SCImportPayments' system property and set the value to false.
Order Prefixes
By default, Fishbowl Inventory will not prefix the orders imported from a shopping cart. Instead, it will import
the order number as it appears in the file. If you would like to add a prefix to the order number, in cases where
two shopping carts may be entering the same order numbers, you can do so by creating a 'SCPrefixOrders' system
property and set the value to true. You can also add a 'YAHOOPrefix' property and set the value to what you want
the prefix to be. The default is 'YSC-'.
A note about shipping:
A shipping line item will be created with the total amount of shipping on the order. This line item will be created
using the Default Shipping Part that can be specified on the Shipping tab of the Sales Order Module Options. If no
shipping part is selected, then a miscellaneous line item will be created.
A note about tax rates:
A tax line item will be created for the "Total Tax" amount of the order being imported. It will be created using the
Default Flat Tax that can be set in the Tax Rate modules Module Options. If no default tax has been set, a miscellaneous
line item will be created instead.
The import file must conform to Yahoo's OrderList2.dtd file. This file is available on the web at
http://store.yahoo.com/doc/dtd/OrderList2.dtd or
more information can be found at http://developer.yahoo.com/stores/
under the "Automatically Export Orders as They Occur" section. For convenience, we have also provided the
contents of the file below.
OrderList2.dtd
<!ELEMENT OrderList (Order*) >
<!ATTLIST OrderList
StoreAccountName CDATA #REQUIRED>
<!ELEMENT Order (Time,
NumericTime,
Referer?,
Entry-Point?,
AddressInfo*,
IPAddress?,
Shipping?,
CreditCard?,
Comments?,
Coupon?,
YahooLogin?,
Cookie?,
Item*,
Total,
Trackable-Link?,
Yahoo-Shopping-Order?,
Space-Id?,
Bogus?,
OSBS?,
Warning?,
Suspect?,
Store-Status?,
HTTP-User-Agent?,
GiftWrap?,
GiftWrapMessage?,
CardEvents?
)>
<!ATTLIST Order
id CDATA #REQUIRED
currency CDATA #REQUIRED
>
<!ELEMENT Time (#PCDATA)>
<!-- The printed time, in the same format that HTTP uses. Always uses GMT.
For example: <Time>Mon Sep 11 18:16:07 2000 GMT</Time>. -->
<!ELEMENT NumericTime (#PCDATA)>
<!-- A Unix time_t -->
<!ELEMENT Referer (#PCDATA)>
<!ELEMENT Entry-Point (#PCDATA)>
<!ELEMENT AddressInfo (Name,
Company?,
Address1?,
Address2?,
City?,
State?,
Country?,
Zip?,
Phone?,
Email?,
Custom*
)>
<!ATTLIST AddressInfo
type (ship|bill) #REQUIRED
>
<!ELEMENT Name (First,
Last,
Full
)>
<!ELEMENT First (#PCDATA)>
<!ELEMENT Last (#PCDATA)>
<!ELEMENT Full (#PCDATA)>
<!-- You have your choice about whether you want name separated or split.
The order form can be set to accept either. When it accepts a single
name field, the separation into First and Last is a guess. When it accepts
separate names, the Full is the concatenation of the two.
Example:
<Name><First>Lance</First><Last>Brandow</Last><Full>Lance Brandow</Full></Name>
-->
<!ELEMENT Company (#PCDATA)>
<!ELEMENT Address1 (#PCDATA)>
<!ELEMENT Address2 (#PCDATA)>
<!ELEMENT City (#PCDATA)>
<!ELEMENT State (#PCDATA)>
<!ELEMENT Country (#PCDATA)>
<!-- Country will always start with a standard ISO-3166 code, and is normally followed by
the full name of the country.
An exception is that we use UK (rather than the ISO-3166 standard GB) for England.
This follows the Internet TLD practice.
Example: <Country>US United States</Country> -->
<!ELEMENT Zip (#PCDATA)>
<!ELEMENT Phone (#PCDATA)>
<!ELEMENT Email (#PCDATA)>
<!ELEMENT Custom (#PCDATA)>
<!ATTLIST Custom
name CDATA #REQUIRED
>
<!ELEMENT IPAddress (#PCDATA)>
<!ELEMENT Shipping (#PCDATA)>
<!ELEMENT CreditCard (#PCDATA)>
<!-- CreditCard will be at most 16 digits for standard credit cards,
but some merchants also accept PO numbers or other codes in
here which have no particular constraints.
The number is guaranteed to have all non-alphanumerics removed. -->
<!ATTLIST CreditCard
type CDATA #REQUIRED
expiration CDATA #REQUIRED
>
<!ELEMENT Comments (#PCDATA)>
<!-- The contents of the Comments box on the order form, if present -->
<!ELEMENT Coupon (Id?,
Description?,
Value?
)>
<!ELEMENT Value (#PCDATA)>
<!ELEMENT YahooLogin (#PCDATA)>
<!-- YahooLogin is limited to 63 characters, but is not normally included
for privacy reasons. This is only used for Yahoo-internal order feeds. -->
<!ELEMENT Cookie EMPTY>
<!-- These cookies are not normally included for privacy reasons.
They are only used for Yahoo-internal order feeds. -->
<!ATTLIST Cookie
B CDATA #REQUIRED
Y CDATA #REQUIRED
>
<!-- This should probably be named LineItem. It represents one entry
on the order form -->
<!ELEMENT Item (Id,
Code,
Quantity,
Unit-Price,
Description,
Url,
Taxable,
Thumb?,
Option*,
OptionLists?
)>
<!ATTLIST Item
num CDATA #IMPLIED
>
<!ELEMENT Id (#PCDATA)>
<!-- Id limited to 255 characters -->
<!ELEMENT Code (#PCDATA)>
<!-- No limit on code -->
<!ELEMENT Quantity (#PCDATA)>
<!-- Quantity limited to 9 digits -->
<!ELEMENT Unit-Price (#PCDATA)>
<!ELEMENT Description (#PCDATA)>
<!-- No length limit -->
<!ELEMENT Url (#PCDATA)>
<!-- Limited to 1024 characters -->
<!ELEMENT Taxable (#PCDATA)>
<!-- Value will be YES or NO -->
<!ELEMENT Thumb (#PCDATA)>
<!-- An HTML tag for a thumbnail image -->
<!ELEMENT OptionLists (OptionList*)>
<!ELEMENT OptionList (OptionValue*)>
<!ATTLIST OptionList
name CDATA #REQUIRED
>
<!ELEMENT OptionValue (#PCDATA)>
<!ELEMENT Option (#PCDATA)>
<!ATTLIST Option
name CDATA #REQUIRED
>
<!--
In an effort to programatically access the Line items, we provide
a canonical type attribute which will be one of the enumerated
values listed below.
-->
<!ELEMENT Total (Line*)>
<!ELEMENT Line (#PCDATA)>
<!ATTLIST Line
type (GiftWrap|Discount|MiscAdjustment|Coupon|GiftCertificate|Subtotal|TaxableAmt|NonTaxableAmt|Shipping|Tax|Credit|Total) #IMPLIED
name CDATA #REQUIRED
notes CDATA #IMPLIED
>
<!ELEMENT Trackable-Link EMPTY>
<!ATTLIST Trackable-Link
description CDATA #REQUIRED
id CDATA #REQUIRED
>
<!ELEMENT Yahoo-Shopping-Order EMPTY>
<!-- This tag appears when the order is through Shopping, and doesn\'t appear otherwise -->
<!ELEMENT Space-Id (#PCDATA)>
<!-- For Shopping orders, this tag identifies a specific page or category within Shopping -->
<!ELEMENT Bogus EMPTY>
<!-- This tag appears when the order is bogus, and doesn\'t appear otherwise -->
<!ELEMENT OSBS EMPTY>
<!-- This tag appears when the order processing needs to be triggered by OSBS, and doesn\'t appear otherwise -->
<!ELEMENT Warning (#PCDATA)>
<!ELEMENT Suspect (#PCDATA)>
<!ELEMENT Store-Status (#PCDATA)>
<!-- Not included except in Yahoo-internal feeds -->
<!ELEMENT HTTP-User-Agent (#PCDATA)>
<!-- Not included except in Yahoo-internal feeds -->
<!ATTLIST HTTP-User-Agent
ip CDATA #REQUIRED
http-user-agent CDATA #REQUIRED
>
<!ELEMENT GiftWrap EMPTY>
<!ELEMENT GiftWrapMessage (#PCDATA)>
<!ELEMENT CardEvents (CardAuth?,
CardEvent*
)>
<!ELEMENT CardAuth EMPTY>
<!ATTLIST CardAuth
fail-reason CDATA #IMPLIED
approval-number CDATA #IMPLIED
auth-response CDATA #IMPLIED
avs-response CDATA #IMPLIED
cvv-response CDATA #IMPLIED
amount CDATA #IMPLIED
paypal-auth CDATA #IMPLIED
paypal-payer-status CDATA #IMPLIED
paypal-address-status CDATA #IMPLIED
>
<!ELEMENT CardEvent EMPTY>
<!ATTLIST CardEvent
type (Charge|Return|VoidCharge|VoidReturn|Capture|Refund|Void|ReAuth) #REQUIRED
amount CDATA #REQUIRED
paypal-auth CDATA #IMPLIED
paypal-txid CDATA #IMPLIED
>