Oracle Fusion Data Intelligence (FDI) is a family of prebuilt, cloud-native analytics applications for Oracle Fusion Cloud Applications that provide ready-to-use insights to help improve decision-making. It’s extensible and customizable, allowing you to ingest data and expand the base semantic model with additional content.

Overview

This blog is part of the series FDI Notifications focusing on formatted email notifications.

FAIDP pipeline events can be sent as email notifications using Oracle Cloud Infrastructure (OCI) Event Services. You can use OCI Functions to customize and format pipeline email notifications to meet your organization’s needs. By connecting OCI Functions with Event Services, you can trigger a function whenever a pipeline event occurs, process and format the notification details into a user-friendly email, and integrate it with OCI email delivery tools.

Creating Application and Deploying Function

  1. Read Deploy OCI Functions for Fusion Data Intelligence Event Notifications blog to learn how to set up an application and create a function.
  2. While defining policies, in addition to the policy mentioned in the deployment blog, set up the policy required for OCI Email Delivery Services in the same compartment. See the Sample Mail Format Policy template.

    Note: Replace <Child Compartment Name> in the policies with the compartment where you’re creating all artifacts.
  3. In the func.py file, delete the existing code and replace it with the new function code provided as a sample. See Formatting OCI Email Event Notifications Sample Code.
  4. Open the requirements.txt file using the command:
    nano requirements.txt
  5. Add oci and pytz as dependencies since the code uses those libraries. Save and close the file.
    oci
    pytz
  6. Follow the rest of the steps in the blog to deploy the application.
  7. If you’ve created an application called Mail_Formatting and a function called mail_formatting_func, on deployment you’ll see the highlighted state in your OCI application artifact.
Function State
Function deployed state

Configuring Environment Variables for the Function

  • Under your function, go to Configurations then Manage Configurations and define values for the environment variables used by the script.
Function Configuration
Manage Configurations
Configuration Values
Configurations Set up
  • Follow these steps to get each environment variable in the tenancy:
  1. SMTP_PORT and SMTP_SERVER:
    • Navigate to Developer Services and click Email Delivery.
    • Under Configuration, find the SMTP public endpoint server and ports.
    SMTP Public Endpoint
    SMTP Endpoint Details
  2. OCI_SMTP_USER and OCI_SMTP_PW:
    • In the user account you’re using, create a SMTP token and make a note of the values.
    SMTP GENERATE CREDs
    SMTP Token Creation
  3. EMAIL_FROM:
    • You can create a dummy email to send notifications through the method below:
      • Navigate to Developer Services and click Email Delivery.
      • Under Email Domains, create a domain called fdinotify.com.
      • Under Approved Senders, register a sender called no-reply@fdinotify.com. All notification emails are sent through this email to the email address entered as EMAIL_TO.
    CreateEmailDomain
    Email Domain Setup
    CreateApprovedSender
    Approved Sender Setup
    Email Domain: fdinotify.com
    Approved Sender: no-reply@fdinotify.com
  4. EMAIL_TO:
    • To create multiple recipients, separate email addresses with a comma.
    username1@domain.com, username2@domain.com

Configure Topics and Rules

CREATEFUNCTIONSUBSCRIPTION
Subscribe Function to Topic
  • As an example, provide the details below and configure the rule conditions and attributes to receive notifications upon completion of prioritized data refreshes.
RulesforEvents
Rule Conditions and Attributes

Receiving Formatted Email Notifications

  • To test the function without waiting for the actual pipeline trigger, you can use the Publish Message option associated with the topic you just created.
Publish Message
Publish Message
  • The message can be any format, such as a JSON payload or even a single-line statement, depending on what your function requires as input. The title is used as the subject of the email you receive if your email address is subscribed to the topic.
  • Click Publish and validate the results.

You will now receive notifications upon completion of jobs in the below format as triggered by FAIDP pipeline jobs.

Email Output
Formatted Email Notification

Conclusion

Using OCI Functions to format Oracle FDI pipeline email notifications brings consistency, clarity, and customization to communication workflows. This ensures recipients receive well-structured, relevant information, improving operational transparency. Review these topics for information on additional options to store these notifications for further processing and analysis:

Call to Action

Now that you’ve read this post, try it yourself and let us know your results in the Oracle Analytics Community, where you can also ask questions and post ideas.