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 For updates to email notifications for
layout template do I update? purchase order approval:
Purchase Order Notification Report
Purchase Order Notification Data
Model
Purchase Order Approval Layout
Do I want to add prompts and No, not for this example.
headers to the layout template?
Do I want to add data model Yes, the Note to Supplier attribute.
attributes to the layout
template?
Which language do I use for the English (United States).
RTF template?
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:
o Sign in to the Oracle Analytics Publisher server with the BI
Administrator Role to open the Oracle Business Intelligence
Home page.
o Click Catalog.
o In the BI catalog, go to Shared Folders > Common
Content > Templates for the predefined subtemplate.
o Click More for the Workflow Notification Subtemplate.
o Click the Download option.
o 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. To add Project Name, Project Manager, and PR Description add
the following SQl phrase before from clause
-- PR data : Adding Requisition number, Project name, Project manager,
and PR description to PO approval notification
(SELECT DISTINCT LISTAGG(rha.REQUISITION_NUMBER, ', ') WITHIN
GROUP (ORDER BY rha.REQUISITION_NUMBER)
FROM por_requisition_headers_all rha,
por_requisition_lines_all rla,
por_req_distributions_all rda,
po_distributions_all pda,
po_headers_all phad
WHERE 1=1
AND rha.requisition_header_id =
rla.requisition_header_id
AND rla.requisition_line_id = rda.requisition_line_id
AND rda.distribution_id = pda.req_distribution_id
AND pda.po_header_id = phad.po_header_id
AND rla.po_line_id = Line.po_line_id
AND rla.po_header_id = phad.po_header_id)
MULTIPLE_PR_NUMBERS,
(SELECT DISTINCT LISTAGG(rha.attribute2, ', ') WITHIN GROUP (ORDER
BY rha.attribute2)
FROM por_requisition_headers_all rha,
por_requisition_lines_all rla,
por_req_distributions_all rda,
po_distributions_all pda,
po_headers_all phad
WHERE 1=1
AND rha.requisition_header_id =
rla.requisition_header_id
AND rla.requisition_line_id = rda.requisition_line_id
AND rda.distribution_id = pda.req_distribution_id
AND pda.po_header_id = phad.po_header_id
AND rla.po_line_id = Line.po_line_id
AND rla.po_header_id = phad.po_header_id)
PR_PROJECT,
(SELECT LISTAGG(rha.attribute3, ', ') WITHIN GROUP (ORDER BY
rha.attribute3)
FROM por_requisition_headers_all rha,
por_requisition_lines_all rla,
por_req_distributions_all rda,
po_distributions_all pda,
po_headers_all phad
WHERE 1=1
AND rha.requisition_header_id =
rla.requisition_header_id
AND rla.requisition_line_id = rda.requisition_line_id
AND rda.distribution_id = pda.req_distribution_id
AND pda.po_header_id = phad.po_header_id
AND rla.po_line_id = Line.po_line_id
AND rla.po_header_id = phad.po_header_id)
PR_PROJECT_MGR,
(SELECT DISTINCT LISTAGG(rha.DESCRIPTION, ', ') WITHIN GROUP
(ORDER BY rha.DESCRIPTION)
FROM por_requisition_headers_all rha,
por_requisition_lines_all rla,
por_req_distributions_all rda,
po_distributions_all pda,
po_headers_all phad
WHERE 1=1
AND rha.requisition_header_id =
rla.requisition_header_id
AND rla.requisition_line_id = rda.requisition_line_id
AND rda.distribution_id = pda.req_distribution_id
AND pda.po_header_id = phad.po_header_id
AND rla.po_line_id = Line.po_line_id
AND rla.po_header_id = phad.po_header_id)
PR_DESCRIPTION
-- End PR data
12. 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:
o In the Data Model section, select Properties.
o In the Properties section, select Include Empty Tags for Null
Elements.
o In the Data Model section, select Data Sets.
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:
o Document Number
o Sold-to Legal Entity
o 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. After PR Number line add new lines for “Project Name”, “Project
Manager”, and “PR Description”
10. On the BI Publisher tab, in the Insert section, click the 123
Field button.
11. On the Field dialog box, locate and select
the NoteToSupplier attribute.
12. On the Field dialog box, locate and select the ‘Project Name’,
‘Project Manager’, and ‘PR Description’ attribute.
13. Click Insert for each attribute.
14. Click Close to return to the UpdatedPurchaseOrderNotification.rtf
template.
15. Save and close the document.
16. 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.
17. 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.
Reflect Changes from Edited Reports
Sooner
When you use the Customize option to edit a predefined report, your
changes won't be reflected until a refresh that happens every 24 hours. For
changes to take effect sooner, use profile options to change the refresh
interval.
The refresh applies your changes to Oracle Fusion Cloud Applications, but
you can immediately see your changes in Microsoft Word and Oracle
Analytics Publisher. For example, you download a predefined .rtf layout
template and edit the file in Word. You can see the modified output using the
preview in Word. After you upload the .rtf file to the catalog, you can open
the report in Analytics Publisher and see your changes. But, if you're
accessing the report from Fusion Applications, you see the updated output
only after the refresh.
When you're done configuring and testing reports, use the same profile
options to turn the refresh back to every 24 hours. But even if you don't, the
refresh automatically resets to 24 hours when it's been more than 8 hours
since you set the profile options. The 24-hour refresh interval helps optimize
performance.
Create Profile Options to Control the Refresh
Your profile options can apply to all workflow tasks, a product family, or a
product. Based on the scope you want, your profile option must have a
profile option code that follows a certain format.
Scope Profile Option Code Examples
Global BIP_CLIENT_REFRESH_TIME BIP_CLIENT_REFRESH_TIME
Product BIP_CLIENT_REFRESH_TIME_<FAMIL BIP_CLIENT_REFRESH_TIME_FIN
Family Y>
BIP_CLIENT_REFRESH_TIME_HCM
BIP_CLIENT_REFRESH_TIME_PRC
BIP_CLIENT_REFRESH_TIME_PRJ
Scope Profile Option Code Examples
BIP_CLIENT_REFRESH_TIME_SCM
Product BIP_CLIENT_REFRESH_TIME_<FAMIL BIP_CLIENT_REFRESH_TIME_FIN_A
Y>_<PRODUCT> P
BIP_CLIENT_REFRESH_TIME_HCM_
PER
BIP_CLIENT_REFRESH_TIME_PRC_P
ON
BIP_CLIENT_REFRESH_TIME_PRJ_P
E
BIP_CLIENT_REFRESH_TIME_SCM_
GO
The profile options with a smaller scope take precedence. For example, you
have profile option A with a global scope and profile option B with a product
scope. If you're currently configuring notifications for a particular product,
use profile option B to adjust the refresh time just for that product. But based
on profile option A, the refresh is still at 24 hours for all other configurable
notifications in all other products. Profile option B takes precedence over
profile option A only for that one product.
Tip:
To find the product family or product code, go to the Setup and Maintenance
work area. Use the Manage Taxonomy Hierarchy task in the Application
Extensions functional area for any offering. In the hierarchy, expand the root
node and then the Oracle Fusion node. Find the row for the family or product
and look in the Module Key column for the code.
Now you're ready to create your profile options!
1. In the Setup and Maintenance work area, go to the Manage
Applications Core Profile Options task in the Application Extensions
functional area for your offering.
2. On the Manage Applications Core Profile Options page, click
the New icon.
3. On the Create Profile Option page, enter the profile option code in the
format that corresponds to the scope you want.
4. Enter a display name that you can easily remember to help you find
the profile option later.
5. From the Application list, select Oracle Middleware Extensions for
Applications.
6. From the Module list, select Application Core.
7. Specify a start date.
8. Click Save and Close.
9. On the Manage Applications Core Profile Options page, make sure that
your new profile option is selected in the Search Results: Profile
Options subsection.
10. In the <Profile Option>: Profile Option Levels subsection, select
the Enabled and Updatable check boxes for the Site level.
11. Save your work.
Set the Refresh Interval
In the Setup and Maintenance work area, go to the Manage Applications
Core Administrator Profile Values task in the Application Extensions
functional area. Set your profile option at the Site level and enter 15 or
higher for the refresh interval in minutes. If you enter 15, your changes are
reflected in Fusion Applications 15 minutes after they're saved in the BI
catalog. For example, 15 minutes after you upload an edited .rtf layout
template to the catalog, or after you update report properties in Analytics
Publisher.
Caution:
Make sure to enter a whole number.
When you're done making and testing your changes, set the profile option
back to 1440, which is 24 hours in minutes. If you forget and leave your
profile option as is for longer than 8 hours, don't worry! At that point, the
profile option resets itself back to 1440 minutes.