Proposal

Overview

Proposal consists of one or multiple offers (ie. products) for customer to choose.

Example:

A customer requests quotations of Travel Insurance and there are 3 Travel Insurance Plans available. 3 proposals with different Travel Insurance Plan (in the basket field) could be created.

Fields usually used

FieldsDescription
basketa list of offers (which each of them represent an offer) that are included in the proposal
createdAtthe timestamp when the proposal was created
createdBythe id of entity who create the proposal
idthe id automatically generated by the system when the proposal was created
lastModifiedAtthe timestamp when the proposal was last modified
lastModifiedBythe id of entity who last modified the proposal
namethe name of the proposal
notesa list of notes on the proposal
proposalNumbera string indicating the proposalNumber of the proposal for reference
stakeHoldersa list of entities (individual or company) who are stakeHolders of the proposal
statusthe status of the proposal
transactionsa list of transactions related to the proposal

To see a full list of fields please visit our Playground

Add Proposal to Case

Query Examples

mutation addProposalToCase(
  $caseId:String!
  $input:addProposalInput!
) {
  addProposal(
    caseId: $caseId
    input: $input
  ) {
    status 
    createdStatus { id } 
    errors
  }
}

Input:

{
  "caseId": "c1e3c643-085c-4e41-abfe-ba366fbbf714",
  "input": {
    "name": "Demo Proposal",
    "status": "Created",
    "expiryDate": "2022-04-28T10:26:36.738Z"
  }
}

Example Result:

{
  "data": {
    "addProposal": {
      "status": "success",
      "createdStatus": {
        "id": "98fe72db-bc18-4ca7-9709-eacc3ae840bf"
      },
      "errors": null
    }
  }
}

Querying Proposal of a Case

Query Examples

query prposalOfCase(
  $caseWhere:caseWhere
  $proposalWhere:proposalWhere
) {
  cases (where:$caseWhere){
    list{
      proposals (where: $proposalWhere) {
        basket { id }
        createdAt
        createdBy { id }
        id
        lastModifiedAt
        lastModifiedBy { id }
        name
        notes { title content }
        proposalNumber
        stakeholders { id }
        status
        transactions { id }
      }
    }
  }
}

Input:

{
  "caseWhere": { "id": "c1e3c643-085c-4e41-abfe-ba366fbbf714"},
  "proposalWhere": { "id": "98fe72db-bc18-4ca7-9709-eacc3ae840bf" }
}

Example Result:

{
  "data": {
    "cases": {
      "list": [
        {
          "proposals": [
            {
              "basket": [],
              "createdAt": "2021-04-29T00:57:24.258Z",
              "createdBy": {
                "id": "60810024052f07644d0c3495"
              },
              "id": "98fe72db-bc18-4ca7-9709-eacc3ae840bf",
              "lastModifiedAt": "2021-04-29T00:57:24.258Z",
              "lastModifiedBy": {
                "id": "60810024052f07644d0c3495"
              },
              "name": "Demo Proposal",
              "notes": null,
              "proposalNumber": "NOF8ZO",
              "stakeholders": null,
              "status": "Created",
              "transactions": []
            }
          ]
        }
      ]
    }
  }
}

Adding Offer

Please refer to Offer.