Claim assignments
Assign claims to the right team‑member at each stage of the workflow
Claim Assignment – Manual, Round‑robin, Product‑module
The claim assignment feature decides who owns a claim while it moves through the Root workflow (Capture → Review → Acknowledge → Finalise). Configure once — the dashboard enforces the rules for every claim.
- Only the assigned user can edit/approve; others view read‑only.
- The assignee receives an in‑app notification and an email deep link.
- Finalise is terminal (no reassignment).
Assignment methods
export enum ClaimAssignmentMethod {
Manual = 'manual',
RoundRobin = 'round_robin',
ProductModule = 'product_module',
}
- Manual: zero‑code, returns eligible users only; does not auto‑assign
- Round‑robin: zero‑code, auto‑assigns among eligible users
- Product‑module: delegates to your product module function for full control
If not specified, the system defaults to "manual".
Required permissions by stage
import * as permissions from '@root/permissions';
export const requiredByStage = {
capture: [permissions.MakeClaimDecisions],
review: [permissions.MakeClaimDecisions],
acknowledge: [
permissions.AcknowledgeClaimDecisions,
permissions.AcknowledgeClaimApproval,
permissions.AcknowledgeClaimGoodwill,
permissions.AcknowledgeClaimRepudiation,
permissions.AcknowledgeClaimNoClaim,
],
};
1. Round‑robin (auto‑assign)
Root finds organisation users with the permissions required for the current stage and selects one via timestamp modulus for even distribution. It returns both the computed assigned_to
and the full users
list.
Return shape:
type ProductModuleAssignmentUser = {
id: string; // UUID
name: string;
email: string;
role?: string;
description?: string;
};
type ProductModuleAssignmentDetails = {
assigned_to?: ProductModuleAssignmentUser | null;
users: ProductModuleAssignmentUser[];
};
2. Manual (no auto‑assign)
Root computes the same eligible users as round‑robin but does not set assigned_to
. Use this to require a human to choose the assignee in the dashboard.
Return shape:
{
assigned_to: null,
users: ProductModuleAssignmentUser[]
}
3. Product‑module (custom logic)
Implement getClaimAssignmentOptions
in your product module for full control over the candidate list and default assignee.
Function signature:
// productModule/actions/getClaimAssignmentOptions.ts
export async function getClaimAssignmentOptions(policy, claim, currentUser, stage) {
// Your custom logic here
return {
assigned_to: selectedUserOrNull,
users: availableUsers,
};
}
Parameters:
- policy: the policy linked to the claim
- claim: the claim being assigned
- currentUser: the user making the request, or null if system‑initiated
- stage: "capture" | "review" | "acknowledge"
Minimal example:
export async function getClaimAssignmentOptions(policy, claim, currentUser, stage) {
const response = await root.organizations.getUsers();
const users = Array.isArray(response) ? response : response.users || response.data || [];
const rolesByStage = {
capture: ['Admin', 'Claims assessor', 'Call center agent'],
review: ['Claims assessor', 'Admin', 'Claims supervisor'],
acknowledge: ['Admin', 'Claims supervisor', 'Call center agent'],
};
const allowedRoles = rolesByStage[stage] || rolesByStage.review;
const eligibleUsers = users.filter((u) => allowedRoles.includes(u.organization_role_name));
const availableUsers = eligibleUsers.map((u) => ({
id: u.user_id,
name: `${u.first_name} ${u.last_name}`,
email: u.email,
role: u.organization_role_name,
description: `Available for ${stage}`,
}));
const assignedUser =
(currentUser && availableUsers.find((u) => u.id === currentUser.user_id)) || availableUsers[0] || null;
return {
assigned_to: assignedUser,
users: availableUsers,
};
}
HTTP: fetch assignment options
Endpoints:
- GET
/claims/:claim_id/assignment-options/capture
- GET
/claims/:claim_id/assignment-options/review
- GET
/claims/:claim_id/assignment-options/acknowledge
Response body:
{
"assignedTo": {
"userId": "uuid",
"name": "string",
"email": "string",
"role": "string",
"description": "string"
},
"users": [
{
"userId": "uuid",
"name": "string",
"email": "string",
"role": "string",
"description": "string"
}
]
}
Configuration
Enable assignment flows:
{
"claims": {
"enableClaimAssignments": true
}
}
Choose a strategy:
{
"claims": {
"claimAssignmentMethod": "manual"
}
}
Options:
- "product_module": run your custom
getClaimAssignmentOptions
- "round_robin": auto‑assign among eligible users
- "manual": eligible users only; no default assignee
Default (when omitted): "manual".
Updated about 11 hours ago