The document hierarchy describes the structure of the documents
that your application is designed to process. The levels within the
hierarchy are batch, document, page,
and field.

At the top of the document hierarchy is the batch, which refers
to all pages of all document types. Beneath the batch level, the document
hierarchy defines:
- The document types your application can process
- An application can process only one document type, or multiple
document types. For example, the TravelDocs sample application can
process car rental documents, hotel expense documents, and flight
documents.
- The page types within each document type
- Each document can contain only one page type or multiple page
types. For example, the TravelDocs car rental document includes the
rental agreement page and the optional insurance page, while the flight
document has only an air ticket page.
- The number and order of pages within each document type
- Pages can be required or optional. For example, a car rental document
has two pages at most. The rental agreement page is required and must
come first; and the insurance coverage page is optional.
- The data fields within each page type
- Data fields can be required or optional. For example, the hotel
document's Other Charges page has fields for
expense category, number of items, unit cost, and total cost.