Accelerator MariaDB Global Financial Account System API - Implementation Template
Data mappings
This document provides information generated from the DataWeave scripts included in the project, such as function definitions, variable definitions, and data mapping tables.
| Module | Description |
|---|---|
| GlobalFinancialTools | Common functions and variables used for Global Financial System |
| accounts-get-response | Mapping for Query Financial Account from Global Data System |
| accounts-patch-payload | Mapping for Update Financial Account in Global Data System Maps CIM Financial Account to payload which is used as input parameter in the update query of FINANCIAL_ACCOUNT table. The fields in both CIM and Global Data DB are identical. PATCH payload is created by validating the Input Request payload with DB Record Payload. |
| accounts-post-payload | Mapping for Create Financial Account in Global Data System. Maps CIM Financial Account JSON to JSON which is used by stored procedure sp_FinancialAccount_Upsert. The fields in both CIM and Global Data DB are identical. |
| cards-get-response | Mapping for Query Financial Cards from Global Data System |
| cards-patch-payload | Mapping for Update Financial Card in Global Data System Maps CIM Financial Card to payload which is used by stored procedure sp_FinancialCard_Upsert. The fields in both CIM and Global Data are identical. PATCH payload is created by validating the Input Request payload with DB Record Payload. |
| cards-post-payload | Mapping for Create Cards in Global Data System. Maps Global Data Cards JSON to JSON which is used by stored procedure sp_FinancialCard_Upsert. |
| get-externalids-response | Mapping for Query ExternalIds from Global Data System |
| transactions-get-response | Mapping for Get Transactions from Global Data System. |
| transactions-patch-payload | Mapping for Update Transactions in Global Data System Maps CIM Financial Transaction to payload which is used by stored procedure sp_FinancialTransaction_Upsert. The fields in both DB and CIM FinancialTransaction are identical. PATCH payload is created by validating the Input Request payload with DB Record Payload. |
| transactions-post-payload | Mapping for Create Transactions in Global Data System. Maps Global Data Account JSON to JSON which is used by stored procedure sp_FinancialTransaction_Upsert. |
GlobalFinancialTools
Common functions and variables used for Global Financial System
Source:
./src/main/resources/dwl/GlobalFinancialTools.dwl
Functions
fun convertBoolean (item)
Function to convert boolean values to 0 or 1
param
item- Takes input to convert fields that holds boolean values as true or false
return - JSON object with values converted for boolean fields as 1 or 0
accounts-get-response
Mapping for Query Financial Account from Global Data System
Source:
./src/main/resources/dwl/accounts-get-response.dwl
Mapping Tables
Maps Global Data DB Fields to CIM Financial Account
| Global Data DB Field | CIM Financial Account | Description | |
|---|---|---|---|
| ID | id | flag to allow customer to return a Product | |
| NAME | name | descriptive name of the account | |
| ACCOUNT_NUMBER | accountNumber | account number | |
| ACCOUNT_TYPE | accountType | discriminator property set to the specific type of account by name (e.g. | CheckingAccount) |
| ACCOUNT_STATUS | accountStatus | flag to preorder the Product | |
| ACCOUNT_BALANCE | accountBalance | current credit (positive) or debit (negative) balance of the account | |
| AVAILABLE_BALANCE | availableBalance | amount of funds (or credit) available for withdrawal | |
| ACCOUNT_CURRENCY | accountCurrency | customer-provided nickname for the account | |
| ACCOUNT_LABEL | accountLabel | label for the Account | |
| INTEREST_RATE | interestRate | interest rate for the amount | |
| TAX_IDENTIFICATION_NUMBER | taxIdentificationNumber | Tax Identification Number associated with the account | |
| OPENED_DATE | openedDate | date of opening the account | |
| CLOSED_DATE | closedDate | date of Closing the account | |
| LAST_STATEMENT_DATE | lastStatementDate | date the last statement was produced for this account | |
| CREDIT_LIMIT | creditLimit | credit limit for the Card | |
| LOAN_TYPE | loanType | loan type associated with the account | |
| ORIGINAL_LOAN_AMOUNT | originalLoanAmount | loan amount of the account | |
| LOAN_DURATION_MONTHS | loanDurationMonths | loan duration for repayment | |
| MINIMUM_PAYMENT | minimumPayment | minimum payment to be made to the account | |
| PRINCIPAL_BALANCE | principalBalance | principal balance associated with the loan account | |
| DEPOSIT_ACCOUNT_TYPE | depositAccountType | deposit account | |
| ROUTING_NUMBER | routingNumber | Branch or routing number for the account | |
| OVERDRAFT_LIMIT | overdraftLimit | Indicates the maximum deficit in an account; a value of 0.0 means no overdraft is allowed | |
| DAILY_WITHDRAWAL_LIMIT | dailyWithdrawalLimit | Maximum amount that can be withdrawn directly from this account per day | |
| LAST_DEPOSIT_DATE | lastDepositDate | Date the last deposit was made on | |
| LAST_WITHDRAWAL_DATE | lastWithdrawalDate | Date the last withdrawal was made on | |
| MAXIMUM_MONTHLY_WITHDRAWALS | maximumMonthlyWithdrawals | Maximum amount that can be withdrawn directly from this account per month | |
| MINIMUM_BALANCE | minimumBalance | The minimum amount that must be held in a Money Market account | |
| MONTHLY_WITHDRAWAL_LIMIT | monthlyWithdrawalLimit | The maximum number of withdrawals allowed per month | |
| LAST_TRANSACTION_DATE | lastTransactionDate | Date a transaction was last recorded for this account | |
| LAST_TRANSACTION_TYPE | lastTransactionType | References the type of transaction last recorded for this account | |
| LAST_TRANSACTION_AMOUNT | lastTransactionAmount | Amount of the last transaction recorded for this account | |
| LAST_PAYMENT_DATE | lastPaymentDate | Date the last deposit was made on | |
| LAST_PAYMENT_AMOUNT | lastPaymentAmount | Amount of the last payment made | |
| CUSTOMER_ID | primaryAccountOwner | References the primary owner of this account by their global identifier | |
| CUSTOMER_ID | secondaryAccountOwners | References additional owner(s) of this account by their global identifiers | |
| CREATED_BY | auditInfo.createdBy | Identifies the system or user which created the entity | |
| CREATED_DATE | auditInfo.createdDate | Timestamp of when the entity was created - default as current timestamp | |
| UPDATED_BY | auditInfo.updatedBy | Identifies the system or user which last updated the entity | |
| UPDATED_DATE | auditInfo.updatedDate | Timestamp of when the entity was last updated | |
| IS_DELETED | auditInfo.isDeleted | Indicates whether or not the entity has been soft-deleted - default as false |
accounts-patch-payload
Mapping for Update Financial Account in Global Data System
Maps CIM Financial Account to payload which is used as input parameter in the update query of FINANCIAL_ACCOUNT table.
The fields in both CIM and Global Data DB are identical.
PATCH payload is created by validating the Input Request payload with DB Record Payload.
Source:
./src/main/resources/dwl/accounts-patch-payload.dwl
Variables
var payloadRecordfromDB
payloadRecordfromDB is the existing Financial Account record in Global Data DB
accounts-post-payload
Mapping for Create Financial Account in Global Data System.
Maps CIM Financial Account JSON to JSON which is used by stored procedure sp_FinancialAccount_Upsert.
The fields in both CIM and Global Data DB are identical.
Source:
./src/main/resources/dwl/accounts-post-payload.dwl
Mapping Tables
Maps CIM Financial Account JSON which is used by stored procedure - sp_ContactPointAddress_Create or sp_ContactPointAddress_Update
| Field used in stored procedure | CIM Financial Account | Description | |
|---|---|---|---|
| id | id | flag to allow customer to return a Product | |
| name | name | descriptive name of the account | |
| accountNumber | accountNumber | account number | |
| accountType | accountType | discriminator property set to the specific type of account by name (e.g. | CheckingAccount) |
| accountStatus | accountStatus | flag to preorder the Product | |
| accountBalance | accountBalance | current credit (positive) or debit (negative) balance of the account | |
| availableBalance | availableBalance | amount of funds (or credit) available for withdrawal | |
| accountCurrency | accountCurrency | customer-provided nickname for the account | |
| accountLabel | accountLabel | label for the Account | |
| interestRate | interestRate | interest rate for the amount | |
| taxIdentificationNumber | taxIdentificationNumber | Tax Identification Number assoicated with the account | |
| notes | notes | free-form notes recorded for this account | |
| creditLimit | creditLimit | credit limit for the Card | |
| loanType | loanType | loan type associated with the account | |
| originalLoanAmount | originalLoanAmount | loan amount of the account | |
| loanDurationMonths | loanDurationMonths | loan duration for repayment | |
| minimumPayment | minimumPayment | minimum payment to be made to the account | |
| principalBalance | principalBalance | principal balance associated with the loan account | |
| depositAccountType | depositAccountType | deposit account | |
| routingNumber | routingNumber | Branch or routing number for the account | |
| overdraftLimit | overdraftLimit | Indicates the maximum deficit in an account; a value of 0.0 means no overdraft is allowed | |
| dailyWithdrawalLimit | dailyWithdrawalLimit | Maximum amount that can be withdrawn directly from this account per day | |
| lastTransactionDate | lastTransactionDate | Date a transaction was last recorded for this account | |
| lastTransactionType | lastTransactionType | References the type of transaction last recorded for this account | |
| lastTransactionAmount | lastTransactionAmount | Amount of the last transaction recorded for this account | |
| lastPaymentDate | lastPaymentDate | Date the last deposit was made on | |
| lastPaymentAmount | lastPaymentAmount | Amount of the last payment made | |
| primaryAccountOwner | primaryAccountOwner | References the primary owner of this account by their global identifier | |
| secondaryAccountOwners | secondaryAccountOwners | References additional owner(s) of this account by their global identifiers | |
| maximumMonthlyWithdrawals | maximumMonthlyWithdrawals | Maximum amount that can be withdrawn directly from this account per month | |
| minimumBalance | minimumBalance | The minimum amount that must be held in a Money Market account | |
| monthlyWithdrawalLimit | monthlyWithdrawalLimit | The maximum number of withdrawals allowed per month | |
| externalIds.id | externalIds.id | The id of the entry in Global Data System | |
| externalIds.externalId | externalIds.externalId | A unique identifier assigned to the Global Data object in another system | |
| externalIds.createdBy | externalIds.createdBy | Identifies the system or user which created the entry - picked from properties | |
| externalIds.updatedBy | externalIds.updatedBy | Identifies the system or user which last updated the entry | |
| externalIds.externalIdType | externalIds.externalIdType | Identifies the system that owns or otherwise recognizes this unique identifier | |
| externalIds.status | externalIds.status | Indicates whether this identifier is currently valid or not | |
| externalIds.statusLastChangedDate | externalIds.statusLastChangedDate | Date and time of the last change in status | |
| createdBy | auditInfo.createdBy | Identifies the system or user which created the entity | |
| createdDate | auditInfo.createdDate | Timestamp of when the entity was created - default as current timestamp | |
| updatedBy | auditInfo.updatedBy | Identifies the system or user which last updated the entity | |
| updatedDate | auditInfo.updatedDate | Timestamp of when the entity was last updated |
cards-get-response
Mapping for Query Financial Cards from Global Data System
Source:
./src/main/resources/dwl/cards-get-response.dwl
Mapping Tables
Maps Global Data DB fields to CIM Financial Card
| CIM Financial Card | Global Data DB Field | Description | |||
|---|---|---|---|---|---|
| id | ID | credit card id | |||
| name | NAME | name of credit card | |||
| cardType | CARD_TYPE | type of card - credit | debit | ||
| cardHolderName | CARD_HOLDER_NAME | name of the person holding the credit card | |||
| cardNumber | CARD_NUMBER | 16 digit number displayed on the credit card. | |||
| cardPin | CARD_PIN | pin of the debit card | |||
| cardStatus | CARD_STATUS | status as active | inactive | locked | |
| cardStatusChangedDate | CARD_STATUS_CHANGED_DATE | Date and time of the last change in card status | |||
| expiryMonth | EXPIRY_MONTH | expiry month of the credit card | |||
| expiryYear | EXPIRY_YEAR | expiry year of the credit card | |||
| replacedCardId | REPLACED_CARD_ID | Identifier of the card this one replaces | |||
| replacedCardReason | REPLACED_CARD_REASON | Indicates why this card was issued in place of a previous one | |||
| maskedNumber | MASKED_NUMBER | masked number on the credit card | |||
| cardToken | CARD_TOKEN | token issued for the credit card | |||
| numberLastDigits | NUMBER_LAST_DIGITS | last 4 digits on the card | |||
| securityCode | SECURITY_CODE | security code on the credit card | |||
| creditCardType | CREDIT_CARD_TYPE | credit card type AMEX | DISCOVER | MASTERCARD | VISA |
| accountId | FINANCIAL_ACCOUNT_ID | account Id associated with credit card | |||
| cardOwnerId | CARD_OWNER_ID | Identifier of the individual this card is owned by | |||
| cardOwnershipType | CARD_OWNERSHIP_TYPE | authorized | other | primary | |
| cardControls | CARD_CONTROLS | List of controls applied to this card (e.g. | ATM only) | ||
| dailyPurchaseLimit | DAILY_PURCHASE_LIMIT | Maximum amount that can be purchased with this card per day; a value of 0.0 indicates there is no limit | |||
| auditInfo.createdDate | CREATED_DATE | Timestamp of when the entity was created - default as current timestamp | |||
| auditInfo.createdBy | CREATED_BY | Identifies the system or user which created the entity | |||
| auditInfo.updatedBy | UPDATED_BY | Identifies the system or user which last updated the entity | |||
| auditInfo.updatedDate | UPDATED_DATE | Timestamp of when the entity was last updated | |||
| auditInfo.isDeleted | IS_DELETED | Indicates whether or not the entity has been soft-deleted - default as false |
cards-patch-payload
Mapping for Update Financial Card in Global Data System
Maps CIM Financial Card to payload which is used by stored procedure sp_FinancialCard_Upsert.
The fields in both CIM and Global Data are identical.
PATCH payload is created by validating the Input Request payload with DB Record Payload.
Source:
./src/main/resources/dwl/cards-patch-payload.dwl
Variables
var payloadRecordfromDB
payloadRecordfromDB is the existing Financial Card record in Global Data System
cards-post-payload
Mapping for Create Cards in Global Data System.
Maps Global Data Cards JSON to JSON which is used by stored procedure sp_FinancialCard_Upsert.
Source:
./src/main/resources/dwl/cards-post-payload.dwl
Mapping Tables
Maps CIM Financial Cards to JSON which is used by stored procedure - sp_FinancialCard_Upsert
| Field used in stored procedure | CIM Financial Cards | Description | |||
|---|---|---|---|---|---|
| id | id | credit card id | |||
| name | name | name of credit card | |||
| cardType | cardType | type of card - credit | debit | ||
| cardHolderName | cardHolderName | name of the person holding the credit card | |||
| cardNumber | cardNumber | 16 digit number displayed on the credit card. | |||
| cardPin | cardPin | pin of the debit card | |||
| cardStatus | cardStatus | status as active | inactive | locked | |
| cardStatusChangedDate | cardStatusChangedDate | Date and time of the last change in card status | |||
| expiryMonth | expiryMonth | expiry month of the credit card | |||
| expiryYear | expiryYear | expiry year of the credit card | |||
| replacedCardId | replacedCardId | Identifier of the card this one replaces | |||
| replacedCardReason | replacedCardReason | Indicates why this card was issued in place of a previous one | |||
| maskedNumber | maskedNumber | masked number on the credit card | |||
| cardToken | cardToken | token issued for the credit card | |||
| numberLastDigits | numberLastDigits | last 4 digits on the card | |||
| securityCode | securityCode | security code on the credit card | |||
| creditCardType | creditCardType | credit card type AMEX | DISCOVER | MASTERCARD | VISA |
| accountId | accountId | account Id associated with credit card | |||
| cardOwnerId | cardOwnerId | Identifier of the individual this card is owned by | |||
| cardOwnershipType | cardOwnershipType | authorized | other | primary | |
| cardControls | cardControls | List of controls applied to this card (e.g. | ATM only) | ||
| dailyPurchaseLimit | dailyPurchaseLimit | Maximum amount that can be purchased with this card per day; a value of 0.0 indicates there is no limit | |||
| externalIds.id | externalIds.id | The id of the entry in Global Data System | |||
| externalIds.externalId | externalIds.externalId | A unique identifier assigned to the Global Data object in another system | |||
| externalIds.createdBy | externalIds.createdBy | Identifies the system or user which created the entry - picked from properties | |||
| externalIds.updatedBy | externalIds.updatedBy | Identifies the system or user which last updated the entry | |||
| externalIds.externalIdType | externalIds.externalIdType | Identifies the system that owns or otherwise recognizes this unique identifier | |||
| externalIds.status | externalIds.status | Indicates whether this identifier is currently valid or not | |||
| externalIds.statusLastChangedDate | externalIds.statusLastChangedDate | Date and time of the last change in status | |||
| createdBy | auditInfo.createdBy | Identifies the system or user which created the entity | |||
| createdDate | auditInfo.createdDate | Timestamp of when the entity was created - default as current timestamp | |||
| updatedBy | auditInfo.updatedBy | Identifies the system or user which last updated the entity | |||
| updatedDate | auditInfo.updatedDate | Timestamp of when the entity was last updated |
get-externalids-response
Mapping for Query ExternalIds from Global Data System
Source:
./src/main/resources/dwl/get-externalids-response.dwl
Variables
var outputPayload
outputPayload variable is the maps the result of select query on Global Data EXTERNAL_ID table.
transactions-get-response
Mapping for Get Transactions from Global Data System.
Source:
./src/main/resources/dwl/transactions-get-response.dwl
transactions-patch-payload
Mapping for Update Transactions in Global Data System
Maps CIM Financial Transaction to payload which is used by stored procedure sp_FinancialTransaction_Upsert.
The fields in both DB and CIM FinancialTransaction are identical.
PATCH payload is created by validating the Input Request payload with DB Record Payload.
Source:
./src/main/resources/dwl/transactions-patch-payload.dwl
Variables
var payloadRecordfromDB
payloadRecordfromDB is the existing Financial Transaction record in Global Data System
transactions-post-payload
Mapping for Create Transactions in Global Data System.
Maps Global Data Account JSON to JSON which is used by stored procedure sp_FinancialTransaction_Upsert.
Source:
./src/main/resources/dwl/transactions-post-payload.dwl