Flow Acknowledgment

Overview

The Flow Acknowledgment component is used to customize the Acknowledgment screen displayed after a user journey. When a user performs actions such as paying a bill or makes any transaction, towards the end of the payment, the Flow Acknowledgment component is used to display the status and details of the actions.

The Flow Acknowledgment component contains two main functional flows: Success and Failure. The Success flow displays the success message, success icon, and the details of the action (such as transaction details).

The Failure flow displays the failure icon, error message, and error details.

The UI of the Flow Acknowledgment component contains two sections. The first section contains the status of the user journey and the message. The second section is optional, and it displays the details of the user journey.

NOTE: The Flow Acknowledgment component is used inside the Mobile Banking application.

Flow Acknowledgment Contracts

The Flow Acknowledgment component contains contracts for customizing the widgets and UI of the Acknowledgment screen. The Flow Acknowledgment component contains the following contracts for customization.

Service Parameters

The Service Parameters contract of the Flow Acknowledgment component provides services helps to set the service details to get the response data. The response data retrieved from the service is mapped to the widgets using the Data Mapping property and then displayed on the screen.

Here is a sample of the JSON object provided in the Service Parameter of the Flow Acknowledgment component.

{
  "ObjectName": {
    "ServiceType" : "",
    "Service": "",
    "Object": "",
    "Verb": "",
    "Criteria": {}
  }
}

The Service Parameter contract provides the following key-value pairs for customization.

Property Description
ServiceType

Type: String

Defines the type of service to be performed.

For example: customVerb, getByCriteria

Service

Type: String

Name of the object service mentioned in the Quantum Fabric layer to fetch the data and meta data required for the component.

Object

Type: String

Name of the object linked to the object service mentioned above in the Quantum Fabric layer to fetch the data required for the component.

Verb

Type: String

Name of the operation or custom verb linked to the specified objects in the Quantum Fabric layer to fetch the data required for the component.

Criteria

Type: JSON object

The request payload as defined and configured in the Quantum Fabric Object service and operation.

Data Mapping

The Data Mapping property of the Flow Acknowledgment component maps the widget IDs with the data to be displayed. The data is retrieved from Data Collection Object, Context variable, or Service response. The Data Mapping property of Flow Acknowledgment component supports the following Tokens.

  • ${Collection.CustomerAdvice.fileNames}: Maps the value stored in collection object.
  • ${CNTX.fileNames}: Maps the value from the Context variable.
  • ${i18n{i18n.common.notes}}: Maps the i18n text.

Here is a sample of the JSON object provided in the Data Mapping of the Flow Acknowledgment component.

{
	"successFlow": {
		"key": "referenceID",
		"value": [],
		"operator": "NEQ"
	},
	"successHeader": {
		"lblSuccessField1": "${i18n{i18n.common.transferSuccessMessage}}",
		"lblSuccessField2": "${CNTX.amount}",
		"lblReferenceID": "${i18n{i18n.common.referenceNumber}}",
		"lblRefereceIDValue": "${CNTX.referenceID}",
		"lblSuccessField4": "${CNTX.Message}"
	},
	"failureHeader": {
		"statusIcon": "error.png",
		"lblErrorField1": "${i18n{i18n.common.enrollFailureMessage}}",
		"lblErrorField2": "${CNTX.dbpErrMsg}"
	},
	"segments": {
		"segDetails": {
			"segmentUI": {
				"${i18n{i18n.common.from}}": "${CNTX.from}",
				"${i18n{i18n.common.to}}": "${CNTX.to}",
				"${i18n{i18n.common.frequency}}": "${CNTX.frequency}",
				"${i18n{i18n.common.transferDate}}": "${CNTX.transferDate}",
				"${i18n{i18n.common.fxRateRef}}": "${CNTX.fxRate}",
				"${i18n{i18n.common.exchangeRate}}": "${CNTX.exchangeRate}",
				"${i18n{i18n.common.transactionFee}}": "${CNTX.transactionFee}",
				"${i18n{i18n.common.brokerFee}}": "${CNTX.brokerFee}",
				"${i18n{i18n.common.recipientDetail}}:": "${CNTX.address}",
				"${i18n{i18n.common.transferCharge}}": "${CNTX.transferCharges}"
			},
			"additionalIdentifier": {
				"${i18n{i18n.common.transferDate}}": "${i18n{i18n.common.dateFormat}}"
			},
			"minimumRecords": "5"
		},
		"segDocuments": {
			"segmentMasterData": "${CNTX.documents}",
			"segmentUI": {
				"lblAttachmentType": "",
				"imgAttachmentType": "${segmentMasterData.fileImageSource}",
				"lblAttachment": "${segmentMasterData.fileName}",
				"lblDownload": "${segmentMasterData.fileActionSource}"
			},
			"backEndMappings": {
				"fileContent": "${segmentMasterData.fileContent}"
			}
		},
		"segErrorDetails": {
			"segmentMasterData": "${CNTX.errorDetails}",
			"segmentUI": {
				"lblGenericMsgInfo": "${segmentMasterData.message}"
			},
			"maxErrorMsgLength": "3"
		}
	},
	"detailsSection": {
		"lblNotes": "${i18n{i18n.common.notes}}",
		"noteMsg": "${CNTX.notes}",
		"lblSupportingDocsLabel": "${i18n{i18n.common.supportingDocs}}",
		"btnShowMore": "${i18n{i18n.common.showMore}}",
		"btnShowLess": "${i18n{i18n.common.showLess}}"
	},
	"footerSection": {
		"btnSuccessAction1": "${i18n{i18n.common.done}}",
		"btnSuccessAction2": "${i18n{i18n.common.transferActivities}}",
		"btnSuccessAction3": "",
		"btnSuccessAction4": "",
		"btnFailureAction1": "${i18n{i18n.common.close}}",
		"btnFailureAction2": "${i18n{i18n.common.contactUs}}"
	}
}

The Data Mapping contract is assigned a JSON object with the following key-value pairs.

Key Description
successFlow

Defines the flow of the component. The Flow Acknowledgment components has two flows, Success and Failure. The successFlow parameter accepts a JSON object with the following key- value pairs

  • key: Response Identifier to decide the flow.
  • value: Maps conditional value s in an Array format.
  • operator: Defines the conditional operators used inside the value field. This parameter can have the values, NEQ (Not Equals) and EQ (Equals)
successHeader

JSON object contract that maps the header section widgets for the Success flow. This parameter contains the mapping of widgets to their context value, i18n key, or service parameter. This parameter allows mapping for the following widgets.

  • lblSuccessField1
  • lblSuccessField2
  • lblReferenceID
  • lblRefereceIDValue
  • lblSuccessField4

To hide any widget, provide an empty value to the widget mapping.

failureHeader

JSON object contract that maps the header section widgets for the Failure flow. This parameter contains the mapping of widgets to their context value, i18n key, or service parameter. This parameter allows mapping for the following widgets.

  • lblErrorField1
  • lblErrorField2
  • statusIcon

To hide any widget, provide an empty value to the widget mapping.

segments

This section maps the data with the widgets in a key value format. This parameter accepts a JSON object with the following key value pairs.

  • segDetails: A JSON object that contains the data in a key-value format. The JSON object contains the following three keys.
    • segmentUI: Maps the segment UI data as a key-value pair with the label widget as the key.
    • additionalIdentifier Maps any additional identifiers required for the label. For example, when the Transfer Date label has to display the date in the following format: DD/MM/YYYY, the format of the date can be modified using this key. To modify the date format provide the label widget as key and the required format as value.
    • minimumRecords: Number of records to be displayed in a normal view.
  • segDocuments: Maps the supporting documents using an object in JSON format. This parameter contains the following keys.
    • segmentMasterData: Maps the parent key in an Array format.
    • segmentUI: Maps the widget ID with the corresponding data.
    • backEndMappings: Maps additional information (other than UI data).
  • segErrorDetails: This parameter is mainly used in the Failure Flow. This parameter accepts a JSON object with the following keys.
    • segmentMasterData: Maps the parent key of the error details in an Array format.
    • segmentUI: Maps the widget ID with the corresponding error details.
    • maxErrorMsgLength: Sets the length of the error messages displayed in the UI.
  • detailsSection: This parameter is used to map text for any additional Labels in the UI such as Notes and text for Show More and Show Less options.
  • footerSection: Configures the text to be assigned to the footer action buttons are clicked. The Footer section contains four action buttons for the Success Flow and two action buttons for Failure Flow. To hide any Button, provide an empty value to the widget mapping.

Data Formatting

The Data Formatting property is used to provide a custom format for a specific requirement. The Flow Acknowledgment component does not contain any customization.

{}

Conditional Mapping Key

The Conditional Mapping Key is used to define mapping based on a criteria.

For example, if a label defined in the UI must display different data according to the type of account, a developer must set the Conditional Mapping Key property to the following value. The Flow Acknowledgment component does not contain any value for this key.

{}

Conditional Mapping

The Conditional Mapping property key is used to map a widget with a data from Collection Object or service response as per the Conditional Mapping key. The Flow Acknowledgment component does not contain any customization for this key.

{}

Dynamic Skin

The Dynamic Skin contract of the Flow Acknowledgment component is used to override any existing skins used inside the component.

The Dynamic Skin contract assigned a JSON object with the following key-value pairs.

Key Description
fields

Maps widget IDs with the corresponding Component level widget skins.

Here is the format for mapping the widget with the corresponding skins.

{
 <widgetID1>  : <skinName1>,
 <widgetID2>  : <skinName2>
}
segmentsFields

JSON object used to map the skins in the template level. This parameter provides separate keys for each template. The keys

  • segDetails
  • segDocuments
  • segErrorDetails

Refer the Format for Dynamic Skinning to know how to apply skins in the segmentsFields parameter.

Format for Dynamic Skinning

The Flow Acknowledgment component provides two methods to assign skins to the segmentsFields parameter. These are

  • Applying Skin Directly: Using this method, a direct static pre-defined skin is assigned to the widget as a key value pair.
    In the following example, the lblGrey400FS30 skin is applied to the lblFieldLabel Label inside the segDetails template.
     "segDetails": {
          "lblFieldLabel" : "lblGrey400FS30"
       },
  • Applying Skin Based on a Condition: Using this method, the label is assigned a pre-defined skin based on certain conditions. For example, to apply different Font icons for different file extensions (such as PDF).
    In the following example, the lblAttachmentType Label applies the lblGrey300FS50 skin when a PDF files is displayed.
    "lblAttachmentType" : {
      "PDF" : "lblIconGrey300FS50"
    }
    

    The constants for each font icons (such as PDF) must be created in the componentUtility file. After creating the constants, a developer can map the constant with the skin name in the contract.

Here is a sample of the JSON object provided in the Dynamic Skin contract of the Flow Acknowledgment component.

{
  "fields" : {
    "lblSuccessField2" : "lblGrey500FS70Emp"
  },
  "segmentsFields" : {
    "segDetails": {
      "lblFieldLabel" : "lblGrey400FS30",
      "lblFieldValue" : "lblGrey500FS30Emp"
    },
    "segDocuments": {
      "lblAttachment" : "lblGrey500FS30",
      "lblAttachmentType" : {
        "PDF" : "lblIconGrey300FS50"
      }
    },
    "segErrorDetails" : {
      "flxGenericMsgIcon" : "flxGrey200XL"
    }
  }
}

onError event

The OnError event is invoked when an error occurs during the user journey. When the onError event is invoked, an error object is passed to the parent widget. This object contains the information about the error as well as where it had occurred.

Parameter Value
Input parameter JSON object

Object Description

The JSON object contains the following keys:

  • level: This key contains the String value regarding the place in which the error occurs. It can be from the component View controller or from the component Business controller.
  • method: This key contains the method to be executed when an error occurs.
  • error: This key contains the actual error message and the stack.

Sample Input

var errordata = {
	"level": "ComponentViewController",
	"method": "render",
	"error": err
};
this.onError(errordata);

handCallToAction Event

This event is used to pass the Button (CTA) ID and component context information to the parent widget.

Parameter Value
Input parameter

The following parameters are passed as a JSON object.

  • btnID: Current Button (CTA) Identifier
  • context: JSON object containing the context variable. For more information on the context object, click here.
Programmatic Name handleCallToAction

Sample Code

this.handCallToAction(btnID, contextdata);

Return Type

None

downloadPDF Event

The downloadPDF event is used to provide the Selected Row data information of the mapped Attachments to the parent widget.

Parameter Value
Input parameter

The following parameters are passed as a JSON object.

  • fileName: Name of the attachment including the file extension.
  • filetypeSource: Source type of the file.
  • fileContent: The content inside the file.
  • fileActionSource: Source or UNICODE for the icon to be displayed on the download button.
Programmatic Name downloadPDF

Sample Code

var filedata = {
	"fileName": "Attachement2.Pdf",
	"filetypeSource": "\ue95f",
	"fileContent": "content",
	"fileActionSource": "\ue93d"
};
this.downloadPDF(filedata);

Return Type

None

setContext Method

This method is invoked inside the parent component or form controller. Using this method, you can pass the context object containing the information required for the component.

Parameter Value

Syntax

this.view.componentID.setContext(contextData);

Input parameter JSON object containing the context variable. For more information on the context object, click here.

Sample Input

this.view.flowAck.setContext(contextData);

Return Type

None

adjustScreen Method

This method is used to retrieve the dynamic height of the header. This height is then used to adjust the height of the content and footer of the screen.

Parameter Value

Syntax

this.view.<componentID>.adjustScreen(headerheight);

Input parameter headerheight: The height of the header in DP.

Sample Input

this.view.flowAck.adjustScreen(headerheight);

Return Type

None

Context Object

The context object is a JSON object that is passed to the Flow Acknowledgment component containing details of the payment or transaction.

Out of the response provided, the following parameters are used in the component.

  • from
  • to
  • frequency
  • transferDate
  • fxRate

Here is a sample of the Context JSON Object used inside the component.

var context = {
      "from": "Savings Account",
      "to": "John's Account",
      "frequency": "Once",
      "transferDate": "01/01/1971",
      "fxRate": "FX123456",
}

 

 

Copyright © 2020- Temenos Headquarters SA

Published on :
Monday, May 2, 2022 5:08:53 PM IST

Feedback
x