Case
Overview
A case helps manage a pipeline from beginning to end, from a potential lead to generating unissued policies for a customer. A case can have a proposal or multiple proposals and a proposal can have an offer or multiple offers.
Example:
Peter wants to buy travel and home insurance with 2 options to choose. In CoverGo system, this situation can be handled by:
- Create a case with Peter as the holder;
- Add 2 proposals (“Proposal A” and “Proposal B”) to the case;
- Add 2 offers (one for Travel Insurance and one for Home Insurance) to each of the proposals;
- The offers in different proposals should consists of different product plans:
- In Proposal A, the offers are “Product Travel Plan 1” and “Product Home Plan 1”;
- In Proposal B, the offers are “Product Travel Plan 2” and “Product Home Plan 2”.
Fields usually used
Fields | Description |
---|---|
caseNumber | the caseNumber of the case |
createdAt | the timestamp when the case was created |
createdBy | the id of entity who create the case |
description | the description of the case |
events | a list of change events happened to the case |
fields | dynamic fields associated with the case (usually in form of json) |
holder | the entity(individual/company) who holds the case |
lastModifiedAt | the timestamp when the case was last modified |
lastModifiedBy | the id of entity who last modified the case |
name | the name of the case |
notes | a list of notes on the case |
otherHolders | a list of entities who also hold the cases |
proposal | a list of proposals associated with the case |
source | a string which provide info on any identifier defined outside CoverGo system1 |
status | the status of the case |
stakeHolders | a list of entities who are stakeHolders of the case |
1 eg. if a case is created by Agent “AAA”, input source could be "AAA".
To see a full list of fields please visit our Playground
Creating a Case
Query Examples
mutation creatCase($input: createCaseInput!) {
createCase(input: $input) {
status
createdStatus { id }
errors
}
}
Input:
{
"input": {
"name": "Demo case",
"description": "A case for demo",
"status": "created",
"holderId": "c312edca-506e-4e0c-8068-9424a5192f20",
"fields": "{\"key\":\"value\"}"
}
}
Example Result:
{
"data": {
"createCase": {
"status": "success",
"createdStatus": {
"id": "c1e3c643-085c-4e41-abfe-ba366fbbf714"
},
"errors": null
}
}
}
Querying Cases
Query Examples
query cases{
cases {
list{
caseNumber
createdAt
createdBy { id }
description
events { type timestamp }
fields
holder { id name }
id
lastModifiedAt
lastModifiedBy { id }
name
proposals {
id
policies {
id status
}
}
notes { title content }
otherHolders { id }
source
status
stakeholders { id }
}
}
}
Example Result:
{
"data": {
"cases": {
"list": [
{
"caseNumber": "8OTJAK",
"createdAt": "2021-04-28T10:26:36.738Z",
"createdBy": {
"id": "60810024052f07644d0c3495"
},
"description": "A case for demo",
"events": [
{
"type": "creation",
"timestamp": "2021-04-28T10:26:36.738Z"
},
{
"type": "addProposal",
"timestamp": "2021-04-29T00:57:24.258Z"
},
{
"type": "addOffer",
"timestamp": "2021-04-29T02:24:55.074Z"
},
{
"type": "addOffer",
"timestamp": "2021-04-29T02:26:22.765Z"
}
],
"fields": "{\"key\":\"value\"}",
"holder": {
"id": "c312edca-506e-4e0c-8068-9424a5192f20",
"name": "Harry Potter"
},
"id": "c1e3c643-085c-4e41-abfe-ba366fbbf714",
"lastModifiedAt": "2021-04-29T02:26:22.765Z",
"lastModifiedBy": {
"id": "60810024052f07644d0c3495"
},
"name": "Demo case",
"proposals": [
{
"id": "98fe72db-bc18-4ca7-9709-eacc3ae840bf",
"policies": []
}
],
"notes": [],
"otherHolders": [],
"source": null,
"status": "created",
"stakeholders": []
}
]
}
}
}
Creating Proposal
Please refer to Proposal.