Configuring curencies and exchange rates for the individual planner
In the beqom application, the (Undefined variable: CompoVariables_WA.CompPlan) and the individual planner have the possibility to use different currencies than the default system currency, with defined forward exchange rates for amount conversion.
The use of currency conversion in the beqom application is centered a two concepts:
Currencies: individual currencies used in the system to display amounts
Forward exchange rate groups: group of currencies with specific exchange rates between all the currencies in the group. When an exchange rate group is assigned to a comp round, the exchange rates specified for the group are used to convert amounts when end-users switch currencies in the individual planner.
At the moment, there is not user interface in the beqom Web Application in order to define currencies and exchange rate groups; these items need to be configured in the system using APIs.
All the information related to currencies and forward exchange rate groups are stored in the Catalog DB, using various dedicated tables. The APIs described in this document will write data in these tables to be used then by the beqom application.
Currency Management
Currency Management
The system distinguishes between available currencies and enabled currencies. Available currencies are currencies that exist in the DB; enabled currencies are currencies that are ready to be used in the system. Different methods are used to retrieve and manage those currencies.
Managing Available Currencies
Managing Available Currencies
The following table lists the API methods that can be used to create and manage currencies in the Catalog DB.
| Service | Method |
URL | Name | Description | Method Body |
|---|---|---|---|---|---|
| Data | GET | /api/available-currency | GetListOfAvailableCurrenciesAsync | This method returns the complete list of currencies defined in the bqm_default_currency and bqm_custom_currency tables of the Catalog DB. |
Copy |
| GET | /api/available-currency/{currencyId} | GetAvailableCurrencyAsync | This method returns the data related to the specified currency, filtered by the currency UID. This method returns the complete list of currencies defined in the bqm_default_currency and bqm_custom_currency tables of the Catalog DB. |
Copy |
|
| POST | /api/available-currency | CreateAvailableCurrencyAsync |
This methods creates a currency entry in the bqm_custom_currency table of the Catalog DB. The name and the code of the currency must be unique. The following validations are applied:
Error messages are thrown of the entry violates any of the conditions. |
Copy
Returns the ID of the new record |
|
| DELETE | /api/available-currency/{currencyId} | DeleteAvailableCurrencyAsync |
This method deletes the specified currency from the bqm_custom_currency table of the Catalog DB. An error is thrown if the currency corresponds to a default currency. |
||
| PUT | /api/available-currency/{currencyId} | UpdateAvailableCurrencyAsync |
This method updates the specified currency in the bqm_custom_currency table of the Catalog DB. The name and the code of the currency must be unique. The following validations are applied:
Error messages are thrown of the entry violates any of the conditions. |
Copy |
Managing Enabled Currencies
Managing Enabled Currencies
| Service | Method |
URL | Name | Description | Method Body |
|---|---|---|---|---|---|
| Data | GET | /api/enabled-currency | GetListOfCurrenciesAsync | This method returns the complete list of currencies defined in the bqm_fx_currency table of the Catalog DB. The response of the request indicates whether or not the currencies are in use in the system. |
Copy |
| GET | /api/enabled-currency/{currencyId} | GetCurrencyAsync | This method returns the data related to the specified currency, filtered by the currency UID (the currency UID is stored in the uid_fx_currency columns. |
Copy |
|
| PUT | /api/enabled-Currency/ | EnableCurrenciesAsync |
This method returns of enabled currencies from the body. If they already exists, no operation is required. If they don't exist, create them. For the currencies that are not in the list of enabled currencies, delete them. To enable a currency, create a new entry in the tenant Catalog DB bqm_fx_currency using the information stored in the bqm_default_currency and bqm_custom_currency tables of the Catalog DB. |
Copy |
Exchange Rate Management
Exchange Rate Management
The following table lists the API methods that can be used to create and manage exchange rates in the Catalog DB.
| Service | Method | URL | Name | Description |
|---|---|---|---|---|
| Data | GET | /api/rate-type | GetListOfRateTypesAsync | This method returns the list of all exchange rate groups registered in the Catalog DB. |
| GET | /api/rate-type/{rateTypeId} | GetRateTypeAsync | This method returns the specified exchange rate group identified by ID. | |
| POST | /api/rate-type | CreateRateTypeAsync | This method creates a new exchange rate group in the Catalog DB. The name of the exchange rate group must be unique. | |
| DELETE | /api/rate-type/{rateTypeId} | DeleteRateTypeAsync | This method deletes the specified exchange rate group. | |
| PUT | /api/rate-type/{rateTypeId} | UpdateRateTypeAsync | This method updates the data of the specified exchange rate group. | |
| GET | /api/rate-type/{rateTypeId}/currency | GetRateTypeCurrencies | This method returns all the currencies attached to the specified exchange rate group. | |
| POST | /api/rate-type/{rateTypeId}/currency | AttachCurrencyToRateType | This method adds a currency to the specified exchange rate group. | |
| DELETE | /api/rate-type/{rateTypeId}/currency/{currencyId} | DetachCurrencyFromGroup | This method removes the specified currency from the specified exchange rate group. | |
| GET | /api/rate-type/{rateTypeId}/rate-value | GetRateTypeValues | This method returns all the rate values for the currencies attached to the specified exchange rate group. | |
| POST | /api/rate-type/{rateTypeId}/rate-value | CreateRateValue | This method creates a rate value for the specified exchange rate group. The rate is specified for two currencies attached to the exchange rate group It is also possible to specify a validity period for the exchange rate. | |
| GET | /api/rate-type/{rateTypeId}/rate-value/{rateValueId} | GetRateValue | This method retrieves the specified exchange rate value from the specified exchange rate group. | |
| DELETE | /api/rate-type/{rateTypeId}/rate-value/{rateValueId} | DeleteRateValue | This method removes the specified exchange rate value from the specified exchange rate group. |