Configure a custom database for accounting

  1. Create an empty database to store the accounting information.
    You cannot store accounting information in a B&OM database as it can only be accessed by B&OM.
  2. In KCM Studio, create a database alias for the empty database.
    To do so, on the Administration tab, click DB Alias Administration and then click the new db alias button to create a new DB alias.
  3. Configure the connection settings and check the connection.
    In SQL Field Template, to use the standard SQL template, click Standard Value. You can leave the SQL Template field empty.
  4. Save the changes.
  5. On the Administration tab, click System Administration and select the system object.
  6. In the Accounting section on the right, set the Database parameter to the database alias you created, and then save the changes.
    The accounting exit points can now access this database through the AccountingDatabase variable that is available in context.

Example accounting scripts

A B&OM installation includes sample accounting scripts that provide a default implementation of the accounting functionality. The example scripts write information about completed requests and communications to an external database. To use these scripts, you must configure them on the system, and then create and configure an accounting database that must at least contain the following tables:

  • An AccountedRequest table with columns Reference, RegistrationTime, and CompletionTime.
    • The Reference column must be able to hold strings of up to 100 characters.
    • The RegistrationTime and CompletionTime must be able to hold dates.
  • An AccountedCommunication table with columns RequestReference, CorrespondenceReference, Label, Channel, and RecipientType.
    • All columns must be able to hold strings of up to 100 characters.

Also, to write extra information, you can add custom columns to the tables in your database and include these columns in the accounting scripts.

If you configure the accounting sample scripts as the main accounting exit points but no accounting database is configured, the scripts have no effect.