principianteInicio fácil
Lookup Table
This flow illustrates the use of a lookup table. It serves as a ready-made currency conversion engine, drawing on a central repository of exchange rates to perform financial calculations.
David Škarka
Template author
The primary objective of this rule flow is to convert a specific monetary amount from a source currency to a target currency using the most current exchange rates stored within the system. It ensures data integrity by validating that both the source and target currencies are supported by the system before attempting any calculations.
Solution Components
The flow orchestrates data between the user input and a specialized lookup table to produce an accurate conversion.
- CurrencyRates (Lookup Table)
- Purpose: Acts as the central database for all supported currencies and their cross-exchange rates.
- Supported Currencies: USD, CZK, CHF, EUR, MXN, and INR.
- Function: Provides the specific exchange rate multiplier based on the source currency and the target currency column.
- Business Logic Nodes utilize several key stages to process the request:
- Validation (checkCurrencyFrom & checkCurrencyTo): Two parallel checks verify if the requested currencies exist in the CurrencyRates table.
- Conditional Switch (currenciesValidity): An IF-statement that directs the flow based on validation results.
- Data Retrieval (fetchExchangeRate): Uses the LOOKUP_VALUE function to extract the specific rate for the currency pair.
- Calculation (convertAmount): Multiplies the input amount by the fetched exchange rate.
More Templates
See Other Templates
servicios financierossugerido
Pruebas A/B
Descubra una forma sencilla de asignar un grupo de prueba para realizar pruebas A/B en sus decisiones.
servicios financierossugerido
Precios basados en el riesgo
Descubra una forma sencilla de aplicar una matriz de precios basada en riesgo adecuada en función del tipo de cliente.
servicios financierossugerido
Normas de elegibilidad y política
Descubra una forma sencilla de definir y ejecutar varios conjuntos de reglas y obtener el resultado de la decisión final.