Create Configured Notification

In IFS Notfy Me it is possible to create own configured notifications. This section will explain in detail how this is done in the  IFS Touch Apps Server, Customer Portal.

Contents

Background

IFS Notify Me included several built-in Notification types. These could not be customized or modified.

In Configured Notification you have the ability to do new customized notifications to be shown in IFS Notify Me.

Pre-Requisites

In order to create a configured notification, there are a set of skills that the one who creates the notification need to have.

Notify Me at a glance

Before we start to do a customized notification, let's have a look at what we have in Notify Me

In IFS Notfy Me we have the following screens

 

The following types of elements can be configured for a customized notification type:

 

  

Configuration Screen 

In the Configuration Screen you have the following:

 

SQL Statements

The SQL statement is done using Add button under sql statement in the first page of configured configuration.

You enter the following information

 

Actions

You enter the following information

Define SQL Statement for Notifications

The SQL statement is done using Add button under sql statement in the first page of configured configuration.

Type of SQL Statement = Parent 

Think about the following when creating the sql statement:

Examples SQL Statement

Example - SQL Statement

Example - Special field aliases

The IFS_ID column is required, and should be the primary identifier of a Notification.

The Aliases (PERSON_1, PERSON_1_EMAIL, PERSON_1_PHONE and PERSON_1_ROLE), and the same combination with PERSON_2 are treated as special fields and will be rendered as contacts.
ACTION_1 and ACTION_2 will control whether the primary and secondary actions are enabled or not.

Define SQL Statements(s) for Detail Data

The SQL statement is done using Add button under sql statement in the first page of configured configuration.

Type of SQL Statement = ChildDetail 

The SQL statement is done using Add button under sql statement in the first page of configured configuration.

Think about the following when creating the sql statement: 

Examples SQL Statement Detailed Data

Example - Child Table

 

Example - Master Detail Connection

Define SQL Statement for Documents (if DOCMAN integration needed)

The SQL statement is done using Add button under sql statement in the first page of configured configuration.

Type of SQL Statement = ChildDocument

Think about the following when creating the detailed sql statement: 

Template for a document query

SELECT &AO.Edm_File_API.Get_Edm_Repository_Info(refobj.doc_class, refobj.doc_no, refobj.doc_sheet, refobj.doc_rev, 'ORIGINAL') AS doc_info,
refobj.doc_class,
refobj.doc_no,
refobj.doc_sheet,
refobj.doc_rev,
&AO.Doc_Title_Api.Get_Title(refobj.doc_class,refobj.doc_no) AS title
FROM &AO.Doc_Reference_Object refobj
WHERE &AO.Edm_File_API.Check_Exist(refobj.doc_class, refobj.doc_no, refobj.doc_sheet, refobj.doc_rev, 'ORIGINAL') = 'TRUE'
AND &AO.Doc_Issue_API.Get_View_Access_(refobj.doc_class, refobj.doc_no, refobj.doc_sheet, refobj.doc_rev) = 'TRUE'
AND refobj.lu_name = '<replace with LU name e.g.: PurchaseOrder>'
AND refobj.key_ref LIKE 'KEY_1=' || :KEY_1 || '%'
/* make sure the keyref matches notification object. Remove this comment before use.*/

Example Documents

Example - Document Connection

Example - How documents are rendered

Define Action(s)

The Actions is done using Add button under Actions in the first page of configured configuration.

You enter an Action Name and the PL/SQL Block.

Think about the following when creating the sql statement:

Example Actions

Example of PL/SQL Block: 

BEGIN
   UPDATE &AO.FND_STREAM_TAB
   SET READ = "FALSE"
   WHERE MESSAGE_ID =   :$MESSAGE_ID$;
   COMMIT;
END;

Define parameters using the syntax shown above (e.g.: “:$MESSAGE_ID$”).
The parameter value will be bound to the current Notification’s corresponding column (MESSAGE_ID in this example).

Example - Actions

Example - Parameters for Actions

Define parameters using the syntax shown above (e.g.: “:$MESSAGE_ID$”). The parameter value will be bound to the current Notification’s corresponding column (MESSAGE_ID in this example).

Create List view template and databinding

The list view template is created on the configuration page, HTML List View.

Use the following template with this recommended structure:

   <ifs-row>
      <ifs-label label-text=“<replace with Notification title>" label-data="ND.<title field>"></ifs-label>
   </ifs-row>
   <ifs-row>
       <ifs-status-icon icon-status-id="ND.StatusId" class=""></ifs-status-icon>
      <ifs-data ifs-data-field="ND.<field for first label>" class="col-xs-9"></ifs-data>
      <ifs-data ifs-data-field="ND.<field for first label>" class="col-xs-9"></ifs-data>
      <ifs-label label-data="ND.<field 1> + ' ' + ND.<field 2>" class="col-xs-9"></ifs-label>
   </ifs-row>

Note that the last item is an <ifs-label> instead of an <ifs-data>, so it renders as an emphasized text block. Note also the use of a Javascript expression, in this case to concatenate two strings.

Think about the following when creating a list view:

Examples List View

Example - List View

Example - List Template Structure

Example - Data Binding to Template

Create Detail view template and databinding

The detailed list view template is created on the configuration page, HTML Detail Template.

Think about the following when creating a detailed template:

List View Template

Template = html snippet bound the notification data. The structure of of the html snippet is the following

Example - <ifs-table> tag

Styling

Styling is done by using the tag attrbute class. The following needs to be thought about when styling.

Here is a list of the ifs style attribute aliases and bootstrap style:

IFS Template Style  Bootstrap Style 
xs-full  col-xs-12
xs-half  col-xs-6 
xs-quarter  col-xs-3 
small-full  col-sm-12
small-half  col-sm-6 
small-quarter  col-sm-3 
medium-full  col-md-12
medium-half  col-md-6 
medium-quarter  col-md-3 
large-full  col-lg-12
large-half  col-lg-6 
large-third  col-lg-4 
large-quarter  col-lg-3
large-sixth  col-lg-2

Examples Detailed View

To make you understand the detailed template, it is easier to show with some examples:

Example - Template:

ss

Example - Showing Contacts

 

Example - Formatting Dates

 

Three formatting options are available for Date and Time values:

All are formatted based on the device’s current language’s locale.

Example - Showing Detail (Child Data)

Note that this will show all child tables, in the order that they are defined in the configuration.

 

Example - Showing Documents

Example - Data bindings to template - Simple Fields

 

Example - Data bindings to template - Special Fields

Define Translations

The translations is created on the configuration page, Translation.

Think about the following when creating translations:

Examples Translation

Example - Translation:

Example - Translation Mechanism

 

Example - Advanced Translation

 

Testing, Debugging and Diagnostics

It is important to test and in wirst case debug the sql statements.

Think about the following while testing:

Debug

Debug is done in IFS Touch Apps Server, Customer Portal. The same page as when you create a configured notification. Enable the “Debug” notification type to see what notification types are active on your system (some may be inactive because of missing grants even though they are enabled on the customer portal).

You will also get Oracle error messages etc., if a notification type fails. This is global to all users, so remember to turn this off in production environments!