Example of Modifying Expenses Email Notifications Using Oracle Analytics Publisher

This example shows you how to modify the Expense Report Approval email notification template using Oracle Analytics Publisher templates.

Oracle Analytics Publisher

The following table summarizes questions to consider for this scenario.

Questions to Consider

This Example

Do I want to change in the header of the email approval notification?

Add a word to the header.

Do I want to add fields or columns to or remove fields or columns from the email approval notification?

Add a field to the template.

You can modify an Expenses BI Publisher email approval notification by:

  1. Exporting the Expense Approval Data Model

  2. Downloading the Expense Report Approval template

  3. Editing the Expense Report Approval template

  4. Adding field and table attributes to the Expense Report Approval template

  5. Previewing the modified Expense Report Approval template

  6. Uploading the modified Expense Report Approval template

Prerequisites

Before you can modify an Expenses workflow email approval notification, complete these steps:

  1. Download and install the Template Builder for Word, which is a BI Publisher add-on for Microsoft Word.

    1. Sign into the Oracle Analytics Publisher server with the BI Administrator Role.

    2. On the Oracle Analytics Publisher home page by the Get Started section, click the Download BI Publisher Desktop Tools link.

    3. Select and install Template Builder for Word.

  2. Download a copy of the subtemplate, which is the FinFunWorkflowNotificationSub.rtf file, to your local drive.

    1. Click the Catalog menu.

    2. In the BI Catalog, expand Shared Folders > Common Content > Templates.

    3. Click the Edit link for Workflow Notification Subtemplate.

    4. On the Workflow Notification Subtemplate - Sub Template page in the Templates section, click the language name link in the Locale column.

    5. Save the FinFunWorkflowNotificationSub.rtf file to your local drive.

  3. Create an expense report and note the expense report number. You enter the expense report number when you export the data model .xml file.

Exporting the Expense Approval Data Model

Before you can modify the Expense Report Approval template, you must export the .xml file that contains the predefined data model attributes for the notifications. Complete these steps:

  1. Sign into the Oracle BI Publisher server with the BI Administrator Role.

  2. Navigator > Tools > Reports and Analytics.

  3. On the Oracle BI Publisher home page, click the Catalog menu.

  4. On the Catalog page in the Folders pane, expand Shared Folders > Financials > Workflow Notifications.

  5. Expand the Expenses folder.

  6. Click the Expenses subfolder to display the data models and the notification templates.

  7. Click the Data Models link.

  8. By Expense Approval Data Model, click the Edit link.

    The Diagram tab displays data sets for the Expense Approval Data Model.

  9. Scroll to see all the data sets.

  10. To ensure that all data sets include requested elements with null values in the output XML data, complete these steps:

    1. In the Data Model pane, click the Properties link.

    2. In the Properties section, select the Include Empty Tags for Null Elements check box.

  11. In the Data Model pane, click the Data Sets link.

  12. On the Expense Approval Data Model page, select the Data tab and scroll to locate the Expense Report Number field.

  13. In the Expense Report Number field, enter the expense report number that you created in the third step of the Prerequisites section in this document.

  14. Click View to see the sample data and all the available attributes.

  15. Click Save As Sample Data.

  16. Click OK.

  17. Click Export.

  18. Click Save as to save the Expense Approval Data Model .xml file to your local drive.

Downloading the Expense Report Approval Template

The Expense Report Approval template contains the structure of the email approval notification. To download a copy of the Expense Report Approval template to your local drive, complete these steps:

  1. Click the Catalog menu.

  2. On the Catalog page in the Folders pane, expand Shared Folders > Financials > Workflow Notifications > Expenses.

  3. Click the Expenses subfolder to display data models and the notification templates.

  4. By Expense Report Approval, click the More link, and select Customize.

    An image of the predefined Expense Report Approval Email Notification appears. A copy of the Expense Report Approval template is automatically created in the Custom folder. You can find the copy by expanding Shared Folders > Custom > Financials > Workflow Notifications > Expenses.
  5. By the predefined Expense Report Approval Email Notification template, click the Edit link.

  6. Click Save as to save the Expense Report Approval Email Notification template to your local drive as an .rtf file.

    Tip: Save the downloaded template with the name UpdatedExpenseApprovalNotificationReport.rtf to distinguish it from the predefined template.

Editing the Expense Report Approval Template

To edit the header section of the Expense Report Approval Email Notification template, complete these steps:

  1. Double click the UpdatedExpenseApprovalNotificationReport.rtf file you saved to your local drive.

  2. In the header section, place your cursor between Expense and Approval.

  3. Type Report. The text now reads Expense Report Approval.

    You can add, delete, or change words in the Expense Report Approval template.
  4. Save and close the .rtf file.

Adding Field and Table Attributes to the Expense Report Approval Template

To add field and table attributes to the Expense Report Approval template, complete these steps:
  1. In Microsoft Word, open your local copy of the UpdatedExpenseApprovalNotificationReport.rtf file.

    Note: Depending on your version of Microsoft Word or your installation of Template Builder for Word, you may see either a BI Publisher tab or you may find BI Publisher by the Add-ins menu.
  2. From the Add-ins menu, select BI Publisher > Data > Load Sample XML Data.

  3. In the Select XML data dialog box, search for and select the Expense Approval Data Model .xml file you downloaded.

  4. Click Open.

    A message displays that indicates your .xml data was successfully loaded.

  5. Click OK.

  6. To insert a field in the Expense Report Approval template, place your cursor at the end of the line you want to insert into, and press the Enter key on the keyboard.

  7. From the Add-ins menu, select BI Publisher > Insert > Field.

  8. In the Field dialog box, scroll to the EXPENSES folder, select IMG_REQ_FLAG, and click Insert.

    This step inserts text that indicates a receipt image is required. You can add fields from the data model anywhere in the Expense Report Approval .rtf template.
  9. From the Add-ins menu, select BI Publisher > Insert > Field.

  10. In the Field dialog box, scroll to the RECENTSIMILAREXPENSES folder, select any field that you want to insert, and click Insert.

    Note: You can also insert fields that are associated with the following folders: RecurringViolations, RecentSimilarExpenses, and UnappliedCashAdvances.
  11. Save and close the UpdatedExpenseApprovalNotificationReport.rtf file.

Previewing the Modified Expense Report Approval Template

Before uploading your modified Expense Report Approval template to the BI Catalog, you can preview the changes you made. By previewing changes, you can avoid uploading a modified template that displays errors in the emails sent to users.

  1. Open your local copy of the UpdatedExpenseApprovalNotificationReport.rtf file in Microsoft Word.

  2. At the beginning of your modified .rtf template, save the path information for future reference so you can replace it after previewing. The path information may look like this: <?import:xdoxsl:///Common Content/Templates/Workflow Notification Subtemplate.xsb?>

  3. Replace the path at the beginning of your modified .rtf template with the location of the subtemplate that you downloaded as a prerequisite. For example, change <?import:xdoxsl:///Common Content/Templates/Workflow Notification Subtemplate.xsb?> to <?import:file:///C:/Template_Directory/FinFunWorkflowNotificationSub.rtf?>

    Note: In the preceding example, part of the replacement path, C:/Template_Directory, represents the folder in which the user downloaded the subtemplate to in the second step of the Prerequisites section in this document. Ensure that you change all backward slashes to forward slashes.
  4. From the Add-ins menu, select BI Publisher > Preview > HTML.

  5. If the preview reflects your expected changes, then change the path at the beginning of your modified .rtf file back to the original path.

  6. From the Add-ins menu, select Validate Template.

  7. Save your changes in Microsoft Word.

Uploading the Modified Expense Report Approval Template

To upload and use the modified Expense Report Approval template for email approval notifications, complete these steps:
  1. On the Oracle BI Publisher home page, click the Catalog menu.

  2. On the Catalog page in the Folders pane, expand Shared Folders > Custom > Financials > Workflow Notifications > Expenses.

  3. Click the Expenses subfolder to display the data models and the notification templates.

  4. By the Expense Report Approval, click Edit.

  5. On the Expense Approval Report page, click Add New Layout.

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

  7. In the Upload Template File dialog box, Layout Name field, enter UpdatedExpenseApprovalReportTemplate. The entry represents the name of the Expense Report Approval Template .rtf file that you downloaded and saved to your local drive with the prefix Updated.

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

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

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

  11. Click Upload to open the Processing dialog box and return to the Expense Approval Report page.

    The uploaded modified .rtf file appears.
    Note: Configurable workflow notifications are refreshed every 24 hours so that they perform better for your users. But when you're making changes to reports, subtemplates, or data models, you can apply your changes immediately so they're available for testing. For more information, see the Apply Changes to Workflow Notifications Immediately After Upload topic.
  12. On the Expense Approval Report page, click the View a list link.

  13. In the Layout section in the row for the Updated Expense Report Approval Template, select the Default Layout check box. This step enables your modified Expense Report Approval Notification template to act as the default email approval notification.

  14. Click the Save Report icon.