Create the Claim
Learning Objectives
After completing this unit, you’ll be able to:
- Configure a remote action to call the createUpdateClaim service.
- Populate an Integration Procedure with the input parameters to create a claim.
- Debug an Integration Procedure to validate the claim creation process.
Create a Claim
With a policy in place and the input JSON trimmed and populated, it’s time for Justus to create the claim.
He sets up a simple Integration Procedure that uses a remote action to call the createUpdateClaim service.
Because he prepared the product model, claim model, policy records, and input data so methodically, this should be pretty simple. Let’s see how he does it!
Set Up the Service
Creating and updating a claim involves a single service: InsClaimService:createUpdateClaim. Call this service from an Integration Procedure or OmniScript using a Remote Action element.
To test the homeowner's claim, Justus creates a new Integration Procedure and adds the Remote Action component below the default Procedure Configuration.
Next, specify the class and method to define the service.
For the createUpdateClaim service, the (1) Remote Class is InsClaimService, and the (2) Remote Method is createUpdateClaim.
Next, add remote options for the service call. The first required option is to set the input key to the correct value, which tells the service where to look for the input data.
In the previous unit, you discovered that claimJson was the top-level object of the JSON.
In the remote options, set claimJson as the value.
Next, add the generateClaimNumber option.
When set to true, the UniqueIdGeneratorService generates a unique key and sets the Name field to that key. Cumulus doesn’t require a unique key, so it’s set to false.
Test It Out
With the properties and options for the createUpdateClaim service in place, Justus retrieves the input JSON prepared in the previous unit.
Back in the Integration Procedure, paste this data into the Input Parameters section of the PREVIEW tab.
Next, execute the procedure to create output in the Debug Log.
The procedure runs and creates output data in the Debug Log.
Select the debug response for CreateClaim to review the output. If the service works as expected, the log displays a series of the newly created claim record Ids.
Once again, paste the data into a JSON viewer to see a more organized tree view.
Let’s explore the records created and their relationships with existing policy and product definitions.
The claimId is the record Id for the newly created claim. It links to the claimed policy and serves as the parent object for all associated claim records.
The policyholderClaimParticipantId represents the record Id for the Claim Participant record. This record links to the new Claim and any associated contact and account records. A unique claim participant record is created for each participant in the claim. For this claim, there is one participant, so only one record.
This claim has two claim items that correspond to the Claim Property and Claim Injury specs referenced in the input JSON.
One item corresponds to the Claim Damaged Property claim item.
This item references an insuredItemId that links to the Insurance Policy Asset for the damaged property. The other item corresponds to the Injury claim item.
Finally, the service creates several new policyTermIds. Each Id corresponds to a different power attribute configured on the product model. These policy terms relate to both the claim and the policy.
The first Id corresponds to the deductible and contains values for the initial amount, associated attribute, attribute scope, attribute type, and benefit type, among others.
Also, notice what information this createUpdateClaim service doesn’t return. There aren’t any open claim coverages. That’s because you haven’t configured any rules to automatically open coverages.
To learn all about further managing and automating the claim, check out Claims Management and Automation for Insurance.
Want to Learn More?
If you’re a Salesforce customer, check out these learning journeys to discover how to skill up on our suite of digital transformation tools and industry applications.
-
Digital Insurance Platform Consultant Learning Journey
-
Digital Insurance Platform Developer Learning Journey
If you’re a Salesforce partner, you can find the same great learning plus additional partner resources on Partner Learning Camp (log in required). #AlwaysBeLearning