Policy

Overview

If the customer satisfies with the Offers in Proposal and would like to proceed in purchasing the Products, a policy should be created.


Fields usually used

FieldsDescription
createdAtthe timestamp when the policy was created
createdBythe login of entity who created the policy
endDatethe time when the policy ends
eventsa list of change events happened to the policy
fieldsdynamic fields hosting information associated to policy in json format
idunique identifier of the policy
isIssueda boolean indicating whether the policy is issued or not
lastModifiedAtthe timestamp when the product was last modified
lastModifiedBythe login of entity who last updated the product
pricinginformation on pricing, which is the result of execution of pricing scripts
proposalthe proposal which holds the offer which the policy is generated from
productthe product which the policy is generated from
startDatethe time when the policy starts

To see a full list of fields please visit our Playground

Generate Policy from Proposal

Query Examples

mutation generatePoliciesFromProposal(
  $proposalId:String!
  $caseId:String!
) {
  generatePoliciesFromProposal(
    proposalId:$proposalId
    caseId:$caseId
  ){
    createdStatus { id } 
    status 
    errors
  }
}

Input:

{
  "proposalId": "cb65696e-9aed-4cad-85fa-cac8add15082",
  "caseId": "3f837089-99e4-4738-9852-6961393b0a7b"
}

Example Result:

{
  "data": {
    "generatePoliciesFromProposal": {
      "createdStatus": {
        "id": null
      },
      "status": "success",
      "errors": null
    }
  }
}

The mutation generatePoliciesFromProposal will generate a new policy for every single offer in the proposal.

Issue Policy

Successful generation of policy doesn't mean the policy is issued. The policy (similar to a partially executed contract) is still penidng confirmation by the customer, as well as payment. After customer's confirmation and successful payments, mutation issuePolicy can be called to issue the final policy.

Query Examples

mutation issuePolicy(
  $policyId:String!
){
  issuePolicy(
    policyId:$policyId
  ){
    status 
    policyStatus { status } 
    errors
  }
}

Input:

{
  "policyId": "5ae746e5-a0f3-4839-bc53-f13d511c8e7d"
}

Example Result:

{
  "data": {
    "issuePolicy": {
      "status": "success",
      "policyStatus": null,
      "errors": null
    }
  }
}

Renew Policy

For renewing an existing policy, please refer to Policy Renewal.