Integration of the Create Correspondence solution with your custom portal integrating-create-correspondence-ui-with-your-custom-portal
Overview overview
This article details how you can integrate the Create Correspondence solution with your environment.
URL-based invocation url-based-invocation
One way to call the Create Correspondence application from a custom portal is to prepare the URL with the following request parameters:
-
the identifier for the letter template (using the cmLetterId parameter).
-
the URL to the XML data fetched from the desired data source (using the cmDataUrl parameter).
For example, the custom portal would prepare the URL ashttps://'[server]:[port]'/[contextPath]/aem/forms/createcorrespondence.html?random=[timestamp]&cmLetterId=[letter identifier]&cmDataUrl=[data URL], which could be the href from a link on the portal.
Create Correspondence application, save and upload the data to call the Create Correspondence UI at the given dataURL. This process can be done either from the custom portal itself or through another back end process.Inline data-based invocation inline-data-based-invocation
Another, more secure, way to call the Create Correspondence application is to go to the URL at https://‘[server]:[port]’/[contextPath]/aem/forms/createcorrespondence.html. Run this URL while sending the parameters and data to call the Create Correspondence application as a POST request, hiding them from the end user. This workflow also means that you can now pass along the XML data for the Create Correspondence application inline (as part of the same request, using the cmData parameter). This workflow was not possible or ideal in the previous approach.
Parameters for specifying letter parameters-for-specifying-letter
The order of parameters in the table specifies the preference of parameters used for loading the letter.
Parameters for specifying the XML data source parameters-for-specifying-the-xml-data-source
The order of parameters in the table specifies the preference of parameters used for loading the XML data.
Other Parameters other-parameters
If you use http or cq protocol for cmDataURL, the URL of http/cq must be accessible anonymously.