Page tree

_convertCurrency

The convertCurrency formula converts an amount from one currency to another, based on the exchange rates published by the European Central Bank. An optional date parameter allows conversion using historic exchange rates.

Syntax

convertCurrency("From_Currency","To_Currency",amount,[date])

Examples

convertCurrency("USD", "EUR", $total_payment, $payment_date)Convert the Total Payment from USD to EUR using the historic exchange rate on the Payment Date.
convertCurrency("JPY", "USD", $contract_amount)Convert the Contract Amount from Japanese Yen to US Dollars using the current exchange rate.

Information

Two currency conversion formulas are provided using an open-source API to convert an amount between currencies or return the exchange rate. Currency conversion formulas use the open-source JSON API fixer.io to obtain exchange rates published by the European Central Bank. These rates are updated daily at approximately 4pm Central European Time (CET). If the date parameter is not specified, the current exchange rate is used.

The CLM Template uses a free API key from fixer.io to make requests to their API. You must replace the current access key with a new, free one you can easily download from the fixer.io website. If you intend to use the currency conversion for production environments, then we recommend purchasing a paid version from fixer.io instead of using the free version.

After obtaining a new API key from fixer.io, log in to the KB and update the Fixer.io Service Access Key global variable through Setup > System > Manage Global variables to make use of the new key.

CONTENTS
  • No labels