Merge Data to PDF and Send via Email

Go back to the full Messaging and Scheduled Tasks documentation

Overview

The Merge Data to PDF and Send via Email message type is useful when data is needed to insert into an editable PDF form and emailed. This task type can be scheduled to be emailed automatically or can be triggered as part of a workflow action step from a maintainer.

Target Application

  • Select a Retrieval: Select the dictionary and Merge Data to PDF Retrieval that you wish to use in your task.
  • Additional Retrieval Parameters: Additional parameters can be passed through the URL to filter or control the target retrievals behavior. Use the “Toggle Parameter Help” button to assist with creating this URL.
  • Map Fields to Target Application: Only used if calling your task from a maintainer. With this option, you are able to map any fields from the maintainer to the fields of your target retrieval. If not calling this task from a maintainer, this option can be ignored.
  • Filename: Choose a name for the pdf file attachment. If passing any parameters to the retrieval via the additional parameters box or mapping fields, you can use these parameters in the filename as well. You may also use built in variables to pull current timestamp or date when the task is ran. Use ${timestamp} or ${datestamp} for these respectively.
  • Map Fields to Retrieval: Only available if the “Accepts maintainer parms” box was checked in the Task Type screen. With this option, you are able to map fields from the maintainer to the fields of your retrieval.

Recipients

  • Recipient address source – Use a distribution list: This option allows you to use a Distribution List Retrieval to send your emails. Select the dictionary where the Distribution List Retrieval lives and the Retrieval application itself. Any additional parameters you wish to pass to filter retrieval results can be entered using the “Toggle Parameter Help” button.
  • Map distribution list fields to retrieval: If using a distribution list, you can filter the target application retrieval by mapping fields from the Distribution List Retrieval to the retrieval fields. For example, you can map CUSNO (customer number) from the distribution list to the retrieval field, CUSNO, and each customer will receive their own data.
  • Recipient address source – Use email address from web form: This option should only be used if invoking your task from a maintainer. Enter the field from the maintainer that will hold the email address to deliver the email to as well as the optional CC email address field name.
  • Map maintainer fields to distribution list: If a Distribution List is selected and the “Accepts maintainer parms” box was checked on the Task Type screen, you are able to filter the distribution list dynamically by mapping fields from the maintainer to the Distribution List Retrieval. For example, if you have a customer order form maintainer triggering a task group, you can map CUSNO (customer number) from the maintainer to filter the Distribution Lists records to only return emails for their customer number. This is a dynamic way to send emails from a maintainer.
  • Additional Addresses: Enter any hard coded email addresses here that you wish to always receive an email. Multiple addresses may be added separated by a comma.

Email Info

  • Sender: This will be the ‘from’ address when the recipient receives their email. This needs to be a working email address. If left blank, the sender address will pull from the configuration file.
  • Subject: Controls the subject of the email. If passing any parameters to the report via the additional parameters box or mapping fields, you can use these parameters in the filename as well. For example, if mapping CUSNO from a maintainer to the R001 (first runtime record selection) of the report, you can use ‘Report for ${R001}’ as the subject line. You may also use built in variables to pull current timestamp or date when the task is ran. Use ${timestamp} or ${datestamp} for these respectively.
  • Message: Hard code any text to appear in the body of the email. For example, “Thank you for the order.”
  • Attachments: List filenames (including the file extension) of any file that will be attached to the email. There are three options to attach files to emails:
    1. Files that are stored on the m-Power server in /mrcjava/job_streams/attachments can be attached to emails by simply hardcoding the filename (including the file extension) in the “File Attachment” text box. Multiple files can be listed separated by a comma.
      • Alternatively, if your target application includes a field to store the filename, you may use the fieldname substitution ${FIELD} in place of the hardcoded filename to dynamically attach files to your email.
    2. If your files are stored in another directory, you can attach them to emails by hardcoding the absolute path and filename (or field substitution) in the “File Attachment” text box.
      • For example: C:/Uploads/Orders/${FILENAME}
    3. If you are utilizing an Output Folder setup, you can reference the output directory with the syntax: queue_[queue folder name].
      • For example: I have an Output Folder Name of “SecureUpload”. I would enter queue_SecureUpload/${FILENAME}.

Review

  • Review: Overview of all options that make up your task. A great tool for troubleshooting tasks.
Updated on July 24, 2023

Was this article helpful?

Related Articles

Need Support?
Can’t find the answer you’re looking for? Don’t worry we’re here to help!
Contact Support