Previous Topic

Book Contents

Book Index

Next Topic

Template Using a Report

Valuemation report formatting tools can be used for email body creation. This is achieved by creating a suitable report and telling the email body to use this report ('Generate Email body using report').

Example:

  1. Define a new email template or use an existing one.

    For the sake of example, let's create a simple email template started from the 'Ticket' object type, send to a fixed email address and using one email body.

    Help Image

  2. Create a suitable report.
    1. In the 'Valuemation Core' module of the Rich Client, locate the 'Reports' catalog in the sidebar, open it and use context menu to call the 'Create' command. A 'New Report' editor opens. Give the report a descriptive name. As this is going to be a rather 'special' report, it might also be a good idea to provide some report description.

      Help Image

    2. Most important part is the selection of suitable parameters to be used in the report. This way we will be able to use attributes of both the source object (i.e. the object from which the emails are to be sent) and the mail object.

      On the 'Parameters' tab, use the 'Add parameter' button to first add object types whose attributes will be used to data sources for the emails. Our example emails are to be called from tickets so our object type will be 'Ticket'. We will also want to draw data from the 'MailObject' object type.

      Help Image

    3. Once the object types have been selected, they must be renamed in the following way:
    • rename the source object type ('Ticket' in our exmple) to 'bo'
    • rename the Mail Object to 'boMailObject'

      Help Image

    1. Next, suitable attributes to draw data from must be selected

      Select one of the object types (bo, boMailObject) and use the 'Add Derived Parameter' button.

      Help Image

      A list of object type attributes opens.

      Help Image

      In this example, we will select the title and last name of the ticket's 'person requested by'.

      Help Image

      At this point it is a good idea to rename the parameters to some short descriptive names (rather than the default derivParamXXXXXX). These names will be used to refer to the parameters when actually creating the report content. Use the 'Edit Derived Attribute Inner Name' button.

      Help Image

      Resulting parameters might look like this:

      Help Image

    2. Proceed analogically for 'boMailObject'. For instance:

      Help Image

    3. The actual report can then be designed using the 'Report Items' report editor tab. Report design is described in detail in the 'Valuemation Printing' chapter of standard documentation. Important thing to mention here is the inclusion of parameters created in the previous steps. We could, for instance, include parameters taken from the Mail Object to create a personalized greeting and use data taken from the source object (ticket in our case) to display relevant information in the text. (See the image below for an example.)

      Help Image

  3. Use the report in the email body

    Last step is to tell the email body to use the report. Open the email body for editing and check the 'Generate Email body using report' check box. Use the 'Report for email body generation' reference view to specify the report to be used. Save the email body and the email template.

    A preview of the resulting email can be seen in the 'text' field of the 'Edit: Mail Object' editor. Here it is also possible to manually add some more content. (This, of course, does not effect the source report or the template.)

The result: Emails based on this template (either selected manually or used as a default template) will have their text formatted and filled with data according to the used report.

Our simple example results in the following email being sent:

Help Image

The following image explains how the email was generated:

Help Image

See Also

Email Templates in Use

Creating an Email Template

Email Localization

Send for BO Status

Inserting a Runlink

Sending an Email

Automatic Sending of Object Attachments With Emails

Adding the 'Send Email' Action to a Catalog