Setting Up the System DSN
A system DSN needs to be setup in order to use the preopulation feature, this requires an installation of the Oracle ODBC driver (Oracle instantclient - we normally use instant client 11g2).
- Navigate to the 32 bit ODBC Data Source Administrator (C:\Windows\SysWOW64\odbcad32.exe on 64 bit and C:\Windows\System32\odbcad32.exe on 32 bit).
- Click the System DSN tab
- If there already exists a System DSN named "DS_REPORTS" (can be lowercase) then skip to step 7
- Click Add
- Select the Oracle ODBC driver (this may be written as "instantclient..." or "Oracle in oracle_home")
- Enter the details as shown below:
- You can use the "test connection" button and enter the password "report" to check a connection is successful
Config
There are a few properties the Config needs to have in order for prism to use this feature:
- ConsumerDatabaseConnectionString - this is the string the application needs to know which DSN to use (the one setup above)
- GetConsumerQuery - this is the query the application will use against the database with the actual value substituted for a "?". The email field MUST also be selected as "email_address".
- UpdateConsumerQuery - Query used to update a consumer's details in the database
- CustomerIDRegex (optional) - this tells the application what value on the receipt to use for the lookup. If this value does not exist the application will use the transaction number.
- If there is a second lookup you'd like to do to supplement the first you can use the similar config options SecondConsumerDatabaseConnectionString, SecondGetConsumerQuery and SecondUpdateConsumerQuery. The first consumer identification query will take precedence over the second.