2 Database Configurations

1. DIGX_EM_EVENT_GROUP

This table contains the available event group entries in OBDX. One event group may have multiple events. An event group can be created as per the requirements.

COLUMN NAME DESCRIPTION
ID A unique identifier for the event group.
NAME Name of the event group.
DESCRIPTION Description of the event group.
IS_DND_APPLICABLE Identifies whether the DND setting is applicable for this event group or not. Possible values: ‘Y’ or ‘N’.

2. DIGX_EM_EVENT

The events are added in the DIGX_EM_EVENT table.

COLUMN NAME DESCRIPTION
ID A unique identifier for the event occurred. It should be a logical name for the event.
NAME Name of the event.
DESCRIPTION Description of the event.
EVENT_TYPE Identifies if the event is Mandatory or Subscribe-able for the user. Possible values are: ‘M’ or ‘S’.
EVENT_GROUP_ID Specifies the Group id of the event.
TASK_ID This column is used for subscription-based alerts. If account access needs to be checked for an alert before sending it to receiver, this task id will be used to check account access.

3. DIGX_EM_MESSAGE_ATTRIBUTE

Message attributes are added in the table DIGX_EM_MESSAGE_ATTRIBUTE table.

COLUMN NAME DESCRIPTION
NAME Name of the attribute. This needs to be used in the message template where the dynamic value needs to be replaced.
DESCRIPTION Description of the attribute.
EVENT_ID ID of the Event. It should match ID column of DIGX_EM_EVENT
DATATYPE It determines the type of data. Example – String, Date, Currency, Complex and Number.
PATH It specifies the path of message template.

4. DIGX_EM_MESSAGE_ACTION

Message Actions are added in DIGX_EM_MESSAGE_ACTION table. This is only for those events that are actionable and contains URL.

COLUMN NAME DESCRIPTION
NAME Name of the action. This needs to be used in the template where the link needs to be replaced with
DESCRIPTION Description of the action.
EVENT_ID ID of the Event. It should match ID column of DIGX_EM_EVENT
URL_TEMPLATE URL of the event. This is the actual URL/ link where the user will be redirected to.
URL_TEXT This is the text that will be displayed in the alert received by the user.
LOGIN_REQUIRED Identifies if login is required or not. If the redirection page is restricted, it should ask for login page. Possible values: ‘Y’ or ‘N’.

5. DIGX_EM_MESSAGE_TEMPLATE

Message templates are added to the table DIGX_EM_MESSAGE_TEMPLATE table.

COLUMN NAME DESCRIPTION
NAME Name of the message template.
TITLE Title of the message template. This is the subject on the alert in case of email and on-screen message.
CONTENT It contains the format for the message body. It is stored as CLOB in the table.
LOCALE The locale column stores language and regional preferences, typically represented by language codes like "en" for English.
DETERMINANT_VALUE It determines the entity code for the template.
DELETE_STATUS Identifies the delete status of message template. Possible values are: ‘Y’ or ‘N’.
EVENT_ID ID of the Event. It should match ID column of DIGX_EM_EVENT.
DESCRIPTION Description of the message template.

Note:

While defining the content of the message template, the attribute name and the message action name needs to have # as prefix and suffix.

Example: If the attribute name in payeeName, the message content would be, “You have added #payeeName# as a beneficiary for payment.

6. DIGX_EM_MESSAGE_TEMPLATE_DESTINATION_REL

A message template needs to be mapped to the desired destinations to which alert needs to be delivered.

COLUMN NAME DESCRIPTION
TEMPLATE_NAME Name of the message template. It should match the column NAME of DIGX_EM_MESSAGE_TEMPLATE.
LOCALE The locale column stores language and regional preferences, typically represented by language codes like "en" for English. It should match the column LOCALE of DIGX_EM_MESSAGE_TEMPLATE.
DETERMINANT_VALUE It determines the entity code for the template. It should match the column DETERMINANT_VALUE of DIGX_EM_MESSAGE_TEMPLATE.
DESTINATION_ID Determines the channel on which alert is to be sent. Possible values are SMS, WA, SMB, EM and PN.

7. DIGX_EM_DESTINATION

Destinations are added in DIGX_EM_DESTINATION table. In the application five such destinations are already present which are Email(EM), SMS(SMS), Push Notification(PN), Secure Mailbox(SMB) and WhatsApp(WA).

COLUMN NAME DESCRIPTION
ID Primary key of the table. An identifier for the destination.
NAME Name of the destination.
DESCRIPTION Description of the destination.

Note:

Entries for most of the event groups, events, message attributes, message action, message templates and message template destination relation are already added. Please check for the entries in the table to avoid repetition.

Sample Scripts

  • insert into DIGX_EM_EVENT_GROUP (ID,NAME,DESCRIPTION,IS_DND_APPLICABLE) 
    values ('SMS', ' User Management', 'Event group for user management', 'N');
  • insert into DIGX_EM_EVENT (ID,NAME,DESCRIPTION,EVENT_TYPE,EVENT_GROUP_ID,TASK_ID) 
    values ('USER_LOGIN_SUCCESS', 'Login success Alert', 'Login success Alert', 'M', 'SMS', null);
  • insert into DIGX_EM_MESSAGE_ATTRIBUTE (NAME,DESCRIPTION,EVENT_ID,DATATYPE,PATH) 
    values ('BankName', 'Bank Name For Login Success Alert', 'USER_LOGIN_SUCCESS', 'String', 'bankName')
  • insert into DIGX_EM_MESSAGE_ACTION (NAME,DESCRIPTION,EVENT_ID,URL_TEMPLATE,URL_TEXT,LOGIN_REQUIRED) 
    values ('act1', 'Url Template for Approval of Non-Financial Transaction', 
    'com.ofss.digx.app.approval.service.transaction.Transaction.checkApprovals.nonfinancial_TRANSACTION_INITIATED_APPROVER', 
    'home.html?homeModule=approvals&homeComponent=transaction-detail&params={"apiType":"#ApiType#","transactionId":"#TxnReferenceNo#"}', 
    'click here', 'Y'); 
  • insert into DIGX_EM_MESSAGE_TEMPLATE (NAME,TITLE,CONTENT,LOCALE,DETERMINANT_VALUE,DELETE_STATUS,EVENT_ID,LAST_UPDATED_BY,
    LAST_UPDATED_DATE,DESCRIPTION) values ('USER_LOGIN_SUCCESS_SHORT', 'Login Success Alert.', 'You have successfully logged in 
    to your internet banking on #loginSuccessDateAndTime#. If you do not recognize this login attempt, immediately contact customer 
    care/branch.', 'en', '*', 'N', 'USER_LOGIN_SUCCESS', 'OBXUser',sysdate, 'Login success Alert Short Template');
  • insert into DIGX_EM_MESSAGE_TEMPLATE_DESTINATION_REL (TEMPLATE_NAME, LOCALE,DETERMINANT_VALUE,DESTINATION_ID) 
    values ('USER_LOGIN_SUCCESS_SHORT', 'en', '*', 'SMS');
  • insert into DIGX_EM_MESSAGE_TEMPLATE_DESTINATION_REL (TEMPLATE_NAME,LOCALE,DETERMINANT_VALUE,DESTINATION_ID) 
    values ('USER_LOGIN_SUCCESS_SHORT', 'en', '*', 'PN'); 
  • insert into DIGX_EM_DESTINATION (ID, NAME, DESCRIPTION) 
    values ('SMS', 'SMS', 'Destination for sending messages via SMS');