ftos.journey.publish
IMPORTANT!
Starting with v24.3, this is renamed from server.event.publish to ftos.journey.publish.
Starting with v24.3, this is renamed from server.event.publish to ftos.journey.publish.
This is suitable for all modules of business service components.
Raises the following events:
| Event Name | Event Description |
|---|---|
JourneyStart
|
Journey event that occurs when a banking/insurance journey begins. |
JourneyAbandoned
|
Journey event that occurs when a banking/insurance journey expires. |
JourneyUnsuccess
|
Journey event that occurs when a banking/insurance journey is finished but no contract/policy is signed. |
JourneySuccess
|
Journey event that occurs when a banking/insurance journey is finished and the contract/policy is signed. |
ProductApproved
|
Business event that must be raised after an offer is submitted and after the application/ quote is approved. |
ProductRejected
|
Business event that must be raised after the application/quote is rejected. |
Syntax
Copy
function ftos.journey.publish(body:jsonData): void
Define the
jsonData for each event as listed below:Copy
var jsonData = {
"EventName": "JourneyStart"
"EventDate": yyyy-mm-dd //The current date.
"MasterProductId" : string //The master ID of the product(i.e one not affected by versioning) for which the event is raised.
"JourneyId" : string //The ID of the journey for which the event is raised.
"JourneyInstanceId" : string //The ID of the journey instance for which the event is raised.
"Values":{
"StartedJourneys": 1 // The number of journeys that are started at the EventDate.
}
}
Copy
var jsonData = {
"EventName": "JourneyAbandoned", // The name of the event raised.
"EventDate": yyyy-mm-dd, //The current date.
"MasterProductId" : string, //The master ID of the product(i.e one not affected by versioning) for which the event is raised.
"JourneyId" : string, //The ID of the journey for which the event is raised.
"JourneyInstanceId" : string, //The ID of the journey instance for which the event is raised.
"Values":{
"AbandonedContracts": 1 // The number of journeys that expired or that were left inactive for a period of time at EventDate.
}
}
Copy
var jsonData = {
"EventName": "JourneyUnsuccess", // The name of the event raised.
"EventDate": yyyy-mm-dd, //The current date.
"MasterProductId" : string, //The master ID of the product(i.e one not affected by versioning) for which the event is raised.
"JourneyId" : string, //The ID of the journey for which the event is raised.
"JourneyInstanceId" : string, //The ID of the journey instance for which the event is raised.
"Values":{
"UnsuccessContracts": 1 // The number of journeys that ended with no contract signed or no policy sold at EventDate.
}
}
Copy
var jsonData = {
"EventName": "JourneySuccess", // The name of the event raised.
"EventDate": yyyy-mm-dd, //The current date.
"MasterProductId" : string, //The master ID of the product(i.e one not affected by versioning) for which the event is raised.
"JourneyId" : string, //The ID of the journey for which the event is raised.
"JourneyInstanceId" : string, //The ID of the journey instance for which the event is raised.
"Values":{
"SuccessContracts" : number // The number of journeys that ended with a contract signed or a policy sold at EventDate.
"NewCustomers" : number // Value should be equal to the number of new customers that signed the contract/ got a policy issued succesffuly.
"TimeToYes" : minutes // The difference in minutes between the journey start and end date.
"NewCustomerContractValue" : number //If the contract(s)/ policie(s) is signed by a new customer, the value should be eqaul to the ContractValue.
"ContractValue" : number // The amount of the signed contract/issued policy at EventDate.
"ContractCurrency" : string // The currency of the signed contract/issued policy at EventDate.
}
}
}
Copy
var jsonData = {
"EventName": "ProductApproved", // The name of the event raised.
"EventDate": yyyy-mm-dd, //The current date.
"MasterProductId" : string, //The master ID of the product(i.e one not affected by versioning) for which the event is raised.
"JourneyId" : string, //The ID of the journey for which the event is raised.
"JourneyInstanceId" : string, //The ID of the journey instance for which the event is raised.
"Values":{
"SubmittedOffers": 1 // The number of approved applications/quotes at EventDate.
}
}
Copy
var jsonData = {
"EventName": "Product Rejected", // The name of the event raised.
"EventDate": yyyy-mm-dd, //The current date.
"MasterProductId" : string, //The master ID of the product(i.e one not affected by versioning) for which the event is raised.
"JourneyId" : string, //The ID of the journey for which the event is raised.
"JourneyInstanceId" : string, //The ID of the journey instance for which the event is raised.
"Values":{
"RejectedOffers": 1 // The number of rejected applications/quotes at EventDate.
}
}
Example
-
We are raising a JourneySuccess event on the journey with the ID 60eb510f-db93-49f1-b1d7-fed9390af9c2.
-
No new customers have signed the policy.
-
Between the insurance journey start date and signing policy date 500 minutes have passed.
-
The policy value is 23000 and the currency of the policy is RON.
Copy
var jsonData = {
"EventName" : "JourneySuccess",
"EventDate": "2022-10-01",
"MasterProductId" : "30eb510f-db93-49f1-b1d7-fed9390af5c1",
"JourneyId": "60eb510f-db93-49f1-b1d7-fed9390af9c2",
"JourneyInstanceId": "90sd510f-db95-94f1-b1d7-fed9390ad8c3",
"Values": {
"SuccessContracts" : 1,
"NewCustomers" : 0,
"TimeToYes" : 500,
"NewCustomerContractValue" : 0,
"ContractValue" : 23000,
"ContractCurrency" : "RON"
}
}
ftos.journey.publish(jsonData)