Product
Overview
In the insurance domain, product is an insurance product provided by an insurer where an insurer undertakes to pay/indemnify anothers loss from certain specified risks; or to pay/grant specified amount of benefits or debt.
Product serves as the template for potential policies.
Fields usually used
Fields | Description |
---|---|
createdAt | the timestamp when the product was created |
createdBy | the login of entity who created the product |
changeEffectiveDate | the date when a change of product will become effective |
events | a list of change events happened to the product |
internalReviews | list of reviews (status and comments) by internal staff on the product |
launchPeriodStartDate | the date when the product will be launched and available to the public. |
launchPeriodEndDate | the date when the product expired and become unavailable to the public. |
lastModifiedAt | the timestamp when the product was last modified |
lastModifiedBy | the login of entity who last updated the product |
lifecycleStage | the life cycle stage of the product |
name | localised name of the product visible to customers |
productId | see productId |
representation | items(benefits, pricing, conditions, etc.) representation of the product in form of node tree |
scripts | executable javascript associated with the product (eg. to calculate pricing) |
status | the current status of the product |
tags | a list of tags added to describe the product |
type | productType containing with fields like code, name, description, typeId, etc |
To see a full list of fields please visit our Playground
ProductId
ProductId is the unique identifier of the product, which comprise of 3 fields: type
, plan
, version
.
Example:
productId = { "type": "Travel Insurance", "plan": "Plan 1", "version": "1.0"}
Create Product
Query Examples
mutation createProduct($product: createProductInput!){
createProduct(product:$product) {
status
productId {
type
plan
version
}
}
}
Input:
{
"product": {
"changeEffectiveDate": "2021-05-01T00:00:00.000Z",
"launchPeriodStartDate": "2021-05-01T00:00:00.000Z",
"launchPeriodEndDate": "2022-05-01T00:00:00.000Z",
"lifecycleStage": "Review",
"productId": { "type": "Demo Insurance", "version":"1", "plan":"Demo Insurance Plan 1" },
"status": "Pending",
"tags": { "type": "Demo Tag Type" }
}
}
Example Result:
{
"data": {
"createProduct": {
"status": "Review",
"productId": {
"type": "Demo Insurance",
"plan": "Demo Insurance Plan 1",
"version": "1"
}
}
}
}
Querying Products
Query Examples
query products {
products_2 {
list{
createdAt
createdBy { id }
changeEffectiveDate
events { type }
internalReviews { status comment }
launchPeriodStartDate
launchPeriodEndDate
lastModifiedAt
lastModifiedBy { id }
lifecycleStage
name
productId { plan type version }
representation
scripts { id }
tags { type description }
status
type { code name }
}
}
}
Example Result:
{
"data": {
"products_2": {
"list": [
{
"createdAt": "2021-04-29T02:07:28.894Z",
"createdBy": {
"id": "60810024052f07644d0c3495"
},
"changeEffectiveDate": "2021-05-01",
"events": [
{
"type": "creation"
}
],
"internalReviews": null,
"launchPeriodStartDate": "2021-05-01",
"launchPeriodEndDate": "2022-05-01",
"lastModifiedAt": "2021-04-29T02:07:28.894Z",
"lastModifiedBy": {
"id": "60810024052f07644d0c3495"
},
"lifecycleStage": "",
"name": null,
"productId": {
"plan": "Demo Insurance Plan 1",
"type": "Demo Insurance",
"version": "1"
},
"representation": null,
"scripts": [],
"tags": [
{
"type": "Demo Tag Type",
"description": null
}
],
"status": "Pending",
"type": null
}
]
}
}
}
About Pricing
Pricing (including but not limited to information such as original price, total premium, levies, etc.) are calculated using Products' representation
and scripts
. For more information, please refer to Scripts.