Document types

Use a document type to define the structure of data through a set of fields. It specifies the input that a flow service needs and the output it returns.

What is a document type?

A document type contains a set of fields that are usedthat are to define the structure and type of data in a document. You can use a document type to specify the input or output parameters for a flow service. Input and output parameters are the names and types of fields that a flow service requires as input and generates as output. These parameters are collectively referred to as a signature.

For example, a flow service takes two string values, an account number (AcctNum) and a dollar amount (OrderTotal) as inputs and produces an authorization code (AuthCode) as the output. If you have multiple flow services with same input parameters but different output, you can use a document type to define the input. It helps avoid manually entering the same input fields for each flow service.

Benefits of creating a document type

Document types provide the following benefits:

  • Using a document type as the input or output signature for a flow service reduces the effort that is needed to build a flow service.
  • Using a document type to build document or document list fields reduces the effort and time that is needed to declare input or output parameters or build other document fields.
  • Document types improve accuracy because there is less possibility to introduce a typing error while typing field names.
  • Document types make future changes easier to implement because you change one place (the document type) rather than everywhere the document type is used.