Skip to content

Conversion Rate Downloader

Javapackage: com.smf.currency.conversionrate
Javapackage: com.smf.currency.apiconfig

Overview

The Conversion Rate Downloader module automates the retrieval of currency exchange rates from external providers and inserts them into the system. It helps keep financial operations accurate by ensuring that up-to-date conversion rates are always available, reducing manual work and minimizing errors.

In general, the configuration process involves three main steps:

  1. Set up the external currency API connection
  2. Define the currency pairs to be downloaded
  3. Schedule the automatic download process

Once these steps are completed, the system retrieves conversion rates automatically according to the schedule, and the latest values become available for all financial transactions that require currency conversion.

Info

To be able to include this functionality, the Financial Extensions Bundle must be installed. To do that, follow the instructions from the marketplace: Financial Extensions Bundle. For more information about the available versions, core compatibility and new features, visit Financial Extensions - Release notes.

Initial Setup

Currency Converters

Application > Master Data Management > Currency Converters

This module can be extended to support different currency-conversion APIs. By default, it integrates with APILayer – Currency Data API.

alt text

To configure the connection:

  1. Register at APILayer and create an account.
  2. Subscribe to the Currency Data API. The free plan offers 100 monthly requests, sufficient for multiple daily updates. Copy the access token provided.
  3. In the Currency Converters window, complete the following fields:

    alt text

    • Service Classname: Java class used for the API connection. Default: com.smf.currency.apiconfig.CurrencyLayerConverter
    • Client: Client allowed to use this configuration.
    • Organization: Organization allowed to use this configuration. Use * to allow all organizations.
    • Service Name: Identifier of this configuration, e.g., Currency Data API.
    • Service URL: API endpoint. Default: https://api.apilayer.com/currency_data/
    • Token: API access token.
    • User (optional): Not required for this configuration.
    • Password (optional): Not required for this configuration.
    • Selected: Must be True to activate this configuration for the download process.
    • Active: Must be True to make the configuration available.

Conversion Rate Download Rule

Application > General Setup > Application > Conversion Rate Download Rule

After configuring the API, define the currency pairs to be downloaded.

Info

It is recommended to define rules in both directions. For example, USD → EUR and EUR → USD, to avoid issues in accounting scenarios that require conversions both ways.

alt text

Fields to note:

  • From Currency: Source currency.
  • To Currency: Target currency.
  • Tolerance: Maximum allowed difference between the new rate and the previous one. This prevents inserting extreme values during periods of volatility.

Process Request

Application > General Setup > Process Scheduling > Process Request

To schedule the automatic download:

  1. Create a new record and select Conversion Rate Downloader in the Process field.
  2. Set the desired frequency (e.g., once per day).
  3. Schedule and save the process.

Info

The Process Monitor tab allows reviewing execution status and possible errors.

alt text

Execution

Conversion Rates

Application > General Setup > Application > Conversion Rates

The system will download and insert conversion rates automatically according to the defined schedule.

Info

For more information, visit the Conversion Rates documentation.

alt text


This work is licensed under CC BY-SA 2.5 ES by Futit Services S.L.