Finacle Scripting Syntax -
# interest_post.fin include "common_functions.fin" var acctList = ["SAV001", "SAV002", "SAV003"] var rate = 4.5
for each acct in acctList try var balance = getAccountBalance(acct) if (balance > 0) var interest = calculateInterest(balance, rate, 30) postTransaction("CREDIT", acct, interest) logMessage("INFO", "Interest credited to " + acct) finacle scripting syntax
for each acct in accounts print "Processing: " + acct # interest_post
| Command | Purpose | Example | |---------|---------|---------| | getCustomerDetails(custId) | Fetch customer info | var cust = getCustomerDetails("C12345") | | getAccountBalance(acctId) | Get balance | var bal = getAccountBalance("SAV001") | | postTransaction(...) | Post a transaction | postTransaction("DEBIT", "SAV001", 1000) | | callService(serviceName, params) | Invoke Finacle service | callService("InterestCalculation", "acctId":"SAV001") | | logMessage(level, text) | Log (INFO/WARN/ERROR) | logMessage("ERROR", "Balance insufficient") | | sleep(ms) | Pause execution | sleep(2000) | 6. Functions function calculateInterest(principal, rate, days) var interest = (principal * rate * days) / 36500 return interest Overview Finacle scripting is used for customization, batch
Here’s a helpful review of — covering its core structure, common commands, variables, loops, conditions, and best practices. 1. Overview Finacle scripting is used for customization, batch processing, and business logic implementation within Infosys Finacle (core banking). Scripts are typically written in a proprietary scripting language resembling a mix of shell scripting and basic programming constructs . 2. Basic Syntax Rules | Element | Syntax / Example | |---------|------------------| | Comment | # This is a comment | | Statement terminator | Newline (no semicolon required) | | String literal | "Hello" or 'Hello' | | Variable assignment | var name = "Finacle" | | Print to log/output | print "Message" | | Include another script | include "common_script.fin" | 3. Variables & Data Types # String var customerName = "John Doe" Number (decimal/integer) var balance = 5000.75 Boolean var isActive = true Array (list) var accounts = ["SAV001", "CUR002", "FD003"] 💡 Variables are dynamically typed . No explicit declaration needed — var is optional in some versions, but recommended. 4. Control Structures Conditional (if-else) if (balance < 1000) print "Low balance alert" else if (balance >= 1000 && balance < 10000) print "Normal balance" else print "High balance"