Updating the exchange rates in Microsoft Dynamics 365 Customer Engagement (CE) is thankfully a much simpler process than it used to be. The exchange rate update is a manual step, and in the past, a significant development resource was required to achieve this. Thanks to the power of Microsoft Flow, this has become a low/no code task.
Exchange Rates in Dynamics 365
Dynamics 365 CE is a multi-currency system that allows financial transactions like opportunities, quotes, orders and invoices to be recorded in a specific currency. The exchange rates are defined between the transaction currencies and the base currency, providing the organization financial data for reports and analysis in a single currency.
Below I share and highlight steps in a Flow that can now do all this in an automated fashion. On a high level, this Flow does the following:
- Identify the base currency for the given Dynamics 365 instance
- Retrieve the exchange rate between a transactional currency and the base currency
- Update exchange rate in Dynamics 365
Identify the Base Currency
The Organization entity contains valuable information, including the base currency.
The base currency is in the format of system GUID. To identify its ISO currency code, I need to retrieve it from the Currency entity with the given GUID.
Please note there may be other indicators that tell if a currency is the base one. For example; the currency record created-on date, and possibly the owner.
Retrieve the Exchange Rate
For this to work, this Flow requires an exchange rate API. There are many free or paid versions. The API’s request and response can vary in format and structure, and thus dictates the Flow actions. This should provide you the response based on your request.
In this Flow, the API that I used (https://api.exchaneratesapi.io) allows me to pass a base currency and target symbol, and returns the exchange rate between the base and the target.
I began by listing all available currencies in Dynamics 365. For each of these currencies, I made an http request to the API, and parsed the response.
Each response contains an object with the given currency name, I set it as a variable so that I can dynamically retrieve it:
Update Exchange Rate
The final step happens right after the Compose action, which updates the same currency record with the retrieved rate.
This is what it looks like in Dynamics 365 before the update:
Here’s what it looks like after the update:
The exchange rate update can be scheduled using Microsoft Flow to a frequency that meets your business requirements, which could be daily, hourly or even by the minute. That is the power and flexibility Microsoft Flow brings to its users. If you have any questions about Dynamics 365 or Microsoft Flow, please connect with us.
Talk to Our CRM Specialists
Find out how your company can use Dynamics CRM to increase visibility, manage relationships, and drive revenue.Contact Us