Configure Purchase Order Email Approval Notifications Using Reports

This example shows how to configure workflow email notifications for the purchase order approval business process using an Oracle Analytics Publisher report.

You use Microsoft Word to edit the RTF template used for notifications. You can modify the Oracle Analytics Publisher template only if you have the BI Administrator role.

In this scenario, you want purchase order approvers to see the notes to suppliers.

The following table summarizes key decisions for this scenario.

Decisions to Consider

This Example

Which report, data model and layout template do I update?

For updates to email notifications for purchase order approval:

  • Purchase Order Notification Report

  • Purchase Order Notification Data Model

  • Purchase Order Approval Layout

Do I want to add prompts and headers to the layout template?

No, not for this example.

Do I want to add data model attributes to the layout template?

Yes, the Note to Supplier attribute.

Which language do I use for the RTF template?

English (United States).

Summary of the Tasks

Configure a purchase order email approval notification to add an attribute by:

  1. Adding an attribute to the data model.

  2. Exporting the data model XML file.

  3. Downloading the report layout template.

  4. Adding data model attributes to the template.

  5. Uploading the modified report layout to the Oracle Analytics Publisher catalog.

Prerequisites

  1. Download and install the Oracle BI Publisher Desktop: http://www.oracle.com/technetwork/middleware/bi-publisher/downloads/index.html.

  2. Download and install the Template Builder for Word to use Microsoft Word to edit the layout templates. To download, install, and set up Template Builder for Word, see Creating RTF Templates by Using BI Publisher 11g Template Builder for Word: http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bip/tb4word/tbwordbip.htm.

  3. To preview the configured templates, download a local copy of the subtemplate that applies to your own report layout template:

    • Sign in to the Oracle Analytics Publisher server with the BI Administrator Role to open the Oracle Business Intelligence Home page.

    • Click Catalog.

    • In the BI catalog, go to Shared Folders > Common Content > Templates for the predefined subtemplate.

    • Click More for the Workflow Notification Subtemplate.

    • Click the Download option.

    • Save the subtemplate file to your computer.

Add an Attribute to the Data Model

In this task, you add the Note to Supplier attribute to the data model.
  1. Sign in to the Oracle Analytics Publisher server with the BI Administrator Role to open the Oracle Business Intelligence Home page.

  2. Click Catalog.

  3. On the Catalog page, in the Folders section, expand Shared Folders > Procurement > Purchasing and select Data Models to display the data models in the right pane.

  4. Under Purchase Order Notification Data Model, click More, and then click Copy.

  5. In the Folders section, expand Shared Folders Custom Procurement Purchasing.

  6. Click the Paste Resource icon.

  7. Under Purchase Order Notification Data Model click Edit.

  8. On the PurchasingNotificationDM page, in the Data Model section, select PurchaseOrderDraftLineDataSet.

  9. On the Diagram tab, click the Edit Selected Data Set icon.

  10. On the Edit Data Set dialog, under SQL Query, after the line for the Category ID, add a line and enter: Line.NOTE_TO_VENDOR AS NoteToSupplier.

  11. Click OK.

Export the Data Model XML File

In this task, you export the XML file that includes the data model attributes predefined for the notifications. Perform this task to enable previewing your modified template. This task is also required to add data model attributes to the template.
  1. Sign in to the Oracle Analytics Publisher server with the BI Administrator Role to open the Oracle Business Intelligence Home page.

  2. Click Catalog.

  3. On the Catalog page, in the Folders section, expand Shared Folders > Custom > Procurement > Purchasing to display the data models in the right pane.

  4. Under Purchase Order Notification Data Model, click Edit to open the Diagram tab on the PurchasingNotificationDM page.

    Note: To ensure that all data sets include requested elements with undefined values in the output XML data, do the following:
    Note: To add data model attributes to the template, perform steps 5 and 6. Otherwise, skip to step 7.
  5. Click the Data tab.

  6. Enter values for the following key attributes for an existing purchase order. Key attributes enable you to pull in all the purchase order attributes:

    • Document Number

    • Sold-to Legal Entity

    • Change Order Number

  7. Click View to see the sample data in the report, and all the available attributes. Verify the Note to Supplier attribute is in the list.

  8. Click Export.

  9. In the Opening PurchasingNotificationDM dialog box, select Save File and click OK.

  10. Save the PurchasingNotificationDM_.xml file to a local drive.

Download the Report Layout Template

In this task, you create a copy of the report layout template in the Custom folder, and download a copy of the template to your local drive to modify it.
  1. Sign in to the Oracle Analytics Publisher server with the BI Administrator role to open the Oracle Business Intelligence Home page.

  2. Click Catalog.

  3. On the Catalog page, in the Folders section, expand Shared Folders > Procurement > Purchasing to display the templates in the right pane.

  4. Under Purchase Order Notification Report, click More, and then select Customize. A copy of the Purchase Order Notification Report is created automatically in the Custom folder.

  5. On the Catalog page, in the Folders section, expand Shared Folders > Custom > Procurement > Purchasing.

  6. Under Purchase Order Notification Report, click Edit.

  7. On the Purchase Order Notification Report page, next to Data Model, click the Select Data Model icon.

  8. On the Select Data Model dialog, expand Custom > Procurement > Purchasing.

  9. Select the Purchase Order Notification Data Model, and click Open.

  10. Under Purchase Order Approval Notification Layout, click Edit.

  11. On the Opening PurchaseOrderApprovalNotificationLayout.rtf dialog box, select Save File and click OK to save the document to your local drive. Save the template with the name UpdatedPurchaseOrderApprovalNotificationLayout.rtf to distinguish it from the original template.

Add Data Model Attributes to the Template

To modify the purchase order approval email notification, you edit a local copy of the RTF report layout template in Microsoft Word. In this task, you add the Note to Supplier data model attribute to the report template.
Note: The exact steps can vary depending on your version of Microsoft Word.
  1. On your local drive, open the UpdatedPurchaseOrderNotification.rtf template in Microsoft Word, with the Template Builder installed.

  2. Select the BI Publisher tab.

  3. In the Load Data section, click Sample XML.

  4. In the dialog box to select XML data that appears, browse to open the PurchasingNotificationDM_.xml file you saved in the Exporting the Data Model XML File task. Then click Open.

  5. In the Data loaded successfully dialog box, click OK.

  6. Scroll to the TSRHLines section of the notification.

  7. Place the cursor after the C UnitPriceEC line and press the Enter key.

  8. On the new line, enter Note to Supplier:, and place the cursor at the end of the text you entered.

  9. On the BI Publisher tab, in the Insert section, click the 123 Field button.

  10. On the Field dialog box, locate and select the NoteToSupplier attribute.

  11. Click Insert.

  12. Click Close to return to the UpdatedPurchaseOrderNotification.rtf template.

  13. Save and close the document.

  14. Before uploading the RTF files to the business intelligence (BI) catalog, you should preview the output with the changes you made. You can avoid uploading a broken report that displays an error in the emails sent to users.

  15. Proceed to the task Uploading the Modified Report Layout to the Oracle BI Publisher Catalog.

Upload the Modified Report Layout to the Oracle BI Publisher Catalog

You must perform this task to use the modified report layout for notifications.
  1. Sign in to the Oracle Analytics Publisher server with the BI Administrator Role to open the Oracle Business Intelligence Home page.

  2. Click Catalog

  3. On the Catalog page, in the Folders section, expand Shared Folders > Custom > Procurement > Purchasing.

  4. Under the Purchase Order Notification Report, click Edit.

  5. On the Purchase Order Notification Report page, on the right side of the page, click Add New Layout to open the page with the Create Layout and Upload or Generate Layout sections.

  6. In the Upload or Generate Layout section, click the Upload icon.

  7. In the Upload Template File dialog box, in the Layout Name field, enter Updated Purchase Order Notification Report.

  8. In the Template File field, browse for the modified UpdatedPurchaseOrderNotificationLayout.rtf template on your local drive, select the template, and click Open.

  9. In the Upload Template File dialog box, from the Type list, select RTF Template.

  10. From the Locale list, select English (United States).

  11. Click Upload to open the Processing dialog box and return to the Purchase Order Notification Report page.

  12. On the right side of the page, click View a list to open the Layout page.

  13. In the row for the Updated Purchase Order Notification Report, select the Default Layout check box.

  14. On the right side of the page, click the Save Report icon.