FINS Thought Machine Accounts System API - Implementation Template

(0 reviews)

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.

ModuleDescription
CommonToolsThis module provides utility functions and mappings for Financial Accounts and Transaction transformations
create-account-tm-requestCreate Account in Thought Machine request mapping
get-account-audit-info-responseAccount Action Log response mapping
get-account-by-id-responseRetrieve Account from Thought Machine response mapping
lookup-accounts-responseRetrieve Account from Thought Machine response mapping
update-account-details-request
create-credit-transaction-requestCreate Credit Transaction using Posting Instruction Batch Async operation in Thought Machine request mapping
create-transfer-transaction-requestCreate Transfer Transaction using Posting Instruction Batch Async operation in Thought Machine request mapping
create-debit-transaction-requestCreate Debit Transaction using Posting Instruction Batch Async operation in Thought Machine request mapping
get-transaction-list-responseGet Transaction from Thought Machine using the List Posting Instruction Batch operation. Maps the response to CIM using the mapToCIMFinancialTransaction function.
ping-check-dependency-sys-api-response

CommonTools

This module provides utility functions and mappings for Financial Accounts and Transaction transformations

Source: ./src/main/resources/dwl/CommonTools.dwl

Variables

var tmProductIdMap

This Product Id map is used by the conversion functions below.

var CIMProductIdMap

This map is used by the conversion function below.

var tmAccountStatusMap

This Account Status map is used by the conversion functions below.

var CIMAccountStatusMap

This map is used by the conversion function below.

Functions

fun getFormattedDateTime (toFormat)

Formats the date-time to the type accepted by CIM

fun getGlobalId (externalIdsArr)

This function filters ExternalIds with ExternalId Type as MDM and returns the first one

return Global ExternalID

fun tmRecordTypeToCIM (accountType)

Maps TM Product Id to CIM Account Type

return CIM Account Type

fun CIMRecordTypeToTM (accountType)

Map CIM Account Type to TM Product Id

return TM Product Id

fun tmAccountStatusToCIM (accountStatus)

Maps TM Account Status to CIM Account Status

return CIM Account Status

fun CIMAccountStatusToTM (accountStatus)

Map CIM Account Status to TM Account Status

return TM Product Id

fun formatAsDate (dateOrDateTime, defaultDate)

Formats given input date or date-time to a datetime in "yyyy-MM-dd'T'HH:mm:ss.SS'Z'" format

param dateOrDateTime input in either date or date-time format
param defaultDateTime default timestamp to use in case input is null.
return datetime in "yyyy-MM-dd'T'HH:mm:ss.SS'Z'" format

fun getTransactionInstructionDetails (payload)

Maps CIM Transaction fields to Instruction Details in Thought Machine. Instruction Details is a Key Value pair that can be sent to Thought Machine while posting a transaction. Few of the fields from CIM payload are mapped as Key Value pair so that can be tied to the transaction posted for future retrieval.

param Input Transaction request in CIM format
return Instruction Details Object of Thought Machine

fun getInternalAccountIdOfPosting (instructionType)

Identifies Internal Bank Account from Thought Machine Posting Instruction .

param instructionType Posting Instruction as part of Posting Batch of Thought Machine
return internalAccountId Internal Bank Account associated with the Credit AccountId of transaction Object.

fun getCreditAccountId (instructionType, internalAccountId, accountId)

Identifies CreditAccountId from Thought Machine Posting Instruction .

param instructionType Posting Instruction as part of Posting Batch of Thought Machine
param accountId - Account Id involved in the posting
param internalAccountId Internal Account Id of the Bank involved in the posting
return CreditAccountId Credit AccountId of transaction Object.

fun getDebitAccountId (instructionType, internalAccountId, accountId)

Identifies DebitAccountId from Thought Machine Posting Instruction .

param instructionType Posting Instruction as part of Posting Batch of Thought Machine
param accountId - Account Id involved in the posting
param internalAccountId Internal Account Id of the Bank involved in the posting
return DebitAccountId Debit AccountId of transaction Object.

fun getTransactionType (internalAccountId, creditAccountId, debitAccountId)

Identifies Transaction Type associated with Thought Machine Posting Instruction .

param internalAccountId Internal Account Id of the Bank involved in the posting
param creditAccountId Credit AccountId involved in the posting
param debitAccountId - Debit AccountId involved in the posting
return TransactionType CIM Transaction type determined from the Posting Instruction.

fun getDetailsByPostingInstructionType (instructionType, accountId, internalAccountId)

Maps Thought Machine Posting Instruction to CIM Fields. Posting Instruction are used to determine the Amount, Transaction Type and Account IDs associated with the transaction based on posting type.

param instructionType Posting Instruction as part of Posting Batch of Thought Machine
param accountId - Account Id involved in the posting
param internalAccountId Internal Account Id of the Bank involved in the posting
return transaction CIM fields of transaction Object.

fun getAuditInfo (createdDate, createdBy, updatedDate, updatedBy)

Maps Thought Machine Posting Instruction to CIM auditInfo Fields. Posting Instruction are used to determine the Amount, Transaction Type and Account IDs associated with the transaction.

param createdBy Identifies the system or user which created the entity
param createdDate Timestamp of when the entity was created - default as current timestamp
param updatedBy Identifies the system or user which last updated the entity
param updatedDate Timestamp of when the entity was last updated
return auditInfo CIM AuditInfo Object related to Transaction.

fun getExternalIdsForMDM (externalId)

Maps the result of Thought Machine Posting Batch Instruction Details to CIM External IDs object if it contains the MDM Id (globalTransactionId) of the transaction.

param externalId - Global Transaction Id of the transaction
return externalIds - External Ids object that include Global Transaction Id for MDM

fun mapToCIMFinancialTransaction (postingBatch, accountId, userId)

Maps Thought Machine Posting Batch Response to CIM Financial Transaction JSON

param postingBatch - Posting Instruction Batch object response
param accountId - Account Id involved in the posting
param userId - System involved in the transaction
param transaction - CIM Object of the transaction

(back to top)

create-account-tm-request

Create Account in Thought Machine request mapping

Source: ./src/main/resources/dwl/create-account-tm-request.dwl

Mapping Tables

The accounts endpoint of the Core API is used to Create an Account in Thought Machine Maps CIM Account to TM Account

TM AccountCIMDescription
request_idThe Unique identifier of the request in Thought Machine. This is set as an auto generate ID
account.product_iddepositAccountTypeThe product Id for the CIM Deposit Account Type in TM.
account.permitted_denominations.request_initiator_idaccountCurrencyThe denomination for the Account
account.stakeholder_idsprimaryAccountOwnerThe Identifier of the Customer to which this Account belongs to.
account.instance_param_vals.interest_application_day1The day of the month on which interest is applied.
account.instance_param_vals.daily_atm_withdrawal_limitdailyWithdrawalLimitMaximum amount that can be from this account using ATM per day
account.instance_param_vals.standard_overdraft_limitoverdraftLimitThe Identifier of the Customer to which this Account belongs to.
account.instance_param_vals.fee_free_overdraft_limitoverdraftLimitThe Identifier of the Customer to which this Account belongs to.
account.opening_timestampopenedDateDate the account was opened.
account.details.namenameDescriptive name of the account.
account.details.accountNumberaccountNumberThe Account Number assigned to the Account.
account.details.accountLabelaccountLabelA customer-provided nickname for the Account.
account.details.notesnotesFree-form notes recorded for this account.
account.details.globalIdglobalAccountIDThe Global Identifier of the Account.

(back to top)

get-account-audit-info-response

Account Action Log response mapping

Source: ./src/main/resources/dwl/get-account-audit-info-response.dwl

Mapping Tables

The action-logs endpoint of the Audit API is used to retrieve the Audit information of an Account in Thought Machine

action-logs ResponseCIMDescription
action_logs.request_initiator_idcreatedByThe ID of the User who created the Account.
action_logs.create_timestampcreatedDateTimestamp of when the Account was last created.
action_logs.request_initiator_idupdatedByThe ID of the User who last update the Account.
action_logs.create_timestampupdatedDateTimestamp of when the Account was last updated.

(back to top)

get-account-by-id-response

Retrieve Account from Thought Machine response mapping

Source: ./src/main/resources/dwl/get-account-by-id-response.dwl

Mapping Tables

The accounts endpoint of the Core API is used to retrieve an Account from Thought Machine Maps TM Account to CIM Account

CIM AccountTM AccountDescription
ididThe Unique identifier of the Account in Thought Machine.
namedetails.nameDescriptive name of the account
accountNumberdetails.accountNumberThe Account Number assigned to the Account
accountLabeldetails.accountLabelA customer-provided nickname for the Account
depositAccountTypeproduct_idThe Deposit Account Type of the This is derived using the Thought Machine Product ID
accountCurrencypermitted_denominationsThe denomination for the Account
primaryAccountOwnerstakeholder_idsThe Identifier of the Customer to which this Account belongs to.
openedDateopening_timestampDate the account was opened.
accountStatusopening_timestampThe Status of the Account
externalIds[].externalIdGlobalIdGlobal ID of the Account
auditInfo.createdDatenow()Timestamp of when the customer was created - Set as Current Time.
auditInfo.createdBycreatedByUserLoginIdentifies the system or user which created the customer.
auditInfo.updatedDatenow()Timestamp of when the customer was last updated.
auditInfo.updatedBypayload.body.CustInqResponse.MsgRsHdr.jXchangeHdr.AuditUsrIdIdentifies the system or user which last updated the customer.
auditInfo.isDeletedfalseIndicates whether or not the customer has been soft-deleted - Set as false.

(back to top)

lookup-accounts-response

Retrieve Account from Thought Machine response mapping

Source: ./src/main/resources/dwl/lookup-accounts-response.dwl

Mapping Tables

The accounts endpoint of the Core API is used to retrieve an Account from Thought Machine Maps TM Account to CIM Account

CIM AccountTM AccountDescription
ididThe Unique identifier of the Account in Thought Machine.
namedetails.nameDescriptive name of the account
accountNumberdetails.accountNumberThe Account Number assigned to the Account
accountLabeldetails.accountLabelA customer-provided nickname for the Account
depositAccountTypeproduct_idThe Deposit Account Type of the This is derived using the Thought Machine Product ID
accountCurrencypermitted_denominationsThe denomination for the Account
primaryAccountOwnerstakeholder_idsThe Identifier of the Customer to which this Account belongs to.
openedDateopening_timestampDate the account was opened.
accountStatusopening_timestampThe Status of the Account
externalIds[].externalIdGlobalIdGlobal ID of the Account

(back to top)

update-account-details-request

Source: ./src/main/resources/dwl/update-account-details-request.dwl

(back to top)

create-credit-transaction-request

Create Credit Transaction using Posting Instruction Batch Async operation in Thought Machine request mapping

Source: ./src/main/resources/dwl/create-credit-transaction-request.dwl

Mapping Tables

The transaction end point is used to Create Posting Instruction Batch Async in Thought Machine with a posting instruction of type inbound_hard_settlement. Maps TM Transaction from CIM

TM TransactionCIMDescription
request_iduuidThe Unique identifier of the request in Thought Machine. This is set as an auto generate ID
posting_instruction_batch.client_idconfigThought Machine Client Id
posting_instruction_batch.client_batch_iduuidUnique Id for the Batch
posting_instruction_batch.posting_instructions.client_transaction_iduuidA unique id to recognize the Transaction in Thought Machine
posting_instruction_batch.posting_instructions.inbound_hard_settlement.amountTransactionAmountAmount involved in Transaction
posting_instruction_batch.posting_instructions.inbound_hard_settlement.denominationUSDDenomination as a configuration - default is USD
posting_instruction_batch.posting_instructions.inbound_hard_settlement.target_account.accountIdaccountIdAccount Id involved for Credit of Transaction
posting_instruction_batch.posting_instructions.inbound_hard_settlement.internal_account_idconfigInternal Account of the Bank already configured in Thought Machine to deal with Transactions
posting_instruction_batch.posting_instructions.instruction_detailsconfigInternal Account of the Bank already configured in Thought Machine to deal with Transactions
posting_instruction_batch.posting_instructions.instruction_details.nameDisplay name of this transaction
posting_instruction_batch.posting_instructions.instruction_details.descriptionOptional detailed description of this transaction
posting_instruction_batch.posting_instructions.instruction_details.checkNumbercheckNumberoptional check number associated with this transaction
posting_instruction_batch.posting_instructions.instruction_details.notesnotesOptional Free-form notes recorded for this transaction
posting_instruction_batch.posting_instructions.instruction_details.transactionSubTypetransactionSubTypeTransaction sub types such as ATM or CARD or CASH or CHECK
posting_instruction_batch.posting_instructions.instruction_details.accountOwnerIdaccountOwnerIdThe primary owner of the account this transaction was created for
posting_instruction_batch.posting_instructions.instruction_details.transactionNumbertransactionNumberA unique number assigned to this transaction

(back to top)

create-transfer-transaction-request

Create Transfer Transaction using Posting Instruction Batch Async operation in Thought Machine request mapping

Source: ./src/main/resources/dwl/create-transfer-transaction-request.dwl

Mapping Tables

The transaction end point is used to Create Posting Instruction Batch Async in Thought Machine with a posting instruction of type transfer.

TM TransactionCIMDescription
request_iduuidThe Unique identifier of the request in Thought Machine. This is set as an auto generate ID
posting_instruction_batch.client_idconfigThought Machine Client Id
posting_instruction_batch.client_batch_iduuidUnique Id for the Batch
posting_instruction_batch.posting_instructions.client_transaction_iduuidA unique id to recognize the Transaction in Thought Machine
posting_instruction_batch.posting_instructions.transfer.amountTransactionAmountAmount involved in Transaction
posting_instruction_batch.posting_instructions.transfer.denominationUSDDenomination as a configuration - default is USD
posting_instruction_batch.posting_instructions.transfer.target_account.creditor_target_account.accountIdcreditAccountIdCreditor Account Id involved for Transfer Transaction
posting_instruction_batch.posting_instructions.transfer.target_account.debtor_target_account.accountIddebitAccountIdDebitor Account Id involved for Transfer Transaction
posting_instruction_batch.posting_instructions.instruction_detailsconfigInternal Account of the Bank already configured in Thought Machine to deal with Transactions
posting_instruction_batch.posting_instructions.instruction_details.nameDisplay name of this transaction
posting_instruction_batch.posting_instructions.instruction_details.descriptionOptional detailed description of this transaction
posting_instruction_batch.posting_instructions.instruction_details.checkNumbercheckNumberoptional check number associated with this transaction
posting_instruction_batch.posting_instructions.instruction_details.notesnotesOptional Free-form notes recorded for this transaction
posting_instruction_batch.posting_instructions.instruction_details.transactionSubTypetransactionSubTypeTransaction sub types such as ATM or CARD or CASH or CHECK
posting_instruction_batch.posting_instructions.instruction_details.accountOwnerIdaccountOwnerIdThe primary owner of the account this transaction was created for
posting_instruction_batch.posting_instructions.instruction_details.transactionNumbertransactionNumberA unique number assigned to this transaction

(back to top)

create-debit-transaction-request

Create Debit Transaction using Posting Instruction Batch Async operation in Thought Machine request mapping

Source: ./src/main/resources/dwl/create-debit-transaction-request.dwl

Mapping Tables

The transaction end point is used to Create Posting Instruction Batch Async in Thought Machine with a posting instruction of type outbound_hard_settlement.

TM TransactionCIMDescription
request_iduuidThe Unique identifier of the request in Thought Machine. This is set as an auto generate ID
posting_instruction_batch.client_idconfigThought Machine Client Id
posting_instruction_batch.client_batch_iduuidUnique Id for the Batch
posting_instruction_batch.posting_instructions.client_transaction_iduuidA unique id to recognize the Transaction in Thought Machine
posting_instruction_batch.posting_instructions.outbound_hard_settlement.amountTransactionAmountAmount involved in Transaction
posting_instruction_batch.posting_instructions.outbound_hard_settlement.denominationUSDDenomination as a configuration - default is USD
posting_instruction_batch.posting_instructions.outbound_hard_settlement.target_account.accountIdaccountIdAccount Id involved for Debit of Transaction
posting_instruction_batch.posting_instructions.outbound_hard_settlement.internal_account_idconfigInternal Account of the Bank already configured in Thought Machine to deal with Transactions
posting_instruction_batch.posting_instructions.instruction_detailsconfigInternal Account of the Bank already configured in Thought Machine to deal with Transactions
posting_instruction_batch.posting_instructions.instruction_details.nameDisplay name of this transaction
posting_instruction_batch.posting_instructions.instruction_details.descriptionOptional detailed description of this transaction
posting_instruction_batch.posting_instructions.instruction_details.checkNumbercheckNumberoptional check number associated with this transaction
posting_instruction_batch.posting_instructions.instruction_details.notesnotesOptional Free-form notes recorded for this transaction
posting_instruction_batch.posting_instructions.instruction_details.transactionSubTypetransactionSubTypeTransaction sub types such as ATM or CARD or CASH or CHECK
posting_instruction_batch.posting_instructions.instruction_details.accountOwnerIdaccountOwnerIdThe primary owner of the account this transaction was created for
posting_instruction_batch.posting_instructions.instruction_details.transactionNumbertransactionNumberA unique number assigned to this transaction

(back to top)

get-transaction-list-response

Get Transaction from Thought Machine using the List Posting Instruction Batch operation.
Maps the response to CIM using the mapToCIMFinancialTransaction function.

Source: ./src/main/resources/dwl/get-transaction-list-response.dwl

Mapping Tables

Maps Thought Machine Posting Batch Response to CIM Financial Transaction JSON

CIM FieldThought Machine Posting BatchDescription
idclient_transaction_idtransaction id
nameinstruction_details.namename related to the transaction
descriptioninstruction_details.descriptionDescription about the transaction
checkNumberinstruction_details.checkNumberOptional check number associated with this transaction
transactionAmountposting_instructions.(posting-type).amountAmount associated with the Transaction
transactionDateinsertion_timestampDate and time this transaction was recorded in the system
transactionTypeposting_instructions.(posting-type)Discriminator property set to the specific type of transaction by name (e.g.CreditTransaction) based on posting type
transactionSubTypeinstruction_details.transactionSubTypeTransaction sub type as ATM or CARD or CASH or CHECK
transactionStatusstatustransaction status such as CLEARED or HOLD or PENDING or POSTED
postedDatevalue_timestampDate the transaction was actually reflected in the account (aka settlement date)
isDisputedaccount_violationsFlags whether or not this transaction is being disputed
disputedReasonaccount_violations.typeThe reason this transaction is being disputed
notesinstruction_details.notesFree-form notes recorded for this transaction
creditAccountIdposting_instructions.(postings-type).account_idCredit account id involved in transaction posting
debitAccountIdposting_instructions.(postings-type).account_idDebit account id involved in transaction posting
externalIds.idIDUnique id of the entry
externalIds.externalIdglobalTransactionIdA unique identifier of the Global Data object in MDM
externalIds.externalIdTypeMDMIdentifies the type as MDM
externalIds.statusVALIDIndicates whether this identifier is currently valid or not
externalIds.statusLastChangedDatecurrent timeDate and time of the status
auditInfo.createdByIdentifies the system or user which created the entity
auditInfo.createdDatepostingBatch.insertion_timestampTimestamp of when the entity was created - default as current timestamp
auditInfo.updatedByIdentifies the system or user which last updated the entity
auditInfo.updatedDatepostingBatch.value_timestampTimestamp of when the entity was last updated
auditInfo.isDeletedCoded as System APIIndicates whether or not the entity has been soft-deleted - default as false

(back to top)

ping-check-dependency-sys-api-response

Source: ./src/main/resources/dwl/ping-check-dependency-sys-api-response.dwl

(back to top)


Reviews

TypeTemplate
OrganizationMulesoft
Published by
MuleSoft Organization
Published onDec 13, 2023
Asset overview

Asset versions for 1.0.x

Asset versions
VersionActions
1.0.0