2022.2

Table Of Contents
JSON
The Render Email Content task supports two types of JSON:
l
A JSON object or an array of JSON objects representing records. If a value in a record object is a
string, it is considered to be a field value. If a value in a record object is a JSON object, it is con-
sidered to be a nested table with detail records. For examples, see "JSON string examples" on
page77.
l
A JSON Record Data List (see the REST API Cookbook and "JSON Record Data List example"
on page79). When the "Execute Data Mapping" on page522 or "Retrieve Items" on page537
task is set to output Records in JSON, it outputs this kind of JSON data.
If the input is JSON, the task performs a REST call to the /rest/server-
engine/workflow/contentcreation/email/{templateId} endpoint on the Connect Server. For more inform-
ation see the REST API Cookbook.
The Render Email Content task expects UTF-8 encoded JSON job data files.
Note: Make sure that other components in the Workflow configuration working on the job data
handle UTF-8 encoded files correctly.
Processing
This task loops through each record in a Record Set or through each JSON object in an array. For each
record or JSON object, the task generates an HTML email using that record's or object's data.
When an email address is invalid, no email content will be created. Instead, an error is reported for the
record with an invalid email address.
Note: Content creation may be aborted by a script in a Connect template that raises a fatal error.
This triggers the On Error tab of the Content Creation task. See Designer Script API.
Note: The number of log messages for any non-fatal errors is limited to 100. Non-fatal errors are
errors related to one record that will not stop the processing of all records.
Output
The output of this task is twofold.
On the OL Connect Server's side, pre-rendered email messages are saved in the OL Connect File
Store along with their attachments (and, optionally, also in EML format).
On Workflow's side, information about the pre-rendered email messages becomes available to the pro-
cess via the current Metadata or via a JSON data structure that replaces the active Job File.
Page 534