7 Setting Up Web Mail Merge

This chapter contains the following topics:

This chapter provides an overview of web mail merge setup, lists a prerequisite, and discusses how to:

  • Set processing options for Web Mail Merge Workbench (P05WMMWB).

  • Set up a web mail merge templates.

  • Set up web mail merge data structures.

7.1 Understanding Web Mail Merge Setup

You set up mail merge in one of two ways:

  • Migrate existing HTML template documents and their data structures from previous version of JD Edwards EnterpriseOne software to the current version.

  • Set up the software for the first time.

You can use the Mail Merge Workbench Setup program (P05WMMWB) to update the data structures for existing templates, edit existing templates, or add new mail merge templates. Your software includes a selection of mail merge templates that you can use for applications such as HIPAA, COBRA, or generic letters. You can also create template documents in any word processing program from which you can save a document in HTML format. The extension of the template document must be .htm (not .html).

A web mail merge template consists of these parts:

  • Database records (F980014W and F9800014T).

  • Media Object Queue record (F98MOQUE).

  • Web mail merge data structure (F05WMM01 and F05WMM02).

  • HTML template document.

Web mail merge uses template documents that are standard HTML files. These files are stored in a folder that is accessible from the enterprise server where the system business functions are running. The system uses a media object queue to define the output directory path for each document template. You need to set up at least one queue. If desired, you can assign a separate queue for each template. You need to create a folder on the enterprise server where you store web mail merge template documents. When you set up one or more queues for web mail merge, you specify a queue name and a directory path that includes this folder. The system saves this information in the Media Object Queues table (F98MOQUE).


Note:

For web mail merge, you do not normally use OLEQUE as the queue name. OLEQUE is a default name that is used generically for all media objects.

You can add new web mail merge document templates to the system in two ways. You can create an HTML template document and then generate a new data structure based on the merge fields that exist in the template. Alternately, you can first create a new data structure and then generate a new document template from the data items in the data structure. The system saves template information in the Web Mail Merge Template Tag (F980014T) and Mail Merge Web Objects (F980014W) tables.

Web mail merge uses a list of data items called a data structure to specify the merge fields in each of the template documents. The system stores your data structure information in the Web Mail Merge Data Structure Header (F05WMM01) and Web Mail Merge Data Structure Detail (F05WMM02) tables.


Note:

Web mail merge data structures are not the same as data structures that exist in previous Windows versions of JD Edwards EnterpriseOne software. However, you can generate a mail merge data structure from a previous data structure.

The mail merge applications that generate merge documents use three business functions. The first business function generates a unique document identification number and a header record in the Web Mail Merge Letter Header table (F05WEBMM). The system uses the second business function once for each letter that you add to the merge document and saves records in the Mail Merge Runtime Web Data table (F980014D). These records contain the data that is used to replace the merge fields in a template document. The third business function generates an HTML mail merge file that contains one letter for each record in the Mail Merge Runtime Web Data table. The merge letter is stored in the same folder as the template document.

7.2 Prerequisite

To generate web mail merge letters, the system requires a language-specific Encoding Name. Use the Unicode Flat File Encoding Configuration program (P93081) to create the new record in the Unicode Flat File Encoding Configuration table (F93081). For English on an NT server, use code CP1252. For English on an AS400 server, use code IBM-37.

7.3 Setting Processing Options for Web Mail Merge Workbench (P05WMMWB)

Processing options enable you to specify the default processing for programs and reports.

7.3.1 Default

This processing option specifies the name of the media object queue that the system uses as the default. You set up an output queue name and directory path information on the Media Object Queue Revisions form (W98MOQUEB) that you access from a Form menu option in the Web Mail Merge Workbench program.

1. Output Queue Name

Specify the name of the default media object queue where the system stores mail merge templates and mail merge letters.

2. Start Merge Field Delimiter and 3. End Merge Field Delimiter

Specify strings of 1 to 5 characters to identify the start and end of a merge field in the HTML template document. If you wish to use the default Microsoft Word delimiter, leave this processing option blank.

7.4 Setting Up Web Mail Merge Templates

This section provides an overview of web mail merge template management, lists a prerequisite, and discusses how to:

  • Set up a web mail merge queue.

  • Migrate mail merge templates.

7.4.1 Understanding Web Mail Merge Template Management

You can use the Work With Web Mail Merge Templates program to add, update, and delete mail merge templates. This form includes row menu options that you can use with existing templates:

  • View Doc File

    Displays the template document in a read-only form.

  • Validate

    Verifies whether the template is setup correctly. If errors exist, the system displays a form that lists the errors. These validations are performed:

    • The output queue record exists in the F98MOQUE table.

    • The output folder defined in the F98MOQUE record exists.

    • The HTML template document exists.

    • The data structure exists.

    • Valid merge field delimiters been entered.

    • Merge fields exist in the template document that do not exist in the data structure. Fields can exist in the data structure that do not exist in the template document without interference.

  • Test

    Generates a letter for the selected template using default merge data. This process replaces the merge fields in the template document with the name of the merge field. For example, «szNameMailing» is replaced with szNameMailing. The generated document displays in a read-only form. When exiting the display form, the system deletes the merged document.

  • Update Template

    Updates the selected template and attempts to correct problems that might exist. A data structure is generated if one does not exist. If a data structure exists, the system updates the data items. This function checks for the existence of the F980014T record and updates the field delimiters if necessary. The Output Queue value is validated and the existence of the output queue folder is verified.

  • Attachments

    Allow you to import and export media object templates. Several templates such as (HIPAA, COBRA, W4FORM are predefined in the software. These templates have the default HTML source code for the template document attached as a media object. This source code can be exported to the output folder, replacing the existing template document. You can also import the source of an existing template document into the media object.

This form also includes these form menu options:

  • Data Structures

    Calls the Work With Web Mail Merge Data Structures form so you can make changes to existing data structures.

  • MO Queue

    Calls the Work With Media Object Queues so you can add or update a mail merge output queue.

  • Generate DS

    Calls the Generate Data Structure so you can generate a web mail merge data structure from an existing data structure or from the fields in a template document.

  • Migration

    Calls the Work With Web Mail Merge Migration form so you can convert a template from the old Microsoft Word format to the new web mail merge format. This function also generates the associated data structure and creates a generic template document.

7.4.2 Prerequisite

Before you complete the tasks in this section, enter an output queue name in the processing option for the Web Mail Merge Workbench program (P05WMMWB). The system saves this value in the Output Queue field of the Mail Merge Web Objects table (F980014W).

7.4.3 Form Used to Set Up Web Mail Merge Templates

Form Name FormID Navigation Usage
Work With Web Mail Merge Templates W05WMMWBA HRM Setup (G05B4), Mail Merge Workbench Setup Define the output queue (from processing options), updates the data structure, and generates required database records.

Generate new web mail merge template records.

Click Find to display the values in the Data Structure Name,Output Queue, and Queue Path columns.

Media Object Queue Revisions None Select MO QUEUE from the Form menu on the Work With Web Mail Merge Templates form.

Click Add on the Work With Media Object Queues form.

Set up a web mail merge queue
Work With Web Mail Merge Migration W05WMMWBO On Work With Web Mail Merge Templates, select Migration from the Form menu. Select one or more existing records and then click Select.

Updates an existing template record and populates the Action and Message columns indicating completion status.

Template Validation W05WMMWBH On Work With Web Mail Merge Templates, select a record and then select Validate from the Row menu. Validate a record and then close this form to return to the Work With Web Mail Merge Templates form.
View Template Document W05WMMWBC On the Work With Web Mail Merge Templates form, select a record and then select View Doc File from the Row menu. View the new document file.
Web Mail Merge Template Details W05WMMWBB Select a record on the Work With Web Mail Merge Templates form and click Select. Click the Edit Template Document button to load the template into Microsoft Word for editing. Edit the structure as needed and then Save As an HTML file. If additional Save As options exist, save the file as Filtered or Compact HTML to reduce the size of the resulting file.

Note: This function requires a security setting in your internet browser that allows Active X controls.

Media Object Mail Merge Template W05WMMWBN Select a record on the Work With Web Mail Merge Templates and then select Attachments from the Row menu. The system displays the HTML code entries.

Exporting the template writes the template to an HTML file on the server.

When you export the template, the system automatically displays the View Template Document form.

View Document Template W05WMMWBC Click Formatted View on the Media Object Mail Merge Template form. Review the new document.

7.4.4 Setting Up a Web Mail Merge Queue

Access the Media Object Queue Revisions form.

Queue Name

Enter a value that specifies a media object queue name. A queue name is the first half of a properly defined Media Object queue. The second half is the media object path. This value will be entered in to the Output Queue field on the Web Mail Merge Template Details form.


Note:

OLEQUE is reserved as a default queue name. You normally set up one or more queues specifically for web mail merge, including appropriate directory paths.

Queue Path On-Line

Enter a directory path to a network folder where web mail merge document templates and letters are stored. The first half of a properly defined queue is the queue name. The second half of a properly defined queue is a directory path.

On some servers, the directory separator character is a back-slash (\). On other servers, the directory separator character is a forward-slash (/). For AS400 users, the directory path must be relative to the root of the Integrated File System (IFS). For example, the fully-qualified path to the folder might be //servername/root/mailmerge. Because the root folder is //servername/root, the value for Queue Path On-Line appears as follows:

/mailmerge

From a Windows perspective, the value uses a back-slash character and contains the full, absolute path as follows:

\\servername\root\mailmerge.

For non-AS400, non-UNIX users: Specify the same path for Queue Path On-Line and Queue Path Off-Line.

Some platforms might require that you run special software to allow their Windows workstation to access files on a UNIX Server.

Queue Path Off-line

Enter a fully-qualified (absolute) directory path to the location where web mail merge document templates and letters are stored. The first half of a properly defined queue is the queue name. The second half of a properly defined queue is a directory path.

A valid queue path might appear as:

\\servername\sharename\foldername

The system uses this path when loading the HTML file into Microsoft® Word and when displaying letters in a media object. This display function occurs when you are using a Windows client environment. The path statement is formatted using Windows (Fat32) formatting. The statement must include the server name and all sub-folders. For example:

\\AS400server\root\mailmerge

Type

Enter the type of media object queue. The default value of 02 specifies the OLE queue. Generic queue types are defined in UDC H91/QT.

For web mail merge, the system does not use this value.

On-Line Access Type

Enter the status of a media object queue. For web mail merge, the system does not use this value.

Off-Line Access Type

Enter he status of a media object queue. For web mail merge, the system does not use this value.

7.4.5 Migrating Mail Merge Templates

Access the Work With Web Mail Merge Migration form.

Figure 7-1 Work With Web Mail Merge Migration form

Description of Figure 7-1 follows
Description of ''Figure 7-1 Work With Web Mail Merge Migration form''

To migrate an existing mail merge template:

  1. Select one or more letter records on the Work With Web Mail Merge Migration form and then click Select.

    This process completes output queue information from the processing options, updates the data structure, and generates database records in the F980014W and 980014T tables.

  2. Click Close the Work With Web Mail Merge Migration form.

  3. Select the updated record on the Work With Web Mail Merge Templates form and then select Validate from the Row menu.

    The validation option displays any functions that still need to be performed. The Document File Exists option is normally not checked and needs to be completed.

  4. Click Close on the Template Validation form.

  5. Select a template record on the Work With Web Mail Merge Templates and then click Select.

  6. Select Gen Doc File from the Form menu on the Web Mail Merge Template Details form.

    This action creates a new document file and automatically displays the View Template Document form.

  7. Review the information and then click Cancel on the View Template Document form.

  8. Click the Edit Template Document button on the Web Mail Merge Template Details form.

    This action loads the new letter into Microsoft Word.


    Note:

    This function requires a security setting in your internet browser that allows Active X controls.

  9. Edit the Word file as appropriate and then save the file as an HTML file.

    If your version of Microsoft® Word includes an option to save the file as Filtered HTML or Compact HTML, use this option. The resulting file is much smaller.


    Note:

    Do not change the folder location when you save the HTML file.

7.5 Setting Up Web Mail Merge Data Structures

This section provides an overview of web mail merge data structures, lists prerequisites, and discusses how to:

  • Manually construct a data structure.

  • Generate a data structure from a template document.

  • Generate an updated data structure from an existing data structure.

7.5.1 Understanding Web Mail Merge Data Structures

Although many organizations use only the data structures and templates that support existing functions in the JD Edwards EnterpriseOne software, such as mailing HIPAA letters or generating a generic letter, you can create new data structures and template documents that are tailored to individual requirements. You can create new data structures using any of these approaches:

  • Construct a data structure.

  • Generate a data structure from a template document.

  • Generate an updated data structure from an existing data structure.

7.5.2 Prerequisites

Before you complete the tasks in this section:

  • Set up a web mail merge queue.

  • Set processing options for the Web Mail Merge Workbench program (P05WMMWB).

7.5.3 Forms Used to Set Up Web Mail Merge Data Structures

Form Name FormID Navigation Usage
Work With Web Mail Merge Templates W05WMMWBA HRM Setup (G05B4), Mail Merge Workbench Setup Access the Work With Web Mail Merge Data Structures form.
Work With Web Mail Merge Data Structures W05WMMWBF Select Data Structures from the Form menu. Manage web mail merge data structures.
Web Mail Merge Data Structures W05WMMWBG Click Add on the Work With Web Mail Merge Data Structures form. Create the new data structure.
Generate Data Structure W05WMMWBK Select Generate from the Form menu on the Work With Web Mail Merge Data Structures form. Generate a new, web mail merge data structure that is based on an existing data structure. This data structure might exist, for example, in JD Edwards EnterpriseOne Xe software.
Get Delimiters W05WMMWBM Click Generate on the Generate Data Structure form. This form can also be accessed by selecting Generate DS from the Form menu on the Web Mail Merge Template Details form.

Enter start and end delimiter characters or click Set Default Delimiters to load the values that are specified in the processing options.


7.5.4 Manually Constructing a Data Structure

Access the Web Mail Merge Data Structures form.

Figure 7-2 Web Mail Merge Data Structures form

Description of Figure 7-2 follows
Description of ''Figure 7-2 Web Mail Merge Data Structures form''

To manually enter a data structure:

  1. Complete the Data Structure Name and Description fields.

  2. Enter a list of data items in the Data Item column.

    These data items are used as merge fields in the template document. The value in the Data Item column can be any string of characters except the characters that are used for the start and end delimiters. The spelling and upper or lower case of each item is important and must match exactly. The system automatically generates each number in the Sequence Number column.

  3. Click the Move Up and Move Down buttons to rearrange the items in the list

  4. Click OK when all data items are entered and are in the correct order.

Data Structure Name

Enter a unique name that identifies the data structure. The system enters this value into the template database record when setting up a web mail merge template.

Description

Enter a short description of the data structure.

7.5.5 Generating a Data Structure From a Template Document

Access the Generate Data Structure form.

To generate a new data structure from a template document:

  1. Complete the New Structure Name, Description, Queue Name, and Document Type fields.

  2. Select the Generate From Merge Fields in Template Document option.

  3. Select Generate.

    If the system displays a warning message, click OK. This message informs you that changing the layout of an existing data structure can cause processes using that data structure to fail. This failure can be caused by a mismatch of the order and naming of items in the data structures of the template documents. Also, the business function (B0500725 – Write Web Mail Merge Data) that writes the merge data at runtime also depends on the items in this data structure to be in a specific order.

  4. Complete the Start Delimiter and End Delimiter fields on the Get Delimiters form.

    Alternatively, you can click Set Default Delimiters to load the fields with the values specified in the corresponding processing options.

  5. Click OK to generate the data structure.

    When the process has completed, the system displays a message that indicates whether the data structure was created successfully.

New Structure Name

Enter a unique name that identifies the DS. The system enters this value into the template database record when setting up a web mail merge template.

Description

Enter information that identifies the purpose of the data structure.

Queue Name

Enter the name of a media object queue record that defines the location of mail merge template documents.

Document Name

Enter the name of the template document. If generating a data structure for the HIPAA letter, for example, then the value in this field should be HIPAA.

7.5.6 Generating an Updated Data Structure From an Existing Data Structure

Access the Generate Data Structure form.

To generate an updated data structure from an existing data structure:

  1. Complete the New Structure Name, Description, and Source Data Structure fields.

  2. Select the Generate From Existing One JD Edwards World Data Structure option.

  3. Select Generate.

    If the system prompts you with a warning message, click OK. This message informs you that changing the layout of an existing data structure can cause processes using that data structure to fail. This failure could be caused by a mismatch of the order and naming of items in the data structure of the template documents. Also, the business function (B0500725 – Write Web Mail Merge Data) that writes the merge data at runtime depends on the items in this data structure to be in a specific order.

    When the process has completed, the system displays a message indicating whether the data structure was created successfully.

New Structure Name

Enter a unique name that identifies the DS. The system enters this value into the template database record when setting up a web mail merge template.

Description

Enter a value that defines the updated data structure.

Source Data Structure

Enter the name of the previously existing JD Edwards EnterpriseOne data structure. When exiting this field, if the New Structure Name is blank, the system uses the value of this field as the default value in the New Structure Name field.