Example of Using Data Driven E-Mail with Embedded BI Publisher for EnterpriseOne

Purpose
Scope
Details
 Overview
 Understanding Data Driven e-mails
 Functional Example on How to Use Bursting and Data Driven e-mails with Embedded BI Publisher for EnterpriseOne
 Assumptions
 Setup Address Book E-Mail
 Extract Sample XML from R014021
 Identify bursting and data driven fields
 Design the Template
 Test Report Definition and Verify Results

Purpose

Embedded BI Publisher's bursting feature allows many separate reports to be created from one XML output. By combining bursting with data driven email delivery, it is possible to deliver the bursted outputs to different e-mail recipients based on data stored in the XML output.

This document describes how to use the bursting and data driven email delivery features in Embedded BI Publisher for EnterpriseOne.

Scope

This document is intended for JDE developers who wish to use the bursting and data driven email delivery options to be able to send specific and relevant outputs to customers or vendors etc. Basic knowledge of JDE report definitions configuration & execution is required to follow the steps in this document.

Details

Overview

A report definition can burst on any level break section defined within the batch or report version that is used as its source of data. Typically, when you burst a report, you break on a level break header section. In Burst Field you specify the complete XPath of the tag that defines the level break section as it appears in the XML data output that was created from the batch process.

Understanding Data Driven e-mails

The level break section can contain an email recipient in one of the following formats:

  1. An SMTP e-mail address (a string with no domain at the end of it is a valid RFC822 e-mail address)
  2. An SMTP distribution list (this is an alias expanded into a list by the SMTP server)
  3. Address book number (NOT an EnterpriseOne user name1) (Dist list or a user) which in turns gets turned into a valid email address(es) by way of a standard jde lookup service (jdeResolveRecipient()). This can be an email address or a SMTP dist list.

If the 'Data Driven Recipient' field does not contain an address book number,  the BI Publisher engine will treat the value in the field as a literal email address and send the message to the SMTP server with that literal value as the recipient.  For example, if the XML field  used in data driven recipient, contains a value of 'John.Doe@xxxx.com' , then the SMTP server will try to send to this recipient.  Another example would be if the data driven recipient value  is  'JDOE' . In this case, the SMTP server will get JDOE as the recipient value and try to send the email by appending the domain name specified in the server JDE.INI.  It would attempt to send to JDOE@xxxx.com  and if this is a valid alias in the SMTP server for John.Doe@xxxx.com, then the e-mail would be delivered correctly 2.  

Note 1 Enhancement BUG 10988551 was entered to ask that the jde lookup functionality be expanded to encompass an EnterpriseOne user id associated with an address book number.

Note 2 When a value is passed as an addressee to the SMTP Server, it is this server that is responsible for delivering the output.  As such SMTP distribution lists and aliases need to be set up on the SMTP Server.

Note 3 Data driven pertains to the To field in the email. There is no current functionality to apply data driven emails to From, Cc or Bcc fields in the email header. Enhancement Bug 19346199 - DATA DRIVEN "FROM" EMAIL ADDRESS WITH EMBEDDED BIP - was entered to request the ability to dynamically set the email in the From field.

Functional Example on How to Use Bursting and Data Driven e-mails with Embedded BI Publisher for EnterpriseOne

Assumptions

This example assumes that BI Publisher for EnterpriseOne is functional. If you have not yet validated it, ensure you can submit a basic report definition and deliver the BI Publisher report to a static e-mail address. For additional information, review Embedded BI Publisher Delivery Options.

Setup Address Book E-Mail

Using Address Book application (P01012) identify or setup at least two address book numbers with one associated e-mail address each. Refer to Workflow Setup / External E-Mail Setup for Notifications with Releases 8.9 and Newer for more information on how to setup External Mail for EnterpriseOne.

In this example we have users John Doe and Jane Doe, address book numbers 55600 and 55618 respectively. 

Who's Who email

Who's Who email

Note: XMLP kernel reads the emails of the Whos Who Line 0 of the Address Number. Make sure that the message indicator is 1 and the Address Category is Blank.

Extract Sample XML from R014021

Run P95600 and create a new BI Publisher Object (template record) using a blank RTF template to obtain a sample XML Output that can be used to design the new template. This is the template record:

Template record

You will also need to create a Report Definition and attach your template to it.

RD: UBE and Template association:

Report Definition screen 1

RD: Language and Output:

Report Definition screen 2

RD: Bursting and Delivery. Note we will NOT burst the report at this time as we are only interested in obtaining the Report Definition Source (XML Output) to gather the Burst Field, the address book number field and build a template:

Report Definition screen 3

Next submit the report definition with data selection set to the two test address book numbers you identified earlier:

Data Selection

Identify bursting and data driven fields

This should create the following XML Output where we can identify the level break section to burst by and the address book tags:

XML Output

Design the Template

Build a template with a layout of your liking. For example:

RTF Template

Click here to download this sample template.

The next step is to upload the new template to P95600 and then use P95620 to modify the Burst and Delivery options of the Report Definition:

Report Definition Bursting

Test Report Definition and Verify Results

Upon running this report Definition two BI Publisher reports will be created and delivered to the e-mail address associated the respective address book numbers found in the XML:

Report Delivery

These are the reports Jane and John will receive:

Report Jane

Report John

Note: BI Publisher engine will retrieve e-mail addresses associated to the first Who's Who record (Line ID '0') associated to the address book number. Only e-mail addresses flagged as primary, i.e.: message indicator field set to '01' (primary electronic address) will be used. If more then one primary email address exists for the first Who's Who entry, then the report will be delivered to all of them. Enhancement bug 11031154 was created to request a way to set different email categories so to have reports delivered based on this category. Workaround for this would be to include the logic in the report itself to fetch the email ID s into the variables and then map those corresponding variables from the xml source in the Data Driven Recipient field.