Chapter 29

Fulfillment


CONTENTS


After the visitor has found your site, examined the merchandise, and made a selection after the customer has put items in the shopping cart, selected a payment mechanism, and ordered the products…after the Web site has done its job, it's time for you to go to work.

The Web technology described in the preceding four chapters culminates in getting the order to the site owner, either in e-mail form or in a file. If the site owner is also the manufacturer of the products, or if the products consist of information stored in files that can be sent to the customer, then filling the order is straightforward. If the site owner is a retailer responsible for sending the order to a manufacturer or fulfillment warehouse, then one more step is required to complete the purchase-coordinating the order with the fulfillment center.

Some fulfillment centers are operated by manufacturers; other centers are operated as a business in their own right. Regardless of who operates it, a warehouse somewhere contains the material your customers want. Once the site owner has established a business relationship with the fulfillment center, it's often possible to send a message to the center for each order, specifying the ship-to address and particular products to ship. The fulfillment center then picks the order and sends it out via a delivery service. Fulfillment centers often use computer-directed picking. The picking may be automated (as with an automated storage and retrieval system, or AS/RS), directed (using computer terminals linked by radio that tell the picker where to go and what to get), or paper-based (with a printed pick list given to each worker)-in any of these methods, the picking is driven by the fulfillment center's computer.

The interface between the Web site and the fulfillment center has the potential to be labor-intensive. If a human operator has to read e-mail from the Web site and phone it in to the fulfillment center-or fill out an order form-some of the profit from the order might be wiped out. The smart site owner finds a way to link the order from the Web site directly to software at the fulfillment center.

FAX

The "least common denominator" for communicating with a fulfillment center is the FAX machine. While some centers are able to accept orders electronically, practically all businesses today have FAX machines. If the site owner can get the order to the fulfillment center's FAX machine, she may be able to transfer the data-entry cost to the fulfillment center. As long as the volume is modest, FAXing may be an acceptable solution.

There are two ways to send a FAX from a Web site. The first, shown in Figure 29.1, is to send e-mail to a gateway site that then sends the same message by FAX. The second, shown in Figure 29.2, is to locally operate a FAX server that converts the file to FAX format. Both solutions are available for purchase from commercial sources, or as a service from free or very-low-cost providers.

Figure 29.1 : An e-mail-to-FAX gateway typically serves a limited geographical area.

Figure 29.2 : A FAX server sends out FAXes to any destination for local clients.

E-Mail-to-FAX Gateways

Unlike many Internet services, FAX gateways care about where they're located. A FAX gateway in Boston might be able to deliver FAXes in that city at little or no cost, but might refuse FAXes for destinations outside its local calling area. For this reason, many gateway services offer preferential (sometimes even free) rates for FAXes destined for their local area.

A relatively current list of gateways is available by anonymous FTP at ftp://rtfm.mit.edu/pub/usenet/news.answers/internet-services/fax-faq. The same list is on the Web at http://www.northcoast.com/savetz/fax-faq.html.

Free Services

The leading free FAX gateway service, TPC.INT, was experimental and has been discontinued. The results of the experiment are archived and can be obtained by sending e-mail to tcpfaq@info.tpc.int. The TPC approach allowed a user to send a message to, for instance, remote-printer.Arlo_Cats/Room_123@12025551234.iddd.tpc.int. The TPC.INT service pulled out the phone number (in this case 1-202-555-1234) and then looked up the area code and exchange in a coverage list. If it found a cooperating cell serving that area, it sent the message to that cell. Once at the cell, the remote-printer service used the message information to build a cover sheet-in this case, the following:

Arlo_Cats
Room 123

The TPC software is still available; many universities and a few companies offer the service for their local areas. A recent copy of the fax-faq file cited above lists free services in the following locations:

Caution
Many free FAX gateways are operated as a hobby, as a public service by universities, or as a demo for a commercial service. For a number of reasons, service might be discontinued without any notice. On a positive note, new services are added all the time. Check the FAQ for a current list.

Commercial Services

Commercial services have an obvious disadvantage (they cost something), but they're more likely to actually deliver your message and far less likely to "go dark" without
warning.

Tip
If your site generates high volume with low-cost products, the per-page cost of a FAX gateway service can become significant. Look for commercial gateways that are in the local calling area of your fulfillment center; these are most likely to offer you discounts.

A recent release of the aforementioned fax-faq file listed commercial services serving the following areas:

Some of these services have information available on the Web. For example, visit http://www.awa.com/faxinet/. Prices vary widely, depending upon your FAX volume and the service's monthly maintenance fees. One company, Interpage, offers a gateway service that bills the recipient. This approach is useful if the fulfillment house agrees to pay the FAX bill. For more information, visit http://www.interpage.net/.

Some services offer a free "test drive." To test Faxaway, potentially one of the least
expensive services, visit http://www.faxaway.com/testdrive/. General information is available at http://www.faxaway.com/. More detailed information is available at http://www.flexquarters.com/main/faxout.htm.

Note
Universal Access offers an interesting service that can be used as the basis for a rudimentary FAX-on-demand. A visitor calls its machine from the keypad of a FAX machine and enters a number corresponding to a Web page. The page is accessed and sent back to the requesting FAX machine. Links are flagged with their own unique number, so a customer potentially can retrieve the whole site by FAX. To try it, call 1-805-730-7777 (or visit http://www.ua.com/welcome.html).

FAX Servers

Depending upon many factors (not the least of which is where the FAX gateway is with respect to the destination FAX), a single-page FAX costs anywhere from below a dollar to three dollars or more (U.S.). For many site owners, these costs are well above what they would pay to place a long-distance call from their site to the fulfillment house. As volume grows, these site owners often decide to add a FAX modem to their server and send the FAX directly.

FAX 101

Before exploring the variety of FAX software solutions, it's useful to review how FAXes work.

FAXes send information by an entirely different set of protocols than data modems. This fact is sometimes lost on the user, since modern modems usually have the capability to send and receive both data and FAX. Technical details on FAXes are available at http://www.faximum.com/faqs/fax/ or by anonymous FTP at http://www.cis.ohio -state.edu/hypertext/faq/usenet/fax-faq/part1/faq.html and http://math-www.uio.no/faq/fax-faq/part2.html. Table 29.1 highlights the differences between the data modulation standards and the FAX modulation standards.

Table 29.1  FAX Standards Versus Data Transmission Standards

Data Rate
Data Modulation Standard
FAX Modulation Standard
9600 bps
V.32
V.29
14400 bps
V.32bis
V.17

Most people know that FAX machines have a "Group" standard. Group I and Group II machines are virtually obsolete. Group IV is a 64 Kbps standard that runs over the Integrated Services Digital Network (ISDN), an emerging standard. For now, nearly all FAX communications are Group III. This standard is set by the Telecommunication Standardization Sector of the International Telecommunication Union (ITU-T), a United Nations agency made up in part of the old CCITT. Group III is made up of several ITU-T standards, including T.4 and T.30.

These standards allow for a variety of options on each end of the conversation. The called machine can send Called Subscriber Information (a CSI frame) with the international phone number of the called machine. Similarly, the calling machine can send Transmitting Subscriber Information (a TSI frame).

A DIS frame contains feature information such as resolution, page size, and receiving speed. The two machines exchange DIS frames, then set the conversation to use a compatible subset of their individual capabilities.

The ITU-T standard for image transmission is T.4. This standard covers page size, resolution, transmission time, and coding schemes. The standard resolution is 3.85 scan lines per millimeter (about 98 dots per vertical inch) and 1,728 pixels across a scan line of 215 millimeters (about 204 dots per horizontal inch). "Fine" resolution changes the vertical resolution to 7.7 scan lines per millimeter (about 196 dpi) while leaving the horizontal resolution unchanged.

You can readily find print engines designed for computer printers that print at 300¥300 dpi and up, and many FAX modems support this higher resolution, but manufacturers differ on how this resolution is invoked. Consequently, even if two modems from different manufacturers have compatible resolutions, the caller might be unable to tell the called machine about that capability. In such cases, the machines fall back to standard resolution and an A4 page size.

Tip
To take advantage of advanced modem features, consider getting the same kind of modem used by the fulfillment house you deal with most frequently.

T.30 specifies that a FAX call proceeds through five phases:

Note
The Digital Command Signal (DCS) frame contains information about the data rate, resolution, paper size, and scan time. Given a choice, buy a FAX system that zealously follows the T.30 standard for this frame. By sending standard codes, your system is more likely to be able to take advantage of advanced capabilities such as 300¥300 pixels/inch resolution when communicating with FAX machines from other manufacturers. Remember that if you are using a Class 1 modem, T.30 is implemented in software; if you are using a Class 2 modem, the modem implements the T.30 protocol internally. For details on which modems support what parts of the T.30 standards, look at the links to modem reviews that appear on http://info-sys.home.vix.com/flexfax/modems.html. Although these reviews focus on compatibility with a single software product (HylaFAX, also known as FlexFAX), much of the information applies generally.

FAX calls made by computer are also governed by EIA/TIA-578 (Class 1) and either
SP-2388 or ANSI-592 (Class 2 and Class 2.0, respectively). This is where the concepts become complicated.

Tip
If you choose to purchase the Class 1 standard, be sure to get TIA/EIA Telecommunications Systems Bulletin 43 (TSB43), which updates and corrects EIA/TIA-578.

The Class 1 standard gives the computer low-level control over the FAX call. Most of the protocol (T.30) and image generation (rasterizing and T.4 compression) is done in software. A Class 1 implementation has the advantage that a protocol change can be implemented by distributing new software, rather than waiting for the modem manufacturer to ship a new modem. The disadvantage of Class 1 is that T.30 is a complex protocol with tight timing requirements. Multitasking operating systems such as UNIX might have difficulty meeting the timing constraints.

Class 2 modems implement most of the T.30 protocol in the modem, while the computer is responsible for rasterizing the image and compressing it into a T.4-compliant bitstream. Most modern modems try to implement Class 2. Unfortunately, Class 2 took an unusually long time to make it through the approval process, and once the technical specifications had settled down, many manufacturers used the draft standard as the basis for building modems. Many modems adhere to the first draft of the TR29.2 committee (known as document SP-2388 and dated March 21, 1990), denoted in text as "Class 2."

The official standard was finally released as EIA/TIA/ANSI-592 and is denoted in text as "Class 2.0" to keep it separate from the draft standard. Many modem manufacturers are moving to adopt Class 2.0 while preserving compatibility with Class 2.

To make matters even more complex, the Rockwell chip that serves as the basis for most Class 2 modems differs from SP-2388 in several ways, and manufacturers brought out many DOS programs that support the Rockwell implementation. Consequently, some modem manufacturers offer a "Rockwell-compatibility mode" that supports some (but not necessarily all) of the Rockwell differences.

The bottom line is that a Webmaster who wants to install a FAX server must carefully match the FAX modem and FAX software. Most FAX software comes with a list of "tested and approved" modems, but modem technology is one of the fastest-changing branches of electronics. The fact that a FAX server and FAX modem work together today does not mean that the next version of the software will work with the next version of the hardware.

Some modems support Class 1 as well as one or more of Class 2, Class 2.0, or Class 2-Rockwell. Which command set is actually used depends upon the FAX server software. For example, HylaFAX (described later in the "Free Software" section) works with the FAX modems shown in Table 29.2. The HylaFAX FAQ reports that HylaFAX should work with any Class 1, Class 2, or Class 2.0 FAX modem.

Table 29.2  Modems with Which HylaFAX Reportedly Works

ManufacturerModel
Notes
Class
AT&T ParadyneDataPort 14.4
+
1,2
Boca ResearchM1440E
 
1,2
 M1440E/RC32ACL
@
1,2
CPIViVa 14.4/FAX
 
2
CreatixLC 144 VF
o
2.0
DigicomScout+
+
1
Dynalink1414VE
 
2
E-Tech, Inc.P1496MX 5.06-SWE
 
2
EverexEverFax 24/96D, 24/96E
 
2
GVCMaxTech 28800
 
1
HayesOptima 144, Optima 28800
 
1
 Optima 2400+Fax96
 
2
IntelSatisFAXtion 400e
 
1
LogicodeQuicktel Xeba 14.4
 
2
MotorolaLifestyle Series 28.8
 
1
Multi-TechMT1432BA, MT224BA, MT2834BA
+,*
2
 MT1432BG
+
2
 MT1932ZDX, MT2834ZDX
+
2
NuvoVoyager 96424PFX
 
1
Olitec FranceOlicom Poche Fax Modem 2400
 
2
PPIPM14400FXMT, PM14400FXSA
 
2
 PM28800XFMT
 
2
SupraSupraFAX v.32bis
 
1,2
 SupraFAX v.32bis/RC32ACL
@
1,2
TelebitT3000, WorldBlazer
+
2
 Qblazer
 
2
TricomTornado28/42
 
1
Twincom144/DF
 
1,2
UDSFasTalk Fax32
 
1
USRoboticsCourier
 
1,2.0
 Sportster
 
1,2.0
Yocom1414E
 
2
ZoomVFX
 
1,2
Zero One Net.ZyXEL U1496
+
2,2.0
 Elite 2864
 
1,2,2.0

Legend:

*
The following models are reported to work: MT1432BA, MT1432BA/A MT1432MK, MT1432PCS.
@
/RC32ACL refers to second-generation products made with the Rockwell RC32ACL part and different firmware.
+
These modems are recommended for use with HylaFAX.
o
These modems use ModemWaitForConnect.
1
These modems support the TIA/EIA-578 Class 1 specification.
2
These modems support the TIA/EIA-592 draft SP-2388-A of August 30, 1991.
2.0
These modems support the TIA/EIA-592 Class 2.0 specification.

Free Software

One of the most popular free FAX servers is HylaFAX, previously known as FlexFAX. Written by Sam Leffler at Silicon Graphics, HylaFAX provides a seamless service accessible over a LAN. It produces a cover sheet, converts the document to image format, and makes the call. It can support advanced options such as remote FAX machine polling and automatic notification of FAX status. Figure 29.3 shows how a FAX server such as HylaFAX works over a LAN.

Figure 29.3 : Many clients can share a single FAX modem using a client/server architecture.

Note
The only difference between HylaFAX and FlexFAX is the name. After five years of public distribution, Leffler discovered that FlexFAX is a trademark in the state of New Hampshire. New distributions of the product use the name HylaFAX, though Leffler acknowledges that it may be a while before the Internet public gets used to the name change.

For a low price, Ready-to-Run Software (RTR) offers a compiled version of FlexFAX, bundled with cover sheets and other utilities, as FAXPak. For more information, visit http://www.rtr.com/. RTR reports good results with most Class 2 modems, and specifically recommends the ZyXEL line and the MultiModemZDX from Multi-Tech Systems. RTR sells both of these modem types.

Webmasters interested in compiling their own copy (or obtaining a pre-compiled version of HylaFAX for certain machines) should visit the overview, http://info-sys.home.vix.com/flexfax/overview.html, and the FAQ, http://info-sys.home.vix.com/flexfax/FAQ/index.html. Question 4 of the FAQ lists the requirements that a UNIX system must meet to support HylaFAX:

Table 29.3 lists the systems known to support these features, and shows whether or not a pre-compiled binary is available.

Table 29.3  UNIX Versions That Can Support HylaFAX

UNIX
Version
Binary Available?
AIX
3.2.5
Yes
BSD/386
 
No
FreeBSD
 
No
HP-UX
9.X
Yes
IRIX
5
Yes
ISC
4.0
No
Linux
 
Yes
OSF/1
V1.3
No
OSF/1
V3.0
No
SCO w/TCP
3.2V4
No
SCO ODT
3
No
SCO
5.0
No
Solaris
2.x
No
SunOS
4.1.4
Yes
SVR on Intel x86
4.2
No
Ultrix
4.4
Yes

HylaFAX also can be configured as an e-mail-to-FAX gateway. Figure 29.4 shows how this configuration works.

Figure 29.4 : Remote users can access the FAX server through an e-mail gateway.

Caution
Rasterizing and compressing a FAX image is computationally intensive. This task in HylaFAX can be performed on the client or server. Choose a machine with enough available computing power so that performance on your Web site is not adversely affected by outgoing FAXes.

Tip
To further reduce costs, configure HylaFAX to schedule jobs for off-peak hours based on the destination phone numbers. For example, there's no reason for a site in the U.S. to place a phone call at 4 p.m. (during peak rates) to a fulfillment house in Europe (where the pickers have gone home for the night). You can tell HylaFAX to wait until a time such as midnight, when the rates are lowest.
Use the DestControls configuration parameter to apply per-destination controls. By default, the destination controls file is /etc/destcontrols. The pathname is specified as DestControls in the faxq configuration file. For example, to restrict all calls to Great Britain (country code 44) to anytime between the hours of 11 p.m. and 1 p.m., include the following line in the controls file:
[+]44*$ TimeOfDay 2300-1300

Tip
sendfax, part of HylaFAX, supports fine mode with the -m switch. For best quality, use this option. For faster transmission time at lower quality, use -l to get low resolution mode.

You can FAX graphics by converting them to TIFF Class F documents. You also can send graphics and text using PostScript. sendfax, the portion of HylaFAX that manages the submission process, passes PostScript and TIFF Class F files directly to the HylaFAX server. To handle other formats (such as ASCII text), any machine where imaging is to be done must have a PostScript-to-FAX imaging utility. RTR supplies Ghostscript; there are links to the GNU source for this utility at the HylaFAX site.

Tip
By default, sendfax notifies the sender of any problems by e-mail. Use the -D option to turn on notification of all deliveries.

Caution
When sendfax is invoked from a CGI script, it thinks the sender is nobody (or whichever user is the default httpd user). To ensure that e-mail notifications come to the proper user, use the -f option with sendfax. For example, -D -f "John Jones <jjones@xyz.com>" tells sendfax to send e-mail notification of all outgoing FAXes to jjones@xyz.com.

To set up Ghostscript, perform the following steps:

  1. Follow the Ghostscript documentation to set up the makefile.
  2. Add tiffg3.dev to the list of Ghostscript devices.
  3. Build the gs executable.
  4. Use the -h option to ensure that the tiffg3 driver is present:
    gs -h
    Available devices:
         x11     tiffg3     tiffg4

  5. Run make install to install gs.
  6. Install Ghostscript fonts as necessary.

Note
Some versions of Ghostscript require the Independent JPEG Group (IJG) distribution in order to support PostScript Level II. If the documentation with your version of Ghostscript does not mention IJG, look in the archives for the Ghostscript/IJG code.

Tip
Versions of Ghostscript between 2.6.1 and 3.12 claim to support 2D encoding with the tiffg3 driver, but it does not work correctly. If you intend to use 2D encoding, be sure to obtain a version of Ghostscript later than 3.12.

Another off-the-Net piece of software that simplifies faxing is tiffmerge. This software allows the installer to save the form separately from the data. Then only the data has to be rasterized-the data can be merged with the existing form before it's sent. tiffmerge is available on the RTR FAXPak mentioned earlier.

Commercial Software

Several commercial products are available to address this niche. For example, Faximum (http://www.faximum.com/) has been well-received by reviewers at various UNIX publications. Its site includes a review that ran in the November 1992 issue of UNIX Review. For sites that prefer (or require) corporate support, Faximum is a good choice.

E-Mail and FTP

As fulfillment houses have become more sophisticated, they have begun moving toward Electronic Commerce, which includes the specialized area of Electronic Data Interchange (EDI). True EDI, which adheres to rigorous standards and often is delivered over special networks, is discussed later in the "EDI" section. This section addresses ways to deal with fulfillment houses that are ready to connect their computers to the Internet but aren't ready to invest in full EDI.

You Know It's EDI When…

A site owner can send e-mail to a wholesaler ordering merchandise at any time, but that doesn't make the exchange EDI. EDI is characterized by four factors:

The third factor might seem a bit odd. For many purchases, there's little need for a sales representative to contact a buyer personally. For commodity items, such personal contact prior to the sale represents an added expense for the seller that must be passed on to the buyer. The value added by such salespeople has traditionally been to make the buyer aware of their company as a supplier.

True EDI is conducted mostly over specialized value-added networks (VANs). These VANs serve to "introduce" trading partners who have no prior business relationship. Although each VAN is different, here's how EDI generally works:

  1. Sellers register their businesses on one of the VANs, using standardized codes to identify what goods or services they sell.
  2. Buyers post Requests for Quotations (RFQs) to the VANs in a standardized format.
  3. The VAN delivers RFQs to the appropriate sellers by e-mail.
  4. A seller analyzes each RFQ and prepares a bid, which is posted on the VAN.
  5. The VAN delivers the RFQ back to the buyer.

If the seller wins the bid, the buyer sends a PO message back through the VAN. A contract award message is posted, and in many cases (for example, if the buyer is the U.S. Government), the winning price is announced.

There are two major sets of standards used in EDI. The international standard, promulgated by the United Nations, is called EDIFACT. The U.S. standard is called X12. The ISO adopted EDIFACT in 1987 as its standard. The U.N. and ANSI have announced that, as of 1997, EDIFACT and X12 will be merged.

Note
The alignment plan was adopted by a mail ballot of X12 in December 1994/January 1995. That plan is available online at http://enterprise.disa.org/edi/ALIGNMEN/ALINPLAN.htp. The text of the floor motion adopted at the February 1995 X12 meeting is at http://enterprise.disa.org/edi/ALIGNMEN/ALINMOTN.htp.

Much of the impetus behind EDI has come from the U.S. Government. On October 26, 1993, President Clinton signed an Executive Memorandum requiring federal agencies to implement the use of electronic commerce in federal purchases as quickly as possible. The order specified that by the end of fiscal year 1997, most U.S. Federal purchases under $100,000 must be made by EDI.

The President's order formed the Federal Electronic Commerce Acquisition Team (ECAT) that generated the guidelines for the federal EDI initiative. ECAT has since been reorganized into the Federal Electronic Commerce Acquisition Program Office (ECA-PMO); its documents (and those of ECAT) are available on the Net at ftp://ds.internic.net/pub/ecat.library/. Many of the documents are distributed in PDF or PostScript form. See Chapter 33, "How to Add High-End Graphics." The ECA-PMO also operates a Web site at http://snad.ncsl.nist.gov/dartg/edi/fededi.html courtesy of the National Institute of Standards and Technology (NIST).

The federal implementation guidelines for purchase orders (in ftp://ds.internic.net/pub/ecat.library/fed.ic/ascii/part-22.txt) provide over 100 pages of details on how the U.S. Government interprets X12 transaction set 850 (described later in more detail in the "ASC X12" section).

RFC 1865, dated January 1996 and titled "EDI Meets the Internet," was written by a small team led by Walter Houser of the U.S. Department of Veterans Affairs, and reflects part of the federal focus and enthusiasm for EDI. Although much of EDI is conducted through VANs, Houser et al. points out that the EDI standards allow almost any means of transfer and that the Internet is well-suited for most EDI functions. The RFC quotes the ECAT as saying, "The Internet network may be used for EDI transactions when it is capable of providing the essential reliability, security, and privacy needed for business transactions."

Although the largest portion of federal EDI is conducted over the VANs, Houser et al. makes a strong case that tools are available on the Internet today to provide this essential reliability, security, and privacy.

Note
For more information on the federal EDI initiative, join the FED-REG mailing list. To subscribe, send a message to fed-reg-request@snad.ncsl.nist.gov. The message body should contain only the following line:
subscribe fed-reg
ECAT also operates a mailing list, appropriately named ecat. To subscribe, send a message to listserv@forums.fed.gov containing only the following line:
subscribe ecat firstname lastname

Note
For more general information on EDI, subscribe to the EDI-L mailing list. Send a message to listserv@uccvma.ucop.edu containing only the following line:
subscribe edi-l yourname
This mailing list also is transferred via gateway to the USENET newsgroup
bit.listserv.edu-l.
New methods of EDI, including EDI over the Internet, are discussed on the EDI-NEW mailing list. Send a message to edi-new-request@tegsun.harvard.edu containing only the following line:
subscribe edi-new yourname

Tip
To come up to speed quickly on EDI, you can review archives of many EDI-related mailing lists at ftp://ftp.sterling.com/edi/lists/.

UN/EDIFACT

The United Nations promulgates a set of rules "for Electronic Data Interchange For Administration, Commerce and Transport" (UN/EDIFACT). The full standards are available online at http://www.premenos.com/. Each document type (known in EDI circles as a transaction set) is quite robust. For example, a purchase order can specify multiple items or services, from more than one delivery schedule, with full details for transport and destination as well as delivery patterns.

To send a purchase order using UN/EDIFACT, the buyer sends an ORDERS message, which has three sections-Header, Detail, and Summary-as shown in Table 29.4.

Table 29.4  Purchase Order Message in EDIFACT

TagName
Header Section
UNHMessage header
BGMBeginning of message
DTMDate/time/period
PAIPayment instructions
ALIAdditional information
IMDItem description
FTXFree text
Segment Group 1
REFReference
DTMDate/time/period
Segment Group 2
NADName and address
LOCPlace/location identification
FIIFinancial institution information
Segment Group 3
REFReference
DTMDate/time/period
Segment Group 4
DOCDocument/message details
DTMDate/time/period
Segment Group 5
CTAContact information
COMCommunication contact
Segment Group 6
TAXDuty/tax/fee details
MOAMonetary amount
LOCPlace/location identification
Segment Group 7
CUXCurrencies
PCDPercentage details
DTMDate/time/period
Segment Group 8
PATPayment terms basis
DTMDate/time/period
PCDPercentage details
MOAMonetary amount
Segment Group 9
TDTDetails of transport
Segment Group 10
LOCPlace/location identification
DTMDate/time/period
Segment Group 11
TODTerms of delivery
LOCPlace/location identification
Segment Group 12
PACPackage
MEAMeasurements
Segment Group 13
PCIPackage identification
REFReference
DTMDate/time/period
GINGoods identity number
Segment Group 14
EODEquipment details
HANHandling instructions
MEAMeasurements
FTXFree text
Segment Group 15
SCCSchedule conditions
FTXFree text
REFReference
Segment Group 16
QTYQuantity
DTMDate/time/period
Segment Group 17
APIAdditional price information
DTMDate/time/period
RNGRange details
Segment Group 18
ALCAllowance or charge
ALIAdditional information
DTMDate/time/period
Segment Group 19
QTYQuantity
RNGRange
Segment Group 20
PCDPercentage details
RNGRange details
Segment Group 21
MOAMonetary amount
RNGRange details
Segment Group 22
RTERate details
RNGRange details
Segment Group 23
TAXDuty/tax/fee details
MOAMonetary amount
Segment Group 24
RCSRequirements and conditions
REFReference
DTMDate/time/period
FTXFree text
Detail
Segment Group 25
LINLine item
PIAAdditional product ID
IMDItem description
MEAMeasurements
QTYQuantity
PCDPercentage details
ALIAdditional information
DTMDate/time/period
MOAMonetary amount
GINGoods identity number
GIRRelated identification numbers
QVAQuantity variance
DOCDocument/message details
PAIPayment instructions
FTXFree text
Segment Group 26
PATPayment terms basis
DTMDate/time/period
PCDPercentage details
MOAMonetary amount
Segment Group 27
PRIPrice details
CUXCurrencies
APIAdditional price information
RNGRange details
DTMDate/time/period
Segment Group 28
REFReference
DTMDate/time/period
Segment Group 29
PACPackage
MEAMeasurements
QTYQuantity
DTMDate/time/period
Segment Group 30
REFReference
DTMDate/time/period
Segment Group 31
PCIPackage identification
REFReference
DTMDate/time/period
GINGoods identity number
Segment Group 32
LOCPlace/location identification
QTYQuantity
DTMDate/time/period
Segment Group 33
TAXDuty/tax/fee details
MOAMonetary amount
LOCPlace/location identification
Segment Group 34
NADName and address
LOCPlace/location identification
Segment Group 35
REFReference
DTMDate/time/period
Segment Group 36
DOCDocument/message details
DTMDate/time/period
Segment Group 37
CTAContact information
COMCommunication contact
Segment Group 38
ALCAllowance or charge
ALIAdditional information
DTMDate/time/period
Segment Group 39
QTYQuantity
RNGRange details
Segment Group 40
PCDPercentage details
RNGRange details
Segment Group 41
MOAMonetary amount
RNGRange details
Segment Group 42
RTERate details
RNGRange details
Segment Group 43
TAXDuty/tax/fee details
MOAMonetary amount
Segment Group 44
TDTDetails of transport
Segment Group 45
LOCPlace/location identification
DTMDate/time/period
Segment Group 46
TODTerms of delivery
LOCPlace/location identification
Segment Group 47
EQDEquipment details
HANHandling instructions
MEAMeasurements
FTXFree text
Segment Group 48
SCCScheduling conditions
FTXFree text
REFReference
Segment Group 49
QTYQuantity
DTMDate/time/period
Segment Group 50
RCSRequirements and conditions
RFFReference
DTMDate/time/period
FTXFree text
Summary
UNSSection control
MOAMonetary amount
CNTControl total
Segment Group 51
ALCAllowance or charge
ALIAdditional information
MOAMonetary amount
UNTMessage trailer

Additional complexity is concealed within these segments. For example, the structure of UNH (message header) is shown in Table 29.5.

Table 29.5  Structure of UNH

Component
Name
0062
Message reference number
S009
Message identifier
0068
Common access reference
S010
Status of the transfer

Some of these components themselves are structured. Table 29.6 shows the structure of component S009 (message identifier), and Table 29.7 shows the structure of component S010 (status of the transfer).

Table 29.6  Structure of S009

ComponentName
0065
Message type
0052
Message version number
0054
Message release number
0051
Controlling agency
0057
Association assigned code

Table 29.7  Structure of S010

Component
Name
0070
Sequence of transfer
0073
First and last transfer

Components whose names start with "C" are coded. For example, one of the components of BGM (beginning of message) is C002 (document/message name). Table 29.8 shows the structure of C002.

Table 29.8  Structure of C002

Component
Name
1001
Document/message name, coded
1131
Code list qualifier
3055
Code list responsible agency, coded
1000
Document/message name

Component 1001, in turn, is chosen from a code list; for example, 105 is a purchase order. Component 1131 is a qualifier; for example, 158 means "terms of delivery." Component 3055 is a list of agencies-for example, Dun & Bradstreet is 16, Israeli Customs is 149, and the U.S. Automotive Industry Action Group is 167.

The full UN/EDIFACT standard is available online via gopher at gopher://infi.itu.ch. Go to Entry 11 (UN and international organizations). Choose Entry 1 (UN EDITRANS, US/EDIFACT), then Entry 3 (UN-EDIFACT standards database), then Entry 1 (Publications). The actual standards are at Option 1, "Drafts." Draft D93A becomes standard S94a, D94a becomes the following year's standard, and so on.

As an alternative to gopher, you can get the standards by e-mail. Send a message to itudoc@itu.ch containing the following body:

START
GET ITU-1900
END

ASC X12

The U.S. standards accrediting body is the American National Standards Institute (ANSI). ANSI defines EDI through its Accredited Standards Committee X12, and the EDI standard has taken on the name of that committee.

Caution
The EDI standards are voluminous. Before investing in EDI software, get the help of a good consultant; before writing any EDI software of your own, read the standards. The X12 standard is available from:
Data Interchange Standards Association, Inc.
1800 Diagonal Road, Suite 200
Alexandria, Virginia 22314-2852
Voice: 1-703-548-7005
FAX: 1-703-548-5738

To send a purchase order using X12, the buyer uses transaction set 850. Table 29.9 shows the segments of transaction set 850.

Table 29.9  Purchase Order Segments in X12

Position
Segment
Name
010
ST
Transaction set header
020
BEG
Beginning segment for purchase order
030
NTE
Notes/special instruction
040
CUR
Currency
050
REF
Reference numbers
060
PER
Administrative communications contact
070
TAX
Tax reference
080
FOB
F.O.B. related instructions
090
CTP
Pricing information
110
CSH
Header sale condition
120
SAC
Service, promotion, allowance, or charge information
130
ITD
Terms of sale/deferred terms of sale
140
DIS
Discount detail
145
INC
Installment information
150
DTM
Date/time reference
160
LDT
Lead time
180
LIN
Item identification
185
SI
Service characteristic identification
190
PID
Product/item description
200
MEA
Measurements
210
PWK
Paperwork
220
PKG
Marking, packaging, loading
230
TD1
Carrier details (quantity and weight)
240
TD5
Carrier details (routing sequence/transit time)
250
TD3
Carrier details (equipment)
260
TD4
Carrier details (special handling or hazardous material)
270
MAN
Marks and numbers
280
CTB
Restrictions/conditions
285
TXI
Tax information lop
290
N9
Reference number
300
MSG
Message text loop
310
N1
Name
320
N2
Additional name information
330
N3
Address information
340
N4
Geographic location
345
NX2
Real estate property ID component
350
REF
Reference numbers
360
PER
Administrative communications contact
370
FOB
F.O.B. related instructions
380
TD1
Carrier details (quantity and weight)
390
TD5
Carrier details (routing sequence/transit time)
400
TD3
Carrier details (equipment)
410
TD4
Carrier details (special handling or hazardous material)
420
PKG
Marking, packaging, loading loop
010
PO1
Baseline item data
018
SI
Service characteristic identification
020
CUR
Currency
030
PO3
Additional item detail
040
CTP
Pricing information
049
MEA
Measurements loop
050
PID
Product/item description
060
MEA
Measurements
070
PWK
Paperwork
100
REF
Reference numbers
110
PER
Administrative communications contact
130
SAC
Service, promotion, allowance, charge information
140
IT8
Conditions of sale
150
ITD
Terms of sale/deferred terms of sale
160
DIS
Discount detail
165
INC
Installment information
170
TAX
Tax reference
180
FOB
F.O.B. related instructions
190
SDQ
Destination quantity
200
IT3
Additional item data
210
DTM
Date/time reference
220
LDT
Lead time
230
SCH
Line item schedule
235
TC2
Commodity
240
TD1
Carrier details (quantity and weight)
250
TD5
Carrier details (routing sequence/transit time)
260
TD3
Carrier details (equipment)
270
TD4
Carrier details (special handling or hazardous material)
280
MAN
Marks and numbers
290
AMT
Monetary amount
295
TXI
Tax information loop
300
PKG
Marking, packaging, loading
310
MEA
Measurements loop
330
N9
Reference number
335
MEA
Measurements
340
MSG
Message text loop
350
N1
Name
360
N2
Additional name information
370
N3
Address information
380
N4
Geographic location
385
NX2
Real estate property ID component
390
REF
Reference numbers
400
PER
Administrative communications contact
410
FOB
F.O.B. related instructions
415
SCH
Line item schedule
420
TD1
Carrier details (quantity and weight)
430
TD5
Carrier details (routing sequence/transit time)
440
TD3
Carrier details (equipment)
450
TD4
Carrier details (special handling or hazardous material)
460
PKG
Marking, packaging, loading loop
470
SLM
Subline item detail
480
SI
Service characteristic identification
490
PID
Product/item description
500
PO3
Additional item detail
505
TC2
Commodity
510
SAC
Service, promotion, allowance, or charge information
520
DTM
Date/time reference
522
CTP
Pricing information
524
PO4
Item physical details loop
530
N1
Name
540
N2
Additional name information
550
N3
Address information
560
N4
Geographic location
570
NX2
Real estate property ID component
580
REF
Reference numbers
590
PER
Administrative communications contact
010
CTT
Transaction totals
020
AMT
Monetary amount
030
SE
Transaction set trailer

Not every element is required. Table 29.10 shows the details of some commonly used fields.

Table 29.10  Details of a Few Segments in Transaction Set 850

Segment
Sequence
Element
Name
ST
01
143
Transaction set identifier code
ST
02
329
Transaction set control number
BEG
01
353
Transaction set purpose code
BEG
02
92
Purchase order type code
BEG
03
324
Purchase order number
BEG
04
328
Release number
BEG
05
323
Purchase order date
BEG
06
367
Contract number
BEG
07
587
Acknowledgment type
BEG
08
1019
Invoice type code
PO1
01
350
Assigned identification
PO1
02
330
Quantity ordered
PO1
03
355
Unit or basis for measurement code
PO1
04
212
Unit price
PO1
05
639
Basis of unit price code
PO1
06
235
Product/service ID qualifier
PO1
07
234
Product/service ID
CTT
01
354
Number of line items
CTT
02
327
Hash total
CTT
03
81
Weight
CTT
04
355
Unit or basis for measurement code
CTT
05
83
Volume
CTT
06
255
Unit or basis for measurement code
CTT
07
352
Description
SE
01
96
Number of included segments
SE
02
329
Transaction set control number

Element 143 (Transaction Set Identifier Code) takes on one of the X12 code values; for example, the value for a purchase order is 850.
Element 329 (Transaction Set Control Number) is a unique number within the transaction set functional group.
Element 353 (Transaction Set Purpose Code) is another code value; for example, 00 means "original."
Element 92 (Purchase Order Type Code) is another code value; for example, NE means "new order."
Element 355 (Unit or Basis for Measurement Code) is another code value; for example, EA means "each."

Tip
For more information on X12, subscribe to the x12g and x12c-impdef mailing lists. For the former, send e-mail to x12g-request@snad.ncsl.nist.gov with the following message:
subscribe x12g
For the latter, send e-mail to x12c-impdef-request@snad.ncsl.nist.gov with the following message:
subscribe x12c-impdef

The Grand Unification

UN/EDIFACT and X12 are due to be merged, and many firms already are using one of these two standards as the basis for their in-house standard. For example, Table 29.11 shows the segment hierarchy used by Staples Office Supplies for a purchase order.

Table 29.11  Staples' Purchase Order Segment Hierarchy

ComponentName
ISAInterchange start
GSGroup start
STTransaction set header
ST01-143
Transaction set ID code
ST02-76
Transaction set control number
BEGBeginning segment for purchase order
BEG01-353
Transaction set purpose code (OO = original order)
BEG02-92
P.O. type code (SA = stand-alone order)
BEG03-324
P.O. number
BEG05-323
P.O. date
PERAdministrative communications contact
PER01-366
Contact function code
PER02-93
Name
ITDTerms of sale/deferred terms of sale
ITD01-336
Terms type code
ITD03-338
Terms discount percent
ITD05-351
Terms discount days due
ITD07-386
Terms net days
ITD12-352
Description
DTMDate/time reference (delivery date)
DTM01-374
Date/time qualifier (002 = delivery requested by)
DTM02-373
Date (in YYMMDD format)
DTMDate/time reference (cancel after date)
DTM01-374
Date/time qualifier (001 = cancel after)
DTM02-373
Date (in YYMMDD format)
N1Ship-to name
N101-98
Entity ID code (ST = ship to)
N102-93
Name (name of Staples store or warehouse)
N103-66
ID code qualifier (92 = assigned by buyer)
N103-67
ID code (Staples store or warehouse number)
PO1Purchase order baseline item date
PO101-350
Assigned identification (line item number)
PO102-330
Quantity ordered
PO103-355
Unit of measure code
PO104-212
Unit price
PO106-235
Product/service ID qualifier (SK = Staples SKU number)
PO107-234
Product/service ID (Staples SKU number)
PO108-235
Product/service ID qualifier (UP = UPC number)
PO109-234
Product/service ID (UPC number)
PO110-235
Product/service ID qualifier (VA = vendor model number)
PO111-234
Product/service ID (vendor alphanumeric model number)
CTPPricing information
CTP02-236
Price qualifier code (RES = resale price)
CTP03-212
Unit price
PO4Item physical details
PO401-356
Pack (number of inner pack units per outer pack)
SLNSubline item details
SLN01-350
Assigned identification
SLN03-662
Relationship code (I = included)
SLN04-380
Quantity
SLN05-355
Unit or basis of measurement code (EA)
SLN09-235
Product/service ID qualifier (UP = UPC number)
SLN10-234
Product/service ID (UPC number)
SLN11-235
Product/service ID qualifier (SK = Staples SKU number)
SLN12-234
Product/service ID (Staples SKU number)
CTTTransaction totals
SETransaction set trailer
SE01-96
Number of included segments
SE02-329
Transaction set control number
GEGroup end
IEAInterchange end

The resemblance of the Staples system to X12 is apparent.

Secure E-Mail

EDI is associated with real money and is a natural target of thieves. Here are a few ways that a thief can take advantage of unsecured EDI:

To combat these problems, EDI needs two kinds of security:

Both needs can be met using the public key encryption systems that were introduced in Chapter 17, "How to Keep Portions of the Site Private."

PGP

PGP (Pretty Good Privacy) is a private implementation of public key cryptography by Phil Zimmerman. His software is widely available in the U.S. and overseas, and a commercial version also is available.

PGP can provide encryption and digital signatures, as well as encryption of local files using a secret key algorithm.

The PGP code is open for inspection, and has been vetted thoroughly. It's not based on open standards (Internet RFCs), however, so it's not often named as part of an EDI or near-EDI communications standard.

PEM

Privacy-Enhanced Mail (PEM) is defined in RFCs 1421 through 1424. PEM provides three major sets of features:

Certification deals with the issue of trust. For example, suppose that Bob sends a signed, encrypted message to Alice. He has to have Alice's public key-if someone can slip in the wrong key and convince Bob that it's Alice's key, then that person subsequently can read Bob's message (see Fig. 29.6).

Figure 29.5 : Anyone who can trick Bob into using the wrong key can read the message that Bob intended for Alice.

Figure 29.6 : Anyone who can trick Alice into accepting the wrong key can forge a message from Bob to Alice.

Alice needs to know Bob's public key so that she can verify the signature. If someone can convince her to accept a forged key, then that person can send messages to her that appear to be from Bob (see Fig. 29.6). The potential for abuse in EDI is obvious.

To reduce the likelihood of such forgeries, various certification hierarchies have been devised. If Bob and Alice know each other, they can exchange public keys through a private channel (for example, they can hand floppy disks to each other). If Bob and Alice are prospective trading partners, however, they probably have had no prior contact.

When Bob sends his first message to Alice using PEM, he can include a certificate from someone else saying that this public component really belongs to Bob. If Alice trusts the third party who has digitally signed the certificate, then Alice presumably can trust that the key presented as Bob's really belongs to Bob. We say "presumably" because the real strength of the certification lies in the certification policy of the third party. If he or she issues certificates to anyone who asks, then his or her certificates aren't worth much. If, on the other hand, he or she requires three forms of personal ID, then his or her certificates have a higher value.

There are legitimate needs for certification authorities at different levels of assurance. A commercial authority preparing certificates that will be used to sign contracts requires a higher level of assurance than a low-assurance authority whose certificates are used for non-commercial purposes. This discussion ultimately leads to the question of who certifies the certifiers.

The Internet PCA Registration Authority (IPRA) described in RFC 1422 has been designated to certify certification authorities (CAs). The "PCA" refers to Policy Certification Authority.A PCA is responsible for defining a certification policy and enforcing it among the CAs that it certifies.

Initially, IPRA is being operated by MIT on behalf of the Internet Society (ISOC). The plan is to transition IPRA to the Internet Society as soon as the Society is ready.

A hierarchy of PCAs and CAs is set up through IPRA, which intends to certify PCAs offering a range of levels of assurance. CAs then apply to PCAs for certification. Many CAs at the company or university level will certify users in much the same way as they now issue ID cards. Some CAs will require much higher (that is, commercial-grade) certification. Many CAs will want to certify under more than one PCA. For example, a company might issue a low- or medium-assurance certificate to all employees who are on the Internet, but a high-assurance certificate to buyers who are authorized to legally commit the company to a transaction (such as a purchase).

A portion of a certification path is shown in Figure 29.7.

Figure 29.7 : Each certificate is dependent upon the one above it in the hierarchy-when one certificate expires, the path expires.

For more information on the IPRA, read RFC 1422, visit http://bs.mit.edu:8001/ipra.html, or send e-mail to IPRA at ipra-info@isoc.org.

Mark Riordan has released a non-commercial program that implements much of PEM. It's called Riordan's Implementation of PEM (RIPEM) and is available to U.S. and Canadian citizens (or permanent immigrants to either country); information on getting access to the software is available at ftp://ripem.msu.edu/pub/crypt/GETTING_ACCESS.

Trusted Information Systems has released a non-commercial reference implementation of PEM named TIS/PEM. TIS/PEM has since been superseded by TIS/MOSS, the TIS MIME Object Security Services. TIS/MOSS extends TIS/PEM in that TIS/MOSS provides digital signature and encryption for Multi-purpose Internet Mail Extensions (MIME) objects. Thus, many types of files-documents in many formats, graphics, video, and even sound-can be signed and encrypted. TIS/MOSS supports the certification structures described earlier.

X.400

X.400 is the Open System Interconnect (OSI) mail standard that competes with various Internet standards. The Internet standards are developed using a fairly streamlined process based on circulation of Requests for Comments (RFCs) and voting by the Internet Engineering Task Force (IETF). X.400 is promulgated by the CCITT (now part of the ITU-T), so it has the force of international standardization behind it. The way international standards are set, various telephone companies play a significant role in the process, which some observers believe leads to unnecessarily complex standards. It's certainly true that few readers would describe the international standards as well organized or clearly written. Incompatible or non-conforming software often can be traced to differing interpretations of the standards documents.

The formal standards are spelled out in two sets of recommendations:

Internet purists argue that X.400 has all the elegance of a standard designed by committee. X.400 fans argue back that the Internet was developed piecemeal, and that newfeatures must be grafted in-these features can't be a natural part of the design. For a detailed analysis of these arguments, see The Internet Message: Closing the Book with Electronic Mail by Marshall T. Rose (Prentice-Hall, 1993).

The U.S. Government has been a strong supporter of OSI, so X.400 is likely to play an important part in the continuing federal EDI initiative. On the other hand, the Internet is growing far more quickly than X.400 and is likely to overtake anything that might be done in X.400.

File Transfer Protocol

Once two trading partners have "found" each other (possibly through e-mail or a VAN), they might decide to exchange documents using the Internet File Transfer Protocol (FTP). They agree on whether to use X12 or EDIFACT, and then they establish FTP directories and give each other the password to their EDI directories.

Security

For sensitive documents, two trading partners might agree also to use a public key encryption system such as PGP or PEM. They then set up a blind "drop-box" for incoming documents, and an anonymous FTP "pickup center." Documents intended to be world-readable, such as RFQs, are placed in the FTP directory unencrypted, but with a digital signature from the originator. Sensitive documents such as quotes are signed by the seller and then encrypted using the buyer's public key; finally, they're placed in the drop-box. If anyone breaks the receiving system's security (or steals the message from the Internet), that person is unable to read the message or change its contents.

FTP Macros

The FTP macro capability documented in Chapter 12, "Forms for Batching Processes," can be used in FTP directories to cause certain programs to run on the FTP host. These scripts can be used to extract data from the firm's business software on demand, rather than storing all documents in an FTP directory.

FTP Programming

If an application requires tighter integration than that provided by the FTP macros, a developer can write a program that obeys the FTP protocol but provides custom back-end processing. In his 1990 Prentice-Hall book UNIX Network Programming, W. Richard Stevens shows how to implement Trivial File Transfer Protocol (TFTP), a simpler relative of FTP. Stevens' example requires over 2,000 lines of C code to provide a client and a server. Although some of this code consists of comments, the real FTP is more complex than TFTP. By the time your firm is ready to modify FTP, you're ready to start considering commercial EDI solutions.

EDI

While something resembling EDI can be done by sending X12 or EDIFACT messages over the Internet (by e-mail or through FTP), true EDI is based on the assumption that the application at one end is talking to the application at the other end. If humans have to format and send-or receive and reformat-the messages, much of the benefit of EDI is lost.

Mapping Software

A number of firms, including Premenos (at http://www.premenos.com/) and TSI International (at http://www.tsisoft.com/), provide software that integrates with the client's business system on one side and the EDI standards on the other. Figure 29.8 illustrates this software.

Figure 29.8 : Commercial EDI software maps from the client's business system to the EDI standards.

Some of this software, such as Templar from Premenos (http://www.templar.com/), offers confidentiality, integrity, authentication, and non-repudiation of origin as well as receipt. These companies also offer "shrink-wrapped" EDI that is set up for dealing with a specific major trading partner or industry.

Versions of EDI software are available for all machines from desktop models to mid-range UNIX boxes to MVS mainframes.

VANs

VANs once offered the only secure, reliable interface between trading partners. Surveys conducted during that time showed that most users were unhappy with their VAN, citing poor performance and high costs as reasons for dissatisfaction.

With the booming popularity of the Internet, more companies are looking for ways to leave their VANs. Many VANs, in response, are connecting to the Internet, hoping to deal with users' complaints as well as grow the size of their market. To see an example of a VAN that's aggressively promoting its services over the Internet, visit http://www.compnet.com/. The FAQ at http://www.compnet.com/faq.html is particularly useful. It contains price details, specific setup instructions for Macintosh and Windows machines, and information about how to begin to receive and respond to federal RFQs immediately.

Internet EDI

The Internet is destined to play a larger role in EDI. A number of companies have banded together in a nonprofit consortium named CommerceNet to explore the general area of electronic commerce via the Internet. This consortium's FAQ is at http://www.commerce.net/information/faq.html. Also at that site is the charter of the CommerceNet EDI Working Group, which says in part that it will do the following:

"Define an architecture that links buyers, sellers, and service providers through the Internet as well as proprietary networks…"

One of the group's objectives is the following:

"Support alternative business models where communications flow within a VAN, across VANs bridged by the Internet, or entirely on the Internet."

More detailed information on the progress of bringing EDI to the Internet is available by subscribing to the IETF-EDI mailing list. Send a message to listserv@byu.edu with the following message body:

sub ietf-edi yourname