Collapse
Submit a Service Request
Contact Information for Technical Support
My Service Notifications
Customization of Rule Runtime Log report for Enhanced Business Rules
Answer ID 12811 |
Last Review Date 06/06/2024
How to create a custom report on Rule Runtime Log of Enhanced Business Rules?
Environment:
Oracle B2C Service 24A and newer
Enhanced Business Rules, Custom Reports
Resolution:
Custom reports on rule runtime log can be created. For customizations, rule_runtime_log table is added to the report designer. The desired fields can be chosen from rule_runtime_log table to design the report. Filters and slices can also use fields from this table.
Custom reports on rule runtime log can be created. For customizations, rule_runtime_log table is added to the report designer. The desired fields can be chosen from rule_runtime_log table to design the report. Filters and slices can also use fields from this table.
Rule runtime custom report allows joining other tables either through custom scripts or by making use of linked reports.
A custom report on rule_runtime_log table joining with Incident table can be created using the below code snippet.
- Initialization script can be added within the Initialization tab of Custom Script Editor.
Sample code for Initialization tab.
require_once( get_cfg_var('doc_root') .'/include/ConnectPHP/Connect_init.phph' );
initConnectAPI();
$context = RightNow\Connect\v1_4\ConnectAPI::getCurrentContext();
$context->ApplicationContext = "custom script";
require_once( get_cfg_var('doc_root') .'/include/ConnectPHP/Connect_init.phph' );
initConnectAPI();
$context = RightNow\Connect\v1_4\ConnectAPI::getCurrentContext();
$context->ApplicationContext = "custom script";
- Script for row wise processing can be written within the Process tab
Sample code for Process tab.
$incident = RightNow\Connect\v1_4\Incident::fetch($rows[0][3]->val);
$rows[0][5]->val = $incident->Queue->LookupName;
$rows[0][6]->val = $incident->Mailbox->LookupName;
$rows[0][8]->val = $incident->Product->Name;
$rows[0][9]->val = $incident->Category->Name;
$incident = RightNow\Connect\v1_4\Incident::fetch($rows[0][3]->val);
$rows[0][5]->val = $incident->Queue->LookupName;
$rows[0][6]->val = $incident->Mailbox->LookupName;
$rows[0][8]->val = $incident->Product->Name;
$rows[0][9]->val = $incident->Category->Name;
Important Note: Report execution through API calls is not supported yet and the total number of records that can be displayed in rule runtime log report is limited to 10000.