Claims Workflow
This template is only available on the Developer Playground in Launch Pad.
This claims workflow template automates insurance claims processing by determining coverage eligibility based on the claimant’s input. The workflow includes tasks that process customer information, validate policies, estimate damage costs, and assign human review for claims assessment and investigation.
This template serves as a quickstart for building business process automation flows with human inputs, reviews, or approvals involved.
Conductor features used
This template utilizes the following Conductor features:
How to use the template
- Import the template from Launch Pad.
- Set up workers for policy retrieval and claims creation.
- Run workflow.
Step 1: Import the template
The claims workflow template is only available on the Developer Playground in Launch Pad.
To import the template:
- Go to Developer Playground > Launch Pad on the left navigation menu.
- In Claims Workflow, select Use Template.
- Select Import.
- Log in to view the imported workflow.
The insurance_claim
workflow is now imported and ready for use.
Understand the workflow logic
This section explains the workflow logic and how to execute it.
Workflow inputs:
- firstName—The claimant’s first name.
- lastName–The claimant’s last name.
Example input payload:
{
"firstName": "John",
"lastName": "Doe"
}
Workflow logic:
- The workflow begins with a Worker task that retrieves the claimant’s insurance policies for claims matching later on.
- Next, the Inline task is used to extract the claimant’s policy types (Home, Auto, etc.) as options for the claimant to choose in the next task, which is a Human task.
- The first Human task is meant for the claimant, who must fill out the claim details like the incident location, the policy type to claim under, and the description of the incident.
- The workflow continues to a Switch task that evaluates if the claim falls under the Auto policy type.
- If the policy type is anything other than Auto, the Terminate task ends the workflow with the reason “Terminated because of invalid policy”.
- If the policy type is Auto, the workflow proceeds to another Worker task that creates a claim for the claimant, containing details like the claim number, description, customer ID, and so on.
- Next, the second Human task is meant for the insurance assessor, who reviews the claimant’s coverage eligibility based on the claim details provided.
- The Switch task then routes the workflow based on the coverage outcome in the previous task (Not Covered, Partially Covered, Full Coverage).
- If the outcome is Not Covered, the Terminate task ends the workflow with the reason “Policy does not cover incident”.
- If there is at least partial coverage, the workflow continues to an Inline task that estimates the total damages based on predefined costs.
- The Switch task then evaluates if the damages exceed the total coverage amount.
- If the damages are within the limits, the workflow terminates with the reason “Send Payment to client”.
- If the damages exceed the coverage amount, the workflow continues to another Human task, which the claimant must fill out with additional incident details for further investigation.
- Finally, another Switch task routes the workflow based on the investigation outcome.
- If the damages are not covered upon further investigation, the workflow terminates with the reason “Terminated after investigation. Incident not covered”.
- If the damages are covered upon further investigation, the workflow terminates with the reason “Send Payment to client”.
Step 2: Set up custom workers
- Node.js version 18 or higher
The workflow contains tasks for retrieving a policy based on the customer’s details and for creating a claim.
The final .pdf report is created using a custom Worker task that takes the raw report content and generates a file based on the supplied file name.
To use these tasks, you need to set up workers locally and connect them to the Conductor server with access credentials.
To retrieve the access credentials:
-
Go to Definitions > Workflow and select the
insurance_claim
workflow. -
In the Workflow tab on the right-hand panel, select Get Access Keys.
-
Copy the key ID, secret, and server URL and store them securely.
To set up the workers:
- Copy the following command into your terminal:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/conductor-oss/awesome-conductor-apps/refs/heads/main/typescript/claims-workflow/workers/install.sh)"
- Enter the access key ID, secret, and server URL into the terminal when prompted.
Step 3: Run the workflow
With the workflow fully set up, give it a run.
Check out the test data for the workflow in the GitHub readme.
To run the workflow:
- From the ``insurance_claim` workflow definition, go to the Run tab.
- Enter the Input Params.
Example:
{
"firstName": "John",
"lastName": "Doe"
}
- Select Execute.
Complete the Human tasks
To complete the workflow fully, try completing the Human tasks as the workflow progresses. The inputs to these Human tasks will affect the trajectory of the workflow, as shown in the workflow logic.
For development purposes, you can complete the Human tasks from the Conductor UI. In production, these Human tasks will be displayed on an external UI, like a claims portal or an internal business site, for the relevant users to fill out.
To complete the Human tasks in the UI:
- Go to Executions > Human Task.
- Select the Task ID of a task to view the form.
- Select Claim and enter the necessary inputs for each form field.
- Once completed, select Complete to submit the form.
Workflow output
The claims workflow will terminate at different junctures, based on the claim eligibility:
- If the policy type is not Auto, the workflow will terminate with the reason “Terminated because of invalid policy”, without proceeding to file a claim.
- If the insurance assessor determines that the claim is not covered, the workflow will terminate with the reason “Policy does not cover incident”, without any payout.
- If the damages are within the coverage limits, the workflow will terminate with the reason “Send Payment to client”.
- If the damages exceed the limits but the claim is still covered after further investigation, the workflow will also terminate with the reason “Send Payment to client”.
Workflow modifications
This template provides a starting point for customizing the workflow to your needs. You can modify the workflow by:
- Routing the Human tasks to specific groups or users, by configuring the Human task in the workflow definition.
- Triggering a payment workflow upon successful review of the claim. This can be implemented using a Sub Workflow or Start Workflow task.