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
Fields | Description |
---|---|
createdAt | the timestamp when the policy was created |
createdBy | the login of entity who created the policy |
endDate | the time when the policy ends |
events | a list of change events happened to the policy |
fields | dynamic fields hosting information associated to policy in json format |
id | unique identifier of the policy |
isIssued | a boolean indicating whether the policy is issued or not |
lastModifiedAt | the timestamp when the product was last modified |
lastModifiedBy | the login of entity who last updated the product |
pricing | information on pricing, which is the result of execution of pricing scripts |
proposal | the proposal which holds the offer which the policy is generated from |
product | the product which the policy is generated from |
startDate | the 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.