INTERNET-DRAFT           EXPIRES: MAY 1998           INTERNET-DRAFT

Network Working Group                                  R. Reddy
Internet-Draft                                         Sharp
                                                       Dec 1997  09

                Protocol for shopping over the Internet
                        December 01, 1997
                    <draft-ietf-ishop-00.txt>

STATUS OF THIS DOCUMENT

This document is an Internet-Draft. Internet-Drafts are working
documents of the Internet Engineering Task Force (IETF), its areas, and
its working groups. Note that other groups may also distribute working
documents as Internet-Drafts.

Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference material
or to cite them other than as "work in progress."

To view the entire list of current Internet-Drafts, please check the
"1id-abstracts.txt" listing contained in the Internet-Drafts Shadow
Directories on ftp.is.co.za (Africa), ftp.nordu.net (Europe),
munnari.oz.au (Pacific Rim), ds.internic.net (US East Coast), or
 ftp.isi.edu (US West Coast).

ABSTRACT
This Internet-Draft specifies a standard method for shopping on the
Internet. Using this protocol client programs can enumerate all the
products sold by category, search for a particular product and find
the cost or quantity of each product.  After realizing the cost of a
particular product, client programs can compare the price of this
product sold on other Internet sites.

Table of Contents

1.  INTRODUCTION
2.  SCENARIO
3.  PROTOCOL
4.  KEY FEATURES
        4.1   Initializing and closing a connection
        4.2   Universal Categories
        4.3   Categories
        4.4   Products
        4.5   Search
        4.6   Compare
        4.7   Customer Information
        4.8   Transactions
        4.9   Other Useful Information
        4.10  Internet Shopping Protocol Result
5.  IMPLEMENTATION
6.  REFERENCES
7.  AUTHOR'S ADDRESS




Expires: May, 1998                                           [Page
1]


Internet-Draft 00        Internet Shopping Protocol        December
1997



1.  INTRODUCTION

Today many companies are advertising their products on the internet,
but it is not easy to compare the price of a particular product model
sold by different retailers. Since there is no standard protocol to
find the attributes of products on the Internet, Customers have to
search using a search engine for the keywords of the product. It is
very cumbersome to find and compare the prices of the products and it
is not possible to easily monitor the prices programmatically.
The Internet shopping protocol provides a standard mechanism to get
information about the discounts or promotions on different sites. Since

there are millions of different products the protocol allows to search
by categories.
There are a wide variety of products and not all products have the same

attributes but mostly all products have some unique identifications.
For example books have an ISBN, which uniquely identifies a book,
similarly other industries have other unique identifications for most
of their products, another example is a model number and a company name

together uniquely identify a product.
Since different countries use different measurement systems the
protocol
allows to specify the measurement used. The client programs could
convert
to any required system depending upon the User's locale.
Some products are sold in gallons, some in pounds and some are sold by
the dozens, so we should be able to find out about the measurement
system used, the three most commonly used measurement systems are MKS
(Meter Kilogram Second), FPS (Foot Pound Second), CGS (Centimeter Gram
Second) and to make things complicated there is also a mixed
measurement
 which is a combination of all of the above.
Since the commerce on the Internet is global, payments for the goods
must be made in different currencies in different countries. The
protocol allows to specify the choice of currency. Apart from the
actual
cost of the product there are transaction costs and sales taxes. The
Internet shopping protocol provides a uniform mechanism of accessing
these values which are crucial for making shopping decisions.

Electronic shopping malls can be constructed by browsing products and
categories on different Internet sites using the Internet shopping
protocol.



2.  SCENARIO

To understand the protocol better, first lets go through a scenario.
Lets say a Customer wants to shop for a Fax machine and he/she wants to

pay the least price for a particular model.
First we need to find all companies selling electronics on the web.
The client program must be smart enough to know all the sites which
sell
 different categories of merchandise or we could use the "Directory
and Database services" or use LDAP services to locate database servers.

Using the above methods lets assume the IShop client program has found
14440 companies selling electronics on the Internet. The client program

can find out which of the companies support IShop protocol; This can be

done by using the host name and the standard port address for IShop.



Expires: May, 1998                                           [Page
2]


Internet-Draft 00        Internet Shopping Protocol        December
1997

There is no standard port number of Internet shopping at this point but
 a standard port can be set aside for this purpose.

Now lets say we reduced the search to 110 electronic companies which
support IShop protocol.
Create a socket and obtain a handle for the host server.
To find all the local stores. We have to use functions such as

ishop_handle3DiShopInitSession(MY_HOST,MY_PORT)
getBusinessLocationCity(ishop_handle,string);
getUniversalCategories(ishop_handle,category[],0)

By using the following operations lets say we further reduced the
number
of local stores to 10

searchCategory(ishop_handle ,"electronics",categoryKey[],1)
searchProduct (ishop_handle,categoryKey,"Fax*",productKey[],3)
if
(myFaxmodelNumber3D=3DgetManufactureProductID(ishop_handle,productKey)
   getSalePrice(ishop_handle,productKey,money_currency)
closeSession(ishop_handle)

Using the above operations on other hosts we can find the sale price of

the fax machine sold by the different online retailers. If more
information is needed, such as discounts, quantity in stock, functions
based on Product Key can be used to retrieve the required information.


3.  PROTOCOL

This protocol uses Client/Server paradigm. And the Transport is TCP/IP.

If Credit card information has to be transmitted over the network then
it is preferable to implement this protocol over Secure Socket Layer
(SSL). It is not mandatory to implement all the operations of the
protocol.


4.  KEY FEATURES

It is assumed that there is a database file or a database sever on the
host server running the IShop server protocol. The protocol is the port

of entry for accessing the data in the database.
The IShop protocol specifies numerous functions but not all functions
are required to be implemented. The functions which are not implemented

return functionImplemented 3D false in the ISHOPResult.
The result of every function such as its success or failure and other
useful information is returned in ISHOPResult.


4.1  Initializing and closing a connection

ishop_handle 3D iShopInitSession(MY_HOST,MY_PORT)
Binding to the host is done in the same call.
set the host name, port number to open a connection, no password is
required to authenticate the User.

ISHOPResult 3D closeSession(ishop_handle)
closes the connection.



Expires: May, 1998                                          [Page 3]

Internet-Draft 00        Internet Shopping Protocol        December
1997


4.2 Universal Categories

ISHOPResult 3D getUniversalCategories(ishop_handle,UnvCategory[],count)=

count 3D 0 for all universal categories such as books, automobiles,
entertainment, medicine, hardware, software, automobiles etc.


4.3 Categories

ISHOPResult3Dlong getCountCategories(ishop_handle,count)
returns count

ISHOPResult3DgetCategories(ishop_handle,categoryKey[],count)
computer books, cars


4.4 Products

ISHOPResult3DgetCountProducts(ishop_handle,categoryKey,count)
if categoryKey3D0; returns count of all products

getProducts(ishop_handle, category, products[],count)
if count 3D 0 and category =3D "" returns all products irrespective of =

category. Products returned can be product numbers, sku#s or stock
numbers etc. any product number unique to the database system.


4.5 Search

The search operation allows a client to request that a search be
performed on its behalf by a server.

searchCategory(ishop_handle, "category*",categoryKey[],count)
Searching is done on the Server side, wild cards can be used, all
searches are case in sensitive.

searchProduct(ishop_handle, categoryKey,"product*", productKey[],
count)
Searching is done on the Server side, wild cards can be used.



Expires: May, 1998                                           [Page
4]


Internet-Draft 00        Internet Shopping Protocol        December
1997


4.6  Compare

Comparison is done on the server on behalf of the client. The result of

comparison is returned in ISHOPResult

ISHOPResult3DcompareUniverisalCategory(ishop_handle,value)
ISHOPResult3DcompareCategory(ishop_handle,value)
ISHOPResult3DcompareProduct(ishop_handle,value)

value is a TEXT of maximum 100 characters.


4.7  Product Details

getSalePrice(ishop_handle, productKey, currencyValue)
getListPrice(ishop_handle, productKey, currencyValue)
getCostPrice(ishop_handle, productKey, currencyValue)

getCurrency(ishop_handle, productKey, value)
where value is : 13Dus dollar, 2=3Dyen, etc..
Mask bits are used for trading in more than one currency.
It is be possible to trade in more than one currency.

getProductImage(ishop_handle, productKey,ByteArray)
returns a GIF or a JPEG image, returns a byte array, using Base 64.

getManufactureProductID(ishop_handle, productKey, IDvalue)

could be model number, ISBN, IC number such as 20486, part number etc.

getManufacture(ishop_handle, productKey, value)
where value (string) is the name of the manufacturer.

getUnit(ishop_handle, productKey, unit)
where unit(integer) can be denoted as 1 3D lbs, 2 =3D oz, 3 =3D =
kilogram,
4 3D meter, 5 =3D centimeter, 6 =3D millimeter

getQuantity(ishop_handle, productKey, quantity)
could be number of boxes etc. returns available quantity (long).

getAge(ishop_handle, productKey, age, unit)
age 3D double
where unit can be denoted as 1 3D Years, 2 =3D Months, 3 =3D Days,
4 3D Seconds, 5 =3D Milliseconds etc.

getAttributes(ishop_handle, productKey, value)
value 3D TEXT of 1024 characters.
Unique attributes of the product, in text or an URL.
Suppose if the product is a house, then the description of the house is

given.



Expires: May, 1998                                           [Page
5]


Internet-Draft 00        Internet Shopping Protocol        December
1997

getComment(ishop_handle, productKey, text)
Merchant's comments and promotions.

getDiscount(ishop_handle, productKey, percentage)
getPremium(ishop_handle, productKey, percentage)

getDescription(ishop_handle, productKey, text)
Name of the Product, description must be less than  254 characters

getMadeInCountry(ishop_handle, productKey, country[2])
where country is a two letter character array such as US,JP,IN, CN etc.

getExpiryDate(ishop_handle, productKey, date)
This operation is required to specify if it is a one day garage sale
etc. date is a string in the network date format, date also includes
time of expiry.

getAvailableDate(ishop_handle, productKey, date, value )
date of the event or date when the product will be in stock.
value 3D 1 if product is in stock, 2 if product is discontinued, 3 if
product is temporarily out of stock.


4.8 Business Location

Some companies have more than one location.
Trading city where all the transactions are handled.

getBusinessLocationCity(ishop_handle, value)

If you are ordering pizza, it is useful if it is a local store

getBusinessLocationStreet(ishop_handle, value)
getBusinessCountry(ishop_handle, value)
getBusinessZip(ishop_handle, value)
getBusinessPhone(ishop_handle, value)
getBusinessFax(ishop_handle, value)
getSalesRep(ishop_handle, value)
getSupervisorEmail(ishop_handle, value)

value 3D TEXT of maximum 50 characters.


4.9 Customer Information

This information is optionally given by the customer

setCustomerFirstName(ishop_handle, value)
setCustomerLastName(ishop_handle, value)
setCustomerStreet(ishop_handle, value)
setCustomerCity(ishop_handle, value)
setCustomerZip(ishop_handle, value)



Expires: May, 1998                                           [Page
6]


Internet-Draft 00        Internet Shopping Protocol        December
1997

setCustomerCountry(ishop_handle, value)
setCustomerFax(ishop_handle, value)
setCustomerPhone(ishop_handle, value)
setCustomerEmail(ishop_handle, value)
sendPromotionalInfo(ishop_handle, promotion)

value 3D TEXT of maximum 50 characters.
promotion 3D true/false


4.10 SHIPPING ADDRESS

setShippingContact(ishop_handle, value)
setShippingStreet(ishop_handle, value)
setShippingCity(ishop_handle, value)
setShippingState(ishop_handle, value)
setShippingZip(ishop_handle, value)
setShippingInstructions(ishop_handle, value)

value 3D TEXT of maximum 50 characters.


4.11 Transactions

getTrasactionID(ishop_handle, TransactionID )

TransactionID is used to place orders and cancel orders during the
current session; Old transaction numbers cannot be obtained using this
protocol. Think of the Transaction number as a unique number in the
database system. Old Transaction numbers cannot be recycled, a new
Transaction must be generated once per every session. The Transaction
ID remains a constant and is valid for the entire session.
If the connection is lost then all the operations during the session
are rolled back. To save the results of any or all operations a session

must be successfully closed. Once the session is terminated, Old
Transaction Ids cannot be used except for obtaining the transaction
status.

ISHOPResult 3D AddOrder(ishop_handle, TransactionID,productKey)
ISHOPResult 3D CancelOrder(ishop_handle, TransactionID,OrderID)
ISHOPResult 3D CancelAllOrders(ishop_handle, TransactionID)

orders cannot be cancelled using a previously known Transaction number,

however orders placed during the current session can be cancelled. If
there is a break in connection during a transaction then the entire
transaction must be rolled back.

ISHOPResult 3D getTransactionStatus(ishop_handle, TransactionID)
Order processed, confirmation, cancelled, shipped date, order date etc.


getSalesTax(ishop_handle, orderID)

getTransactionCost(ishop_handle, TransactionID)
get shipping, handling and other service charges.

getTotal(ishop_handle, TransactionID)



Expires: May, 1998                                           [Page
7]

Internet-Draft 00        Internet Shopping Protocol        December
1997

getReport(ishop_handle, TransactionID, productKey[],
description[], cost[])

Detailed report of all the orders successfully placed. A list of
Product Key,
 Description and amount charged for each product. This list does not
include
sales tax, transaction cost or total sale price, there are other
functions
to retrieve this kind of information.

IShopResult3DBuy(ishop_handle, TransactionID, CreditCardNum,
ExpDate, Clearinghouse)
The processing can be done by the host server.
Merchants can setup the host server to transfer money to there
accounts. This
operation is optional to the protocol.


4.12 Other Useful Information

ISHOPResult 3D getIShopVersion(ishop_handle, version)
version is a TEXT value of maximum 20 characters

ISHOPResult 3D getCharset(ishop_handle, charset)

if ascii then charset 3D 1,  if ansi then charset =3D2 , if unicode =
then
charset 3D 3 etc.
Allows for databases to be in different languages and character sets.

getLanguage(ishop_handle, languageID)
The languageID is based on the values given by the Unicode consortium.


4.13 Internet Shopping Protocol Result

The ISHOPResult is the construct used in this protocol to return
success or
failure indications from servers to clients. In response to various
requests,
servers will return responses containing fields of type ISHOPResult to
indicate the final status of a protocol operation request.

ISHOPResult::3D
          SEQUENCE {
             functionImplemented BOOL
             resultCode ENUMERATED {
                        success              (0)
                        operationsError      (1)
                        protocolError        (2)
                        sizelimitExceeded    (3)
                        compareFalse         (4)
                        compareTrue          (5)
                        busy                 (50)
                                   }
             OrderID         ISHOPString
             Status          ISHOPString
             errorMessage    ISHOPString
}
ISHOPString depends on the charset used by the Host Server.

Expires: May, 1998                                           [Page
8]


Internet-Draft 00        Internet Shopping Protocol        December
1997


5.  IMPLEMENTATION

The above operations can be implemented using SQL on the host
side. Depending upon your host server operating environment JDBC, ODBC,

ADO (Active database objects), embedded SQL etc. can be used. It is not

relevant how the protocol is implemented on the host server, as long as

the functions return data, functions not implemented should return a
"function implemented 3D false" in ISHOPResult.

The IShop protocol is similar to the LDAP protocol, except that this
protocol is more tuned for shopping on the Internet.

Mode of payment, credit card transactions and the actual process of
trading is outside the scope of this protocol and is handled by the
Server programs as relevant using secure socket layers. See other
relevant RFC's, such as RFC 1898.

Note that there is no passwords or authentication required to search
for
products. Everybody can browse the stores as an anonymous user.

If the IShop protocol is installed on a web site, Customers can easily
shop or setup a client program to monitor for sale prices.


6.  REFERENCES

   [1] Lightweight Directory Access Protocol(LDAP), RFC 1777.

   [2] Directory and Database services -
       http://dsm0.ds.internic.net/internic.info/proposal/

   [3] Multipurpose Internet Mail Extensions- RFC 2045, section 6.8

       Base64 Content-Transfer-Encoding.

   [4] Work In Progress - IETF Policy on Character Sets and Language

   [5] Alvestrand, H., "Tags for the Identification of Languages", RFC
       1766.

   [6] CyberCash credit card protocol version 0.8 - RFC 1898.

   [7] Codes for the representation of currencies and funds - ISO 4217.

   [8] External Data Representation - RFC 1014.



Expires: May, 1998                                           [Page
9]


Internet-Draft 00        Internet Shopping Protocol        December
1997

7.  AUTHOR'S  ADDRESS

   Ravi Reddy (editor)
   Sharp Laboratories of America
   5750 NW Pacific Rim Blvd
   Camas, WA 98607
   USA

   Phone: 360-817-8480
   Fax:   360-817-843609
   Email: reddyr@sharplabs.com






Expires: May, 1998                                          [Page
10]