Please enter your search criteria to begin searching

Multiple Currencies in Einstein Analytics

In this blog we are going to address the limitation of customers using multiple currencies in Salesforce and how we can manage this in Einstein Analytics.

As you might have read in the Einstein Analytics Limitations article on the Salesforce Help & Training portal, ”Multicurrency is not supported. When Analytics extracts your organization’s default currency, it uses the currency for monetary values and doesn’t convert to another currency.” There are of course many orgs where this would be a serious issue when analysing data.

Fortunately, there are ways to handle this problem when you are preparing your datasets. One goal could be to have measures such as amount or cost available converted into multiple currencies. It is possible to devise a solution using calculated fields when preparing the data. This could be done using a recipe or the dataflow editor. Of course, you do have the option of entering this into your JSON code directly, however, such a localised solution would not scale well when it comes to maintenance of the conversion rates. Thankfully, there is no reason to introduce another place where you would need to store and manage conversion rates, as we are using multiple currencies in our Salesforce org, therefore, we should be able to use the conversion rates inside our Salesforce Sales Cloud/ Service Cloud setup (Salesforce core).

So how do we solve this problem?

It just takes some data preparation. The CurrencyType object holds your conversion rates in orgs where multicurrency feature is enabled. What the Einstein Analytics admin can do is extract conversion rate and currency ISO code data into a dataflow using sfdcDigest transformation. Currency ISO code data needs to be extracted for the analysed data as well. We then augment conversion rates on the analysed data using currency ISO codes as the match keys. The final preparation step at this point is to convert your measures into different currencies with computeExpression dataflow transformation using conversion rates now available. The rest of the data preparation should be ‘smooth sailing’ and as the registered dataset includes converted amounts, one could declare this mission successful.

However, that might not always be the case. Many Salesforce core orgs use advanced currency management where the conversion rate applied is selected based on exchange rate date ranges. In this scenario, the above-mentioned approach in Einstein Analytics would not produce the same results as we see in Salesforce core. This would be confusing and far from the ideal situation when analysing our data. What we can do instead is to extract the conversion rate, ISO code, and start date data from the DatedConversionRate object. Provided that we have daily exchange rate date ranges established, we can achieve our goal in our Einstein Analytics datasets by augmenting DatedConversionRate data onto Opportunity based datasets using composite matching keys. We match currency ISO code with Opportunity close date to currency ISO code with start date. The remaining data preparation steps having got the correct conversion rates in our dataflow can be the same as described above, we can use computeExpression to convert the measures.

This isn’t the only solution, so you may find alternatives, but this certainly achieves our goal. At the end, we have our Einstein Analytics dataset with measures converted into multiple currencies!

FIND THE RIGHT COURSE FOR YOU...

© Copyright Stimulus Consulting 2015