Skip to Main Content

Intelligent Advisor

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Need to use exchange rates in a rule

945888Jun 26 2012 — edited Jul 1 2012
Hi,

I need to write a calculation rule that will have to use dayly updated exchange rates through the new Batch Processor.

The real calculation rule is more complex than the one below wich I use as an example. Lets say that the CVS file contains a quantity and a currency.

For year 2011:
- If quantity is less than 1000, then the price per unity is $ 0.52
- If quantity is between 1001 and 6000, then the price per unity is $ 0,52
- If quantity is more than 6000 products, then the price per unity is $ 0.32
For year 2012:
- If quantity is less than 1000, then the price per unity is £ 0.52
- If quantity is between 1001 and 6000, then the price per unity is £ 0,52
- If quantity is more than 6000 products, then the price per unity is £ 0.32

I need to translate the per unity price in the currency given per line in the CSV file. I may have many rules like the one above with different currencies for the unity price. Echange rates change every day.

I thought of sending every day a second CSV file with the exchange rates inside. Something like:
#,DD,DA,TX
1,EUR,EUR,1
2,EUR,USD,1.2481
3,EUR,GPB,0.8024
4,EUR,YEN,99.227
5,USD,USD,1
6,USD,GPB,0.6428
7,USD,YEN,79.4460
8,GPB,GPB,1
....

This would imply to create an Entity in the Global-only rulebase project. Is it the right solution ? If yes, then how could I search for a particular exchange rate ?

Thanks a lot for your help and sorry for my english !

Regards,

Nicolas
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 29 2012
Added on Jun 26 2012
2 comments
259 views