This is the final part of a multistep tutorial for creating your first interactive communications document. In this part, we look at the delivery of web channel document via email.

Once you have defined and tested your web channel interactive communication document, you need a delivery mechanism to deliver the web channel document to the recipient.

To be able to use email as a delivery mechanism for our web channel document, we need to make a minor change to the form data model. 

Login to AEM Forms.

Navigate to Forms ->Data Integrations

Open the RetirementAccountStatement Data Model in edit mode.

Select the balances object and click on the edit button.

Select the "pencil" icon to open the id argument in edit mode.

Change the binding to "RequestAttribute".

Set the accountnumber in the binding value as shown below.

This way we are passing in the accountnumber  through the request attribute to the form data model

Make sure you save your changes.

To learn more about the delivery mechanism of web channel documents, please follow this article

Setting the request atribute

Test Email Delivery of Web Channel Document

Login to CRX DE

Navigate to /home/users

Search for admin user under the user's node.

Select the profile node of the admin user.

create a property called "accountnumber". Make sure the property type is a string.

Set the value of this accountnumber property to "3059827". You can set this value to any random number as you wish.

Point your browser http://localhost:4502/content/getad.html.

The code associated with this URL will get the accountnumber of the logged in user. This accountnumber is then passed as requestattribute to the FDM. The FDM will then fetch the data associated with this accountnumber and populate the web channel document.

Please take a look at the following file in crx.If the name of your web channel document is not 401KStatement, please provide the correct name on line 15 of the code in the file below.

/apps/AEMForms/fetchad/GET.jsp

 

 

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy