Technical and business event format

Business Automation Insights/Decision Intelligence Client Managed Software application uses a JSLT transformation to process the events that are sent by the decision runtime and stores theses processed data in an OpenSearch index. This index can be accessed by its associated alias icp4ba-bai-ads-timeseries.
Note: The formats apply only to the default Business Automation Insights applications.

Example of an OpenSearch document

OpenSearch documents are structured in two parts:
  • Technical data
  • Business data

The following document corresponds to an execution of the LoanValidation decision service.

{
	"id": "fb110d2b-6e7a-477a-9187-c10e18337b28",
	"decision": {
		"deploymentSpaceId": "test",
		"id": "loan",
		"serviceId": "samples.LoanValidation:LoanValidationDecisionService",
		"serviceName": "LoanValidation",
		"serviceVersion": "12.0.9",
		"operation": "LoanValidation",
		"engineApiVersion": "3.1.0"
	},
	"duration": 2,
	"timestamp": "2024-01-08T13:37:45.685+0000",
	"trace.executedRule.names": [
		"/LoanValidation-dmo-LoanValidation/Duration/duration",
		"/LoanValidation-dmo-LoanValidation/Bankruptcy Score/bankruptcy score",
		"/LoanValidation-dmo-LoanValidation/Salary Score/salary score",
		"/LoanValidation-dmo-LoanValidation/Yearly interest rate/yearly interest rate",
		"/LoanValidation-dmo-LoanValidation/Corporate Score/corporate score",
		"/LoanValidation-dmo-LoanValidation/Repayment/repayment",
		"/LoanValidation-dmo-LoanValidation/Grade/grade",
		"/LoanValidation-dmo-LoanValidation/Insurance/insurance",
		"/LoanValidation-dmo-LoanValidation/Approval/too big Debt to Income ratio"
	],
	"trace.notExecutedRule.names": [
		"/LoanValidation-dmo-LoanValidation/Approval/bad score",
		"/LoanValidation-dmo-LoanValidation/Approval/risky grade",
		"/LoanValidation-dmo-LoanValidation/Approval/age not valid",
		"/LoanValidation-dmo-LoanValidation/Approval/no name",
		"/LoanValidation-dmo-LoanValidation/Approval/wrong SSN",
		"/LoanValidation-dmo-LoanValidation/Approval/wrong SSN format",
		"/LoanValidation-dmo-LoanValidation/Approval/wrong zip format",
		"/LoanValidation-dmo-LoanValidation/Approval/max amount exceeded"
	],
	"type": "EXECUTION_SUCCESS",
	"product.name": "CP4BA",
	"runtimeNodeName": "8dd9f50e0265",
	"incident": {
		"id": null,
		"category": null,
		"stackTrace": null
	},
	"data": {
		"samples.LoanValidation:LoanValidationDecisionService.in.borrower.SSN.areaNumber": "123",
		"samples.LoanValidation:LoanValidationDecisionService.in.borrower.SSN.groupCode": "12",
		"samples.LoanValidation:LoanValidationDecisionService.in.borrower.SSN.serialNumber": "1234",
		"samples.LoanValidation:LoanValidationDecisionService.in.borrower.birthDate": "2023-12-18T14:49:48Z",
		"samples.LoanValidation:LoanValidationDecisionService.in.borrower.creditScore": 1000,
		"samples.LoanValidation:LoanValidationDecisionService.in.borrower.firstName": "John",
		"samples.LoanValidation:LoanValidationDecisionService.in.borrower.lastName": "Doe",
		"samples.LoanValidation:LoanValidationDecisionService.in.borrower.latestBankruptcy.chapter": 1000,
		"samples.LoanValidation:LoanValidationDecisionService.in.borrower.latestBankruptcy.date": "2023-12-18T14:49:48Z",
		"samples.LoanValidation:LoanValidationDecisionService.in.borrower.latestBankruptcy.reason": "<reason>",
		"samples.LoanValidation:LoanValidationDecisionService.in.borrower.yearlyIncome": 59022,
		"samples.LoanValidation:LoanValidationDecisionService.in.borrower.zipCode": "12000",
		"samples.LoanValidation:LoanValidationDecisionService.in.loan.amount": 110381,
		"samples.LoanValidation:LoanValidationDecisionService.in.loan.loanToValue": 1.5,
		"samples.LoanValidation:LoanValidationDecisionService.in.loan.numberOfMonthlyPayments": 70,
		"samples.LoanValidation:LoanValidationDecisionService.in.loan.startDate": "2023-12-18T14:49:48Z",
		"samples.LoanValidation:LoanValidationDecisionService.in.currentTime": "2023-12-18T14:49:48Z",
		"samples.LoanValidation:LoanValidationDecisionService.out.approval.approved": false,
		"samples.LoanValidation:LoanValidationDecisionService.out.approval.message": "Too big Debt/Income ratio: 0.37970816232915844",
		"samples.LoanValidation:LoanValidationDecisionService.out.insurance.rate": 0.001,
		"samples.LoanValidation:LoanValidationDecisionService.out.insurance.required": true
	}
}

Technical data

Table 1. Attributes of decisions technical data events
Event part Description Optional or required Type
decision.deploymentSpaceId The ID of the deployment space in which the decision service was executed Required String
decision.engineApiVersion The engine version of to execute the decision service Required String
decision.id The ID of the executed decision Required String
decision.operation The operation used to execute the decision service Required String
decision.serviceId The ID of the executed decision service Required String
decision.serviceName The name of the executed decision service Required String
decision.serviceVersion The version of the executed decision service Required String
duration The decision service execution duration Required Long
id The ID of the document. By default, the ID value equals to the execution ID of the decision service that is executed by the decision runtime Required String
incident.id The ID of the incident. It appears only when the decision service execution failed Optional String
incident.category The category of the incident Optional String
incident.stackTrace The stack trace of the incident Optional String
timestamp The decision service execution timestamp Required Date
trace.executedRule.names The list of executed rules Optional Object
trace.executedRule.names The list of not executed rules Optional Object
type If the decision service is executed successfully (EXECUTION_SUCCESS) or not (EXECUTION_FAILURE) Required String
product.name The product name set to the value CP4BA Required String
runtimeNodeName The node name of the decision runtime in which the decision service is executed Required String

Business data

The business data is specific to the type of the decision service. No schema is predefined. The only predefined schema is for the input and output parameters prefixes.

By default, the prefix of input parameters is <decisionServiceId>.in and the prefix of output parameters is <decisionServiceId>.out.