exact-onlineinvantive-dap

Register custom audit events for billing


We are running a custom app on Invantive Data Access Point which adds business functionality to Exact Online. For billing purposes, we would like to somehow register actual use of the software as defined in business terms instead of memory used, CPU, SQL statements executed, etc.

We do not yet have custom tables and I would like to keep it that way, so the whole state is kept in memory and in Exact Online only. So "insert into mytable@sqlserver..." is not an option. Neither does Exact Online offer the possibility to create custom tables as with Salesforce.

How can we somehow register billable events, such as "Performed an upload of 8 bank transactions" under this condition?


Solution

  • For billing purposes, you can lift along on the Customer Service infrastructure, which is similar to functionality offered by AWS or Apple for this purpose in their eco system. The "table" which stores the billing events like a Call Detail Record of a PBX is managed by Customer Service infrastructure.

    There are two options:

    The first option is automatically and always done. These data is also used to manage resource consumption and detect runaways.

    The second option is best done using Invantive SQL with the data dictionary table "auditevents". All records inserted into auditevents are automatically asynchronously forwarded to Customer Service. To see the current register audit events since start of application:

    select *
    from   auditevents@datadictionary
    

    where:

    To register a custom event:

    insert into auditevents@datadictionary select * from auditevents@datadictionary
    

    Only some fields can be provided; the rest are automatically determined:

    To receive the billing events yourself from the infrastructure, you will need to access the Customer Service APIs or have them automatically forwarded to mail, Slack, RocketChat or Mattermost channel.

    A sample SQL:

    insert into auditevents@datadictionary
    ( message_code
    , user_message
    , last_natural_key
    , application_name
    , gui_action
    , gui_module
    , reference_key
    , reference_table_code
    , partition
    )
    select 'xxmycode001' message_code
    ,      'Processed PayPal payments in Exact Online for ' || divisionlabel user_message
    ,      'today' last_natural_key
    ,      'PayPalProcessor' application_name
    ,      'xx-my-paypal-processor-step-2' gui_action
    ,      'xx-my-payal-processor' gui_module
    ,      clr_id reference_key
    ,      'clr' reference_table_code
    ,      division partition
    from   settings@inmemorystorage