JSON Record Data List (with Email Parameters)

Describes a list of data fields (as name/value pairs), a data table schema and nested data records (if any) for one or more data records, along with additional parameters used specifically in an content creation operation for email.

This structure is variable, allowing specification for email output to either the file store or directly to a SMTP mail server, with a number of additional parameters.

This structure is used specifically by the Content Creation (Email) service when creating content directly without the prerequisite of the data mapping process.

Structure

The structure initially consists of an object with the following name/value pair:

  • data – the data for the data record or data records, consisting of either an object or an array of one or more objects respectively with the following name/value pairs:

    • schema – the data table schema for the data record, consisting of an object with the following name/value pairs:

      • columns – a list of the data columns/fields in the data table schema and their corresponding data types, consisting of an object with one or more name/value pairs:

        • <name> – the name (name) and data type of the data field (value of either BOOLEAN, STRING, HTMLSTRING, INTEGER, FLOAT, DATETIME or CURRENCY) (type of string)

      • tables – a list of any nested data tables in the data record, consisting of an object with one or more name/value pairs:

        • <name> – the name (name) of the data table and the data table schema for the data records it contains, consisting of an object with the following name/value pair:

          • columns – a list of the data columns/fields in the data table schema and their corresponding data types, consisting of an object with one or more name/value pairs:

            • <name> – the name (name) and data type of the data field (value of either BOOLEAN, STRING, HTMLSTRING, INTEGER, FLOAT, DATETIME or CURRENCY) (type of string)

    • fields – a list of the data fields in the data record and their corresponding data values, consisting of an object with one or more name/value pairs:

      • <name> – the name (name) and data value of the data field (type of either string, number or boolean)

    • tables – a list of any nested data tables in the data record, consisting of an object with one or more name/value pairs:

      • <name> – the name (name) of the data table and a list the data records it contains, consisting of an array of objects each with the following name/value pairs:

        • id – a required/default fixed value of 0 for all data records (type of number)
        • fields – a list of the data fields in the data record and their corresponding data values, consisting of an object with one or more name/value pairs:
          • <name> – the name (name) and data value of the data field (type of either string, number or boolean)

A subset of the runtime parameters defined in the template can be passed in the following object:

  • parameters – a set of runtime parameter names and their corresponding values, consisting of an object with one or more name/value pairs:

    • <name> – the name (name) and the value of the runtime parameter
      (type of either string, number, or boolean)

For either email output directly to a SMTP mail server or email output to the file store, the following optional name/value pairs can be specified:

  • attachPdfPage – parameter to specify if a PDF file of the Print context should also be created and attached to the email output (type of boolean)

  • attachWebPage – parameter to specify if HTML files of the enabled sections (a single section by default) in the Web context should also be created and attached to the email output (type of boolean)

Specific to email output directly to a SMTP mail server, an additional name/value pair is required:

  • host – the network address or name of the SMTP mail server through which emails will be sent. If required, a server port value can also be specified (type of string)

Specific to email output directly to a SMTP mail server, an optional name/value pair can be specified:

  • useAuth – parameter to specify if authentication is to be used with the mail server (type of boolean)

Specific to email output directly to a SMTP mail server with the useAuth parameter specified to a value of true, the following optional name/value pairs can be specified:

  • user – the user name to authenticate with (type of string)

  • password – the password to authenticate with (type of string)

  • useStartTLS – parameter to specify if Transport Layer Security (TLS) is to be opportunistically used when sending emails (type of boolean)

Specific to email output to the File Store, an optional name/value pair can be specified:

  • eml – parameter to specify if an EML (E-Mail Message) file of the email for each record should be created in the email output (type of boolean)

Specific to either email output directly to a SMTP mail server or email output to the file store with the eml parameter specified to a value of true, an additional name/value pair is required:

  • sender – the email address to be shown as the sender in the email output (type of string)

Specific to either email output directly to a SMTP mail server or email output to the file store with the sender parameter specified, the following optional name/value pairs can be specified:

  • senderName – the name to be shown as the sender in the email output (type of string)

  • useSender – parameter to specify if the sender address will be used as the receiver address for all emails in the output (type of boolean)

Examples

The following is an example of this structure:

{
    "data": {
        "schema": {
            "columns": {
                "ID": "STRING",
                "Gender": "STRING",
                "FirstName": "STRING",
                "LastName": "STRING",
                "Email": "STRING"
            }
        },
        "fields": {
            "ID": "CU00048376",
            "Gender": "M.",
            "FirstName": "Benjamin",
            "LastName": "Verret",
            "Email": "b.verret@drupa.ol.com.com"
        }
    },
    "attachPdfPage": true,
    "attachWebPage": true,
    "sender": "john.smith@company.com",
    "useSender": true,
    "host": "mail.company.com",
    "useAuth": true,
    "user": "johns",
    "password": "password5",
}
{
    "data": [
        {
            "schema": {
                "columns": {
                    "ID": "STRING",
                    "Gender": "STRING",
                    "FirstName": "STRING",
                    "LastName": "STRING",
                    "Email": "STRING"
                }
            },
            "fields": {
                "ID": "CU00048376",
                "Gender": "M.",
                "FirstName": "Benjamin",
                "LastName": "Verret",
                "Email": "b.verret@drupa.ol.com.com"
            }
        },
        {
            "schema": {
                "columns": {
                    "ID": "STRING",
                    "Gender": "STRING",
                    "FirstName": "STRING",
                    "LastName": "STRING",
                    "Email": "STRING"
                }
            },
            "fields": {
                "ID": "CU01499303",
                "Gender": "Miss",
                "FirstName": "Dianne",
                "LastName": "Straka",
                "Email": "d.straka@drupa.ol.com.com"
            }
        }
    ],
    "attachWebPage": true,
    "sender": "jane.smith@company.com",
    "senderName": "Jane Smith",
    "eml": true
}
{
    "data": {
        "schema": {
            "columns": {
                "ID": "STRING",
                "Gender": "STRING",
                "FirstName": "STRING",
                "LastName": "STRING",
                "Email": "STRING"
            }
        },
        "fields": {
            "ID": "CU01499303",
            "Gender": "Miss",
            "FirstName": "Dianne",
            "LastName": "Straka",
            "Email": "d.straka@drupa.ol.com.com"
        }
    },
    "attachPdfPage": false,
    "attachWebPage": true
}