You can set up an adaptive document as a web channel for a letter.
You can assemble an adaptive document using letter components, such as , so that any changes mde to the letter components are automatically reflected in the adaptive document.
When you choose to create an adaptive document based on a letter, 
The letter components show up in the sidekick, which you can drag and drop in the adaptive document.
The subsequent changes made to the letter component are reflected in the adaptive document.
Adaptive documents centralize the creation of personalized, interactive, and device friendly HTML-based digital correspondences, statements, and documents. (For PDF-based digital correspondences, see Create Correspondence.) You can quickly assemble digital correspondences, statements, and digital documents from both pre-approved and custom-authored content.
Adaptive documents are responsive in nature and change layout and design automatically based on user device and settings. Adaptive documents make it convenient for customers to read and interact with documents, such as welcome kits or statements, on devices of varied screen sizes.
You can also include targeted content and adaptive form components in an adaptive document to make it interactive and personalized for customers. Adaptive documents are easy to author, manage, personalize, deliver, and has built-in ability to measure the usage patterns.
The key benefits of the adaptive documents are:
- Batch processing support to create multiple adaptive documents.
- Support to use pre-approved and custom authored content.
- Analytics dashboard to measure the usage pattern of documents.
- Responsive design makes it easier to use documents on mobile devices.
- Templates based to provide unique and customized appearance.
- Support to use document fragments (text, image, condition, and list).
The intuitive interface, drag-and-drop functionality, standard form components, and integrated repository for assets facilitate quick and easy authoring of adaptive document. When you create a new or edit an existing adaptive document, you use the following user interface elements:
- Document fragments
- Data dictionary elements
- Letter hierarchy elements
- Sidekick components
- Adaptive document page
- Layouts of document fragments
Adaptive document adds new tabs to the Content Finder to display document fragments, data dictionary elements, and letter hierarchy elements. You can drag-and-drop document fragments, data dictionary elements, and elements of a letter to the adaptive document. If you have a long list of elements, you can use filters to view elements of a particular type. For detailed information about document fragments, see Creating Document Fragments.
The Content Finder pane also allows you to search, view, and use other assets from your AEM repository. It consists of several tabs that segregate different types of content, such as images, documents, pages, movies, and more. For more information about finding assets in AEM repository, see Finding and Viewing Digital Assets.
Sidekick includes components that you can use to build an adaptive document. Adaptive documents have access to all the components used in an adaptive form. You can drag components from the Sidekick onto the adaptive document to add and configure text, table, images, and other form elements.
For example, you can use adaptive forms components for transactional records and tables. These records and tables can be pre-filled with specific user data and help in generating documents with personalized transaction details.
Apart from the adaptive forms components, the following adaptive documents-specific components are also provided:
- Document Fragment component: The Document Fragment component serves as a container for Text, List, Images, and Condition document fragments of a letter. You can edit the layout properties of a Document Fragment component to change the appearance of its content.
- Document Fragment Group component: The Document Fragment Group serves as a container for a group of document fragments and also maps to the target areas of a letter-based adaptive document. It helps in addressing a set of document fragments as a single unit. You can edit the layout properties of a Document Fragment Group component to change the appearance of its content.
For the individual document fragments which appear inside a Document Fragment Group component, the layout configuration of the individual document fragment is ignored and layout configuration specified for the Document Fragment group is applied. For more information about layout configurations, see Configure layout of a document fragment.
Click the +Create icon and click Create Adaptive Document. An option to select a template appears. For more information about templates, see Adaptive document templates.
Select a template to apply and click Next. Options to specify basic information and document model appear.
You can apply a different template to an adaptive document at the later stage. For detailed steps, see Apply a different template to an adaptive document.
Specify the values for the following fields. The Title and Name fields are mandatory:
- Title: Specifies the title of the document. The title helps you identify the document in the AEM Forms user interface.
- Name: Specifies the name of the document. A node with the specified name is created in the repository. As you start typing a title, value for the name field is automatically generated. You can change the suggested value. The name field can include only alphanumeric characters, hyphens, and underscores. All the invalid inputs are replaced with a hyphen.
- Description: Specifies the detailed information about the document.
- Tags: Specifies tags to uniquely identify the adaptive document. Tags help in searching the document. To create tags, type new tag names in the Tags box.
A letter is a PDF-based correspondence created from both pre-approved and custom-authored content. You can create an adaptive document based on a letter and use elements of a letter to add structured content to the adaptive document. An adaptive document based on a letter can also access all the document fragments which are not associated with any letter and the document fragments associated to the selected letter.
To create the adaptive document based on a letter:
In the Document Model tab, select Letter Templates. A list of letters appear. Select a letter from the list and click Create. An adaptive document based on a letter is created and a dialog to open the document for editing appears.
You can apply a different letter to an adaptive document at the later stage. For detailed steps, see Edit Document Model properties of an adaptive document.
A data dictionary is a structured catalog, an XML schema, of data elements and their descriptions. It is used to provide structure for storing customer/recipient data. You can associate a data dictionary to an adaptive document and use its elements to add dynamic content to the adaptive document. An adaptive document based on a letter can also access all the document fragments which are not associated with any data dictionary and the document fragments associated to the selected data dictionary.
To create the adaptive document based on a data dictionary:
In the Document Model tab, select Data Dictionary. A list of data dictionaries appears. Select a data dictionary from the list and click Create. An adaptive document based on a data dictionary is created and a dialog to open the document for editing appears.
You can apply a different data dictionary to an adaptive document at the later stage. For detailed steps, see Edit Document Model properties of an adaptive document.
Click Open. The adaptive document opens for editing. You can start editing and designing the adaptive document.
Based on the type of adaptive document, the following tabs are displayed in the Content Finder:
- For an adaptive document based on a letter, letter model tab and document fragment tabs are displayed.
- For an adaptive document based on a data dictionary, document fragment tab and document model tabs are displayed.
- For adaptive document that has no document model, the document fragment tab is displayed.
Along with Sidekick components, you can also drag-and-drop these elements to an adaptive document.
Using tables is an effective, simplified, and organized way of presenting complex data. It helps users in identifying information easily and providing inputs in an ordered arrangement of rows and columns. Most forms from financial services and government organizations require large data tables to put numbers and perform calculations.
AEM Forms provides a Table component in AEM Sidekick that lets you create tables in adaptive document. For detailed information about the Table component, see Tables in adaptive forms.
If you create an adaptive document based on a letter and the letter uses a layout fragment to create tables, then all the XFA elements used in the letter and layout fragment are available in the Data Model tab of the AEM Content Finder. You can drag-and-drop and use these XFA elements, including entire tables, in an adaptive document. For more information, see Use XDP components to create a Table.
If you create an adaptive document based on a data dictionary, then the elements of the data dictionary are listed in the Data Model tab of the Content Finder. You can drag-and-drop a table from the Sidekick and map its cells and rows with collection items and elements of the data dictionary listed in the content finder.
Adaptive documents allow you to preview document fragments in the author user interface. You can:
- Populated document fragments in the author user interface using data from an XML file. The data XML file can reside in the local file system of the machine where AEM Forms server is running or in the CRX repository.
- Populate document fragments in the author user interface using sample data associated to the data dictionary.
- Preview document fragments without populating any data.
Let’s take example of the following bank statement header where we want to populate with data from an XML file.
In this example, the element name for property:
- Customer Name is name
- Customer ID is customerId
- Statement Period is statementPeriodFrom and statementPeriodTo
The XML file that contains data in the following format:
In the sample XML, the <accountStatement> tag contains relevant tags and data of account statement. Within the tag, the data for each cell is defined within the tag for its element name, such as <name>, <customerId>, <statementPeriodFrom>, <statementPeriodTo>, and <accountType>.
To preview this data with the document fragment in the authoring mode, point the adaptive document containing the document fragment to the absolute XML location. For example, if the adaptive document is at http://localhost:4502/content/forms/af/geometrixx-finance/account-statement.html and the data XML file is saved in CRX at /content/geomtrixx-finance-statement-data/template-xmls/april.xml. Open the following URL:
http://localhost:4502/cf#/content/forms/af/geometrixx-finance/account-statement.html?dataRef=crx:///content/geomtrixx-finance-statement-data/template-xmls/april.xml and click Preview from the context-menu of document fragment.
To populate document fragments using sample data associated to the data dictionary, specify the use useTestData=1 attribute in the URL. For example, http://localhost:4502/cf#/content/forms/af/geometrixx-finance/account-statement.html?useTestData=1.
If you open an adaptive document from, AEM Forms management user interface the useTestData=1 is automatically added to the URL.
The useTestData parameter has higher precedence over the dataRef parameter. Moreover, if no sample data is attached, then the associated fields are displayed empty.
Adaptive documents do not support the Image field. You cannot specify image data and see it merged in the document. Instead of image field, use the image component to add the images to an adaptive document.
For information about sample data in data dictionary, see data dictionary documentation.
After you complete editing the adaptive document, you can click the lens icon on the Sidekick to preview the document.
Adaptive documents support multiple layouts. The documents adapt the layout and design according to the size of the screen. You can simulate the preview of adaptive documents for various mobile devices. To simulate preview for a specific device, in the Simulator Options section, click Devices, and select a mobile device.
You can also preview an adaptive document from AEM Forms user interface with or without pre-filled data:
- To generate a preview of a document from the AEM Forms user interface without data, select the document, click Preview, and select the Preview as HTML option.
- To generate a preview of a document from the AEM Forms user interface with custom XML data, select the document, click Preview, and select the Custom option. In the dialog box, browse and select the custom XML file, and click OK.
Note: In the custom preview, if a condition expression contains a data element of collection type, then that data element is not evaluated. The data element must be of non-collection type (primitive or composite type) for the condition expression to get evaluated.
An adaptive document can have multiple document fragments (List, Text, Condition, and Image). You can change the layout and appearance of the document fragments to present the content in a logical, device friendly, easy to comprehend, and easy to navigate manner. For example, in an adaptive document, you can convert all the headings (H1) and contents beneath the headings to a cards layout.
You cannot apply multiple layouts to an element. For example, you cannot apply card and accordion layout to a single element (H1) simultaneously.
You can apply different types of layouts to the content. The layouts are applied at the runtime. Out of the box, the following layouts are supported:
You can configure layouts to convert the header and content beneath the header or a list of items to an accordion, set of cards, or tabs on the top.
To select a title for the corresponding accordion, set of cards, or tabs layout, specify a title selector (Tab Title). If no title selector (Tab Title) is specified, the contents of the item are searched for headings (h1 to h6) and the text of a heading are displayed as the title of the layout. If the content does not have a heading, then the first four words of the content are displayed as the title of the layout.
You can specify layout type in the Layout Configuration tab of document fragment component and document fragment group component.
The layout properties provide options to present heading and lists as accordion, cards, and tabs on the top. To open a Layout Configuration dialog and apply the properties:
In the Layout Configuration tab, choose a type of list or heading, and choose a layout type. For detailed information about using available list and heading types, see Choosing a list or heading.
Configure the custom properties of the selected list or the heading type. The custom properties help you choose a custom title, heading level, and type of the list. The list of properties depends on the type of list or the heading selected.
To specify custom properties, click the edit icon.
Property Description Tab Title
Specifies an attribute in the form of a CSS selector. The CSS selector identifies the text to be displayed as the title of the corresponding card, accordion, or tab.
Note: If no title selector (Tab Title) is specified or found, then the contents of the list are searched for headings (h1 to h6) and the text of a heading are displayed as the title of the layout. If the content does not have a heading, then the first four words of the content are displayed as the title of the layout. The title selector (Tab Title) has the higher precedence over the searched headings and contents.
Tab Boundary Specifies a heading level from H1 to H6. The search is restricted to the heading level specified in the Tab Boundary property. It is a mandatory property.
List Identifier Specifies the type of the list (ol/ul), a custom attribute, or a CSS selector. The lists are selected based on the criteria specified in the List identifier text box. List
Specify the nesting level of a list. Specify 0 for the top-level list, 1 for first level of nesting, and similar values for lower levels of nesting. Specify -1 to search lists at all the nesting levels, including top-level list. Cards Column Specify the number of columns for the cards layout. The default value is 2.
The Layout Configuration dialog box provides options to specify a layout type for headings and lists. Your layout can be based on:
By default, the analytics report for the last seven days is displayed. You can view reports for the last 15 days, last one month, and so on, or specify a date range.
The summary report section gives you an insight into how the form is performing on the following key performance indicators (KPIs):
- Total Renditions: Number of times the adaptive document has been rendered or opened
- Average Read Time: Average time spent to read the adaptive document
- Unique Visitors: Number of unique visitors
- Browser Distribution: Number of visitors using different browsers
- OS Distribution: Number of visitors using different operating systems
- Language Distribution: Number of visitors using various languages
The Browser Distribution, OS Distribution, and Language Distribution tables display the renditions, visitors, and submissions as per browsers, operating systems, and languages. These tables display maximum five entries, by default. You can tap Show More to display more entries and tap Show Less to come back to the regular five or less entries.
To display the breakdown of visitors as per browser versions, tap before a browser name.
To filter the analytics data further, you can click an entry in any of the tables. For example, if you click Mozilla Firefox 38.0 in the Browser Distribution table, the report is rendered again with data relevant to Mozilla Firefox version 38.0 as following: