Create Form Data Model for IC Document

Create a Forms Data Model to integrate external data sources with Interactive Communication in Adobe AEM. This process involves setting up a RESTful service, uploading a Swagger file, and configuring service endpoints to dynamically retrieve and bind data. Learn how to securely connect to external services and test the model to ensure successful data retrieval.

A mock API server was implemented that simulates the Orders service for development and testing purposes. It exposes an endpoint to fetch orders for a given user (e.g., by user ID), returning predefined or dynamically generated order data in the same schema as the production API.

The swagger file used in creation of the form data model can be downloaded from here

Transcript
A Form Data Model, FDM, is a unified data integration layer in AEM forms that connects forms and interactive communications to structured data sources, enabling dynamic data binding and service invocation. To create a data source, navigate to Tools, Cloud Services, Data Sources. Select the appropriate project folder where the data source will be stored, then click Create. Provide a meaningful name, choose RESTful service as the service type, and upload the Swagger file. The Swagger file defines the available API endpoints, request parameters, and response structures. Once uploaded, AEM reads the specification and automatically configures the corresponding service endpoints. In most real-world scenarios, authentication must be configured to securely connect to the external service. However, in this particular case, no authentication is required, so that step can be skipped. Save the data source. This data source can then be selected when creating the Form Data Model, enabling the interactive communication to retrieve and bind data dynamically from the external system. A new Form Data Model was created by providing a meaningful title and name, for example, Users and Orders. The global folder was selected because this is where the previously created data source was stored. During the creation of the Form Data Model, the Products Orders data source was selected. This is the same data source that was created earlier using the Swagger specification. After the Form Data Model was created, it was opened in Edit mode for further configuration. The required services and their associated data objects were added to the model to make them available for data binding and service invocation. The Read Service for the Orders Response top-level model object was then configured. The service Get Orders by User was selected as the read operation to retrieve order data dynamically based on the provided user ID. No Write Service was associated with the model, as this implementation only requires data retrieval and not data submission or updates. Finally, the model was tested by providing a valid user ID to ensure that the service executed successfully and returned the expected order data.

Next Steps

Create Template

recommendation-more-help
4859a77c-7971-4ac9-8f5c-4260823c6f69