To use the international currency interface and receive daily rate updates, create an internal process to perform this task or go to www.XE.com to create an account for the receipt of a daily exchange feed. The Lawtrac application is already configured to work with the XE interface. Setup outside of Lawtrac will be required. XE will provide assistance with the required configuration to obtain the daily feed from their site.
Note: When setting up the feed with XE, ensure that the file type is
.CSV. This ensures that the exchange rates can be read and populated in the Dailies table (contained in the CURRENCY database). In addition, the data feed must be directed to and return from your company’s IP address.
Once your company’s XE account is set up, refer to the steps below to configure Lawtrac for the receipt of the daily feed:
- Copy the CurrencyWork directory from the CurrencyWork.zip file into the INETPUB\WWWROOT folder on the web server.
- Open the currency.cfm file and update the sections highlighted in red to reflect your company’s Lawtrac and XE settings:
<CFPARAM name="filesave" default="C#dateformat(now(),'dd-mm-yy')#">
<CFPARAM name="filepath" default="D:\inetpub\wwwroot\CurrencyWork">
<CFPARAM name="urlpath" default="https://www.lawtraconline.com/CurrencyWork/">
<!--- saves the file in its original form from the website --->
<CFHTTP method="Get" url="http://www.xe.com/dfs/datafeed2.cgi"* path="#filepath#" file="#filesave#.csv">
*This URL is provided by XE once your account is set up.
- You can also update the section below if you are interested in getting an email once the exchange rates have been updated. Refer to the following example:
<CFMAIL to="Ksacky@Lawtrac.com" from="CHolden@Lawtrac.com" cc="firstname.lastname@example.org, email@example.com" subject="Daily Exchange Rates Updated">
- Save the file.
Proceed with creating a scheduled task to populate the Currency database:
- Log into ColdFusion Administrator.
- Select Debugging & Logging | Scheduled Tasks.
- Input the Task name of "Currency Feed".
- The default Start date should be the current day.
- Click the Recurring radio button and select "Daily" from the drop-down.
- Enter the desired time you want the exchange rates to be updated.
- In the "URL" field input your server URL or IP address with the suffix “
currencywork/currency.cfm” (for example, http://yourURL/currencywork/currency.cfm).
- Check Publish–Save output to file.
- Specify a valid path and file name for an output file (i.e.,
- Click Submit.