Email processes with OL Connect tasks
Sending out emails, based on a Connect template, via an automated process requires you to design a Connect email process in the Workflow configuration tool.
This topic explains which tasks and files are used in a Connect email process.
An easy way to create a Connect email project, including the Workflow configuration and the files that it needs, is to use a Project Wizard. See Project wizard: Basic Email.
The structure of an OL Connect email process
In an OL Connect Email process only one plugin is essential: the Create Email Content plugin.
The Create Email Content task creates a set of emails, using the Email context in a Connect template, and sends them to the email server.
You have to select the Connect template in the task's properties.
If the template doesn't need any data, you can set the Data Source of this task to JSON and enter an empty JSON string: {}.
However, if the template should be merged with data, you will need to add one or more tasks to provide the required data. The Create Email Content task must receive either Metadata containing information regarding a valid Record Set, or JSON data. This can be the output of tasks like:
- An Execute Data Mapping task which retrieves data from the job file (such as the request XML). In addition to creating records in the Connect database, this task can output the (IDs of the) records in the Metadata.
- A Retrieve Items task which retrieves an existing record set from the Connect database and outputs it in the Metadata or as JSON data.
- A Create File task that creates a JSON file.
- Etc.
Which task or tasks fit best, depends on where the data come from.
The Create Email Content task can be found on the OL Connect tab of the Plug-In Bar in Workflow.
For a description of all OL Connect tasks, see OL Connect tasks.
Files used in a Connect email process
Before creating the Email process in the Workflow configuration tool, you will need to create:
- A template with an Email context. (See Creating a template.)
- If the email should contain variable data, you might need to make a data mapping configuration (see Creating a new data mapping configuration). If the input is going to be JSON data, you could add them to the design using a JSON file (see Adding JSON sample data).
Templates and data mapping configurations must be sent from the Designer to PlanetPress Workflow before they can be used in the Workflow process; see Sending files to Workflow.
The next step is to create a process in PlanetPress Workflow that generates Email output, using these files.
For more information about how to create a process in Workflow, please refer to the Online Help of Workflow.