Click: Toolbox
Click: New Resource
API Name: CurrencyExchangeRates
Data Type: Number
Decimal Places: 4
Paste the below formula:
If(ISPICKVAL({!Loop.IsoCode}, "AUD"), {!Currency_API_Callout.2XX.data.AUD.value},
If(ISPICKVAL({!Loop.IsoCode}, "USD"), {!Currency_API_Callout.2XX.data.USD.value},
If(ISPICKVAL({!Loop.IsoCode}, "EUR"), {!Currency_API_Callout.2XX.data.EUR.value}, 0.000)))
You will need to add additional formula lines for each currency and add a bracket ) to the end of the formula. As I only have three currencies in my Org and don’t plan on adding more, I have three lines of formula so I add three brackets ))) to the end.
It is highly recommended at this stage to add the most common currencies up to 3900 (Flow Limit). If you go over this limit you will need to create an additional Formula Variable and replace 0.000))) in the first formula with the API name of the second formula {!CurrencyExchangeRate2}))) which could look like this:
If(ISPICKVAL({!Loop.IsoCode}, "AUD"), {!Currency_API_Callout.2XX.data.AUD.value},
If(ISPICKVAL({!Loop.IsoCode}, "USD"), {!Currency_API_Callout.2XX.data.USD.value},
If(ISPICKVAL({!Loop.IsoCode}, "EUR"), {!Currency_API_Callout.2XX.data.EUR.value},
{!CurrencyExchangeRate2})))
And your second formula would look like this
If(ISPICKVAL({!Loop.IsoCode}, "AUD"), !Currency_API_Callout.2XX.data.AUD.value},
If(ISPICKVAL({!Loop.IsoCode}, "USD"), {!Currency_API_Callout.2XX.data.USD.value},
If(ISPICKVAL({!Loop.IsoCode}, "EUR"), {!Currency_API_Callout.2XX.data.EUR.value}, 0.000)))
And so on until each 3900 limit is reached per formula. An alternative approach would be to use APEX Class to overcome limits within flows.
Here is a formula for the 10 most-used currencies
If(ISPICKVAL({!Loop.IsoCode}, "USD"), {!Currency_API_Callout.2XX.data.USD.value},
If(ISPICKVAL({!Loop.IsoCode}, "EUR"), {!Currency_API_Callout.2XX.data.EUR.value},
If(ISPICKVAL({!Loop.IsoCode}, "JPY"), {!Currency_API_Callout.2XX.data.JPY.value},
If(ISPICKVAL({!Loop.IsoCode}, "GBP"), {!Currency_API_Callout.2XX.data.GBP.value},
If(ISPICKVAL({!Loop.IsoCode}, "AUD"), {!Currency_API_Callout.2XX.data.AUD.value},
If(ISPICKVAL({!Loop.IsoCode}, "CAD"), {!Currency_API_Callout.2XX.data.CAD.value},
If(ISPICKVAL({!Loop.IsoCode}, "CHF"), {!Currency_API_Callout.2XX.data.CHF.value},
If(ISPICKVAL({!Loop.IsoCode}, "CNH"), {!Currency_API_Callout.2XX.data.CNH.value},
If(ISPICKVAL({!Loop.IsoCode}, "HKD"), {!Currency_API_Callout.2XX.data.HKD.value},
If(ISPICKVAL({!Loop.IsoCode}, "NZD"), {!Currency_API_Callout.2XX.data.NZD.value}, 0.000))))))))))
Do not include your Corporate Currency and always ‘Check Syntax’ to make sure your formula works.