Events API Types of Events Supported By CORE & HUB

Events header

All events contain some header information

Field Description
$schema json schema
$schema_base base schema for all events
eventType type of the event corresponding the schema
payloadVersion version
correlationId id used to correlate behavior in backend system
timestamp timestamp for the event

Supported events

Folling is a list of all current supported events

Scalepoint to IC

case_created

Supported systems: HUB Property

Send when a claim has been created in CWA. Most useful when the case is not created thourgh integration as the backend system can react with case_created event back to CWA updating the case number.

claim_updated

CaseClosed

Supported systems: ClaimShop, HUB Property

Event is sent when claim is closed.

{
  "$schema": "./schemas/claim_updated_payload.json",
  "$schema_base": "./schemas/event_envelope.schema.json",
  "eventType": "claim_updated",
  "payloadVersion": "1.0.0",
  "correlationId": "f80245d2-d4a2-4f41-b488-bfb470ee48be",
  "timestamp": "2016-12-01T12:34:39.887165Z",
  "case": {
    "number": "CN82411074",
    "token": "b.9e28f37f-4495-4b26-8654-10db263fd618",
    "caseType": "PropertyClaim"
  },
  "changedBy": {
    "fullName": "Built-in Administrator",
    "username": "admin",
    "userType": "Scalepoint"
  },
  "changes": [
    {
      "property": "CaseClosed",
      "isTerminated": true,
      "terminationReason": "CreatedByMistake",
      "terminationReasonDescription": "Description"
    }
  ]
}

If isTerminated is false, then the claim has gone through happy flow (craftsman assigned, invoiced approved...)

Otherwise the following termination reasons are possible:

TerminationReason Description
None None is used when claim is not terminated = "close claim" task was suggested to user and claim was closed in normal flow
NotCovered Claim handler changes coverage to 'Not covered' and closes case - not matter if claim was covered prior
BelowDeductible Claim handler changes coverage to 'Below Deductible' and closes case
CreatedByMistake Only used in connection with termination. Used when user manually choose "termination" and select "created by mistake"
Other Only used in connection with termination. Used when user manually choose "other" and select "created by "other". User can add terminationReason in text. This text is added to request
PhoneInspection Assessor has option when assigned to inspection to select "phone-inspection" and set coverage. If this result in not covered then claim can be terminated. Seems that phoneInspection is not used
NotCoveredAfterInspection Service partner sets claim as not covered
PaidInOwnSystem Claim handler marked that the claim would already handled in backend system. Only used in connection with "terminated"
Inactivity In settings it can be defined when case is closed by system due to inactivity
CustomReason Claim handler inputs customer reason provided in the TerminationReasonDescription
TerminationReasonDescription

User friendly message which can be showed on UI

ShouldBeClosedInOwnSystem

True if user checked the corresponding box when closing the claim.

claim_reopened

Send when the claim has previously been closed, but is not opened once again. Can happend for instance if a service provider files an invoice or if the claimant writes a message. The claim handler can also choose to reopen the case.

accident_date_changed

Send when the accident date has been changed on the damage tab.

additional_claim_field

Send when 'Additional claim fields' have been changed on UI. These are the individually configurable fields.

reserve_updated

Payload example:

{
            "id": "_1001",
            "type": "reserve_updated",
            "timestamp": "2021-02-15T13:48:36.008917413Z",
            "attributes": {
                "eventType": "reserve_updated",
                "payloadVersion": "1.1.0",
                "changesInReserves": {
                    "2190": [
                        {
                            "property": "planned",
                            "newValue": 1037.0
                        },
                        {
                            "property": "actual",
                            "newValue": 0.0
                        },
                        {
                            "property": "isdefault",
                            "newValue": true
                        },
                        {
                            "property": "title",
                            "newValue": "Oprindelig reserve"
                        },
                        {
                            "property": "id",
                            "newValue": 2190
                        },
                        {
                            "property": "type.id",
                            "newValue": 1904
                        },
                        {
                            "property": "type.name",
                            "newValue": "Alm. Erstatning"
                        },
                        {
                            "property": "type.code",
                            "newValue": "RE-001"
                        },
                        {
                            "property": "type.flow",
                            "newValue": 0
                        }
                    ]
                },
                "correlationId": "9bdcbed3-fbd7-4333-be06-a15c19f0890f",
                "timestamp": "2021-02-15T13:48:36.8432584+00:00",
                "case": {
                    "uuid": "30cc0a25-4903-47ca-9856-d822aad0e331",
                    "number": "905709",
                    "token": "ic.30cc0a25-4903-47ca-9856-d822aad0e331"
                },
                "changedBy": {}
            }
        }

When reserve has changed. Either manually or if an invoice has been approved and the reserve is therefore decreased.

Schema:

{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "definitions": {
        "planned": {
            "type": "number"
        },
        "plannedChange": {
            "type": "object",
            "properties": {
                "property": {
                    "type": "string",
                    "enum": [
                        "planned"
                    ]
                },
                "newValue": {
                    "$ref": "#/definitions/planned"
                },
                "oldValue": {
                    "$ref": "#/definitions/planned"
                }
            }
        },
        "outgoing": {
            "type": "number"
        },
        "outgoingChange": {
            "type": "object",
            "properties": {
                "property": {
                    "type": "string",
                    "enum": [
                        "outgoing"
                    ]
                },
                "newValue": {
                    "$ref": "#/definitions/outgoing"
                },
                "oldValue": {
                    "$ref": "#/definitions/outgoing"
                }
            }
        },
        "incoming": {
            "type": "number"
        },
        "incomingChange": {
            "type": "object",
            "properties": {
                "property": {
                    "type": "string",
                    "enum": [
                        "incoming"
                    ]
                },
                "newValue": {
                    "$ref": "#/definitions/incoming"
                },
                "oldValue": {
                    "$ref": "#/definitions/incoming"
                }
            }
        },
        "changesInReserves": {
            "type": "object",
            "additionalProperties": {
                "type": "array",
                "items": {
                    "$ref": "#/definitions/changeItem"
                }
            }
        },
        "changeItem": {
            "type": "object",
            "required": ["property", "newValue"],
            "properties": {
                "property": {
                    "type": "string"
                },
                "newValue": {
                    "type": ["number", "string", "boolean", "null"]
                },
                "oldValue": {
                    "type": ["number", "string", "boolean", "null"]
                }
            }
        }
    },
    "type": "object",
    "properties": {
        "eventType": {
            "type": "string",
            "enum": [
                "reserve_updated"
            ]
        },
        "payloadVersion": {
            "type": "string"
        },
        "correlationId": {
            "type": "string"
        },
        "timestamp": {
            "type": "string"
        },
        "case": {
            "type": "object",
            "properties": {
                "number": {
                    "type": "string"
                },
                "token": {
                    "type": "string"
                },
                "uuid": {
                    "type": "string"
                }
            }
        },
        "changedBy": {
            "type": "object",
            "properties": {
                "fullName": {
                    "type": ["string", "null"]
                },
                "username": {
                    "type": ["string", "null"]
                },
                "email": {
                    "type": ["string", "null"]
                }
            }
        },
        "changesInReserves": {
            "$ref": "#/definitions/changesInReserves"
        }
    },
    "required": [
        "eventType",
        "payloadVersion",
        "correlationId",
        "timestamp",
        "changesInReserves"
    ]
}

case_settled

Supported systems: ClaimShop, HUB Property

This event is used to integrate information about payments, invoices and claimant share (like deductible, depreciation, vat).

A settlement is zero or multiple expenses and claimant share approved and payed out on a claim.

When a case is partially or fully settled in Scalepoint

Description

Field Description
case
case.uuid Unique key for the case
case.token case token
case.number claim number
settlement
settlement.approvedby Who approve the settlement
settlement.approvedby.name Approver name
settlement.approvedby.email Approver email
settlement.approvedby.type user or system (in case of automatic approval)
summary different values affecting the payments, all in money
summary.manualReduction Used for various purposes on a contentClaim
summary.shareOfVat amount of VAT the claimant pays
summary.deductible amount of deductible applied in this settlement
summary.depreciation amount of depreciation applied in this settlement
Parties Participants who either payes or recieves money
Party.$id reference to this party within the json document
Party.address
Party.id identification of the participant, can be cpr-number or cvr-number
Party.internalid unique key provided by the IC: In case of network service providers, this is manage in scalepoint ui
Party.externalId Service Partner Id from external systems when available (e.g forsti related claims)
Party.participantId Service Partner Agent Id from the system
Party.roles Role that this partiy plays on the claim. can be: serviceProvider, policyHolder, claimant
expenses summary of the approved expenses
expense.$id reference to this expense within the json document
expense.uuid Unique id for the expense
expense.id identification of the expense, usually the invoice number given by the service partner
expense.total total amount on the invoice, before any selfcoverage (deductible, depreciation...)
expense.subtotal total minus VAT
expense.vat vat
expense.currencyCode currency for the invoice, usually DKK for now
expense.issueDate Date for when the invoice was issued by the payee party
expense.dueDate Duedate as stated on the invoice
expense.expenseType scalepoint specific type of invoice
expense.administrative if the invoice is for a service which is not claim related
expense.payerParty payer as stated on the invoice
expense.payeeParty issuer of invoice
expense.isPayeeThirdPartyClaimant flag to distinguish if payee is a third party claimant
expense.claimantParty claimant party data if payee is third party claimant
expense.policyCoverage expense coverage by policy
obligations summary of who is obliged to compensate what
obligation.$id reference to this obligation within the json document
obligation.type type of obligation like compensation, deductible, depreciation, vat, creditnote
obligation.payerParty reference to participant who is obliged to compensate
obligation.payeeParty reference to participant who needs compensation
obligation.amount amount to be compensated
obligation.currencyCode currency of obligation, usually DKK for now
obligation.ruleName name of the rule describing the reason for obligation
obligation.expense reference to expense that needs compensation
obligation.creditNote reference to expense that is crediting
payments Array of transactions between parties
payment.uuid Unique id for the particular transaction. Can be used to provide feedback to scalepoint if the given transaction succeeded or not
payment.dueDate When the transaction is due. This value is not taken directly from the invoice, but taken from payment terms
payment.payerParty reference to the paying participant
payment.payeeParty reference to the participant getting payed
payment.total Amount to be transferred
payment.currencyCode currency for the transaction, usually DKK for now
payment.paymentMeans Suggested payment means
payment.paymentMeans.paymentMeansCode possible values: DOMESTIC_BANK_TRANSFER, INTERNATIONAL_BANK_TRANSFER, FIK_PAYMENT, NEMKONTO_BANK_TRANSFER
payment.paymentMeans.paymentChannelCode possible values: DK:BANK, DK:FIK, IBAN, DK:NEMKONTO
payment.paymentMeans.paymentId
payment.paymentMeans.instructionId
payment.paymentMeans.creditAccount
payment.additionalPaymentMeans Payment means alternative to suggested payment.paymentMeans
payment.expenses expenses to which this transaction relates
payment.obligations obligations to which this transaction relates

message_received

This event is used to notify the system when a new message is added to a claim. It provides information about the message, including the channel, sender, and other relevant metadata.

Description

Field Description
message
message.id Unique identifier for the message
message.timestamp Timestamp when the message was received
message.channel The channel through which the message was received (e.g., email, SMS, myClaim, etc.)
message.sender Information about the sender of the message
message.sender.name Name of the sender
message.sender.email Email address of the sender (if applicable)
message.sender.phone Phone number of the sender (if applicable)
message.sender.type Type of sender (e.g., Participant, Unknown sender)
message.sender.role Role of the sender (e.g., PolicyHolder, ServiceProvider)
message.content Content of the message
message.attachments List of attachments included in the message
message.attachments.fileName Name of the attached file
message.attachments.fileType Type of the attached file
message.attachments.uploadedBy Information about who uploaded the attachment

Example Payload

    {
    "messageReceivedData": {
        "type": "object",
        "title": "message_received event",
        "properties": {
            "senderData": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string"
                    },
                    "email": {
                        "type": "string"
                    },
                    "roles": {
                        "type": "string"
                    },
                    "isClaimParticipant": {
                        "type": "boolean"
                    }
                }
            },
            "messageData": {
                "title": "Message data",
                "type": "object",
                "properties": {
                    "subject": {
                        "type": "string"
                    },
                    "receivedOn": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "channelType": {
                        "type": "string",
                        "enum": [
                            "Sms",
                            "Email",
                            "ClaimPage",
                            "MessageTab"
                        ]
                    },
                    "addMessageAction": {
                        "type": "string",
                        "enum": [
                            "Message",
                            "Attachment"
                        ]
                    }
                }
            }
        }
    }
}

IC to Scalepoint

case_created

The provided case.number is save to the claim with the given case.token, if it does not already have a number.

case_creation_failed

Used when the backend system fails to generate a case number. Case will be closed in CWA and the message will be displayed to the user

case_notification

used to create messeages on the message tap of a given claim. the type can be used to set up rules for creating specific tasks for claimhandlers.

payment_status_updated

When a particular payment in a case_settled event has been processed or canceled, the ic can send this event, to reflect the change on the settlements tab in CWA.