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:

  1. Create a case with Peter as the holder;
  2. Add 2 proposals (“Proposal A” and “Proposal B”) to the case;
  3. Add 2 offers (one for Travel Insurance and one for Home Insurance) to each of the proposals;
  4. 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

FieldsDescription
caseNumberthe caseNumber of the case
createdAtthe timestamp when the case was created
createdBythe id of entity who create the case
descriptionthe description of the case
eventsa list of change events happened to the case
fieldsdynamic fields associated with the case (usually in form of json)
holderthe entity(individual/company) who holds the case
lastModifiedAtthe timestamp when the case was last modified
lastModifiedBythe id of entity who last modified the case
namethe name of the case
notesa list of notes on the case
otherHoldersa list of entities who also hold the cases
proposala list of proposals associated with the case
sourcea string which provide info on any identifier defined outside CoverGo system1
statusthe status of the case
stakeHoldersa 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.