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

FieldsDescription
createdAtthe timestamp when the product was created
createdBythe login of entity who created the product
changeEffectiveDatethe date when a change of product will become effective
eventsa list of change events happened to the product
internalReviewslist of reviews (status and comments) by internal staff on the product
launchPeriodStartDatethe date when the product will be launched and available to the public.
launchPeriodEndDatethe date when the product expired and become unavailable to the public.
lastModifiedAtthe timestamp when the product was last modified
lastModifiedBythe login of entity who last updated the product
lifecycleStagethe life cycle stage of the product
namelocalised name of the product visible to customers
productIdsee productId
representationitems(benefits, pricing, conditions, etc.) representation of the product in form of node tree
scriptsexecutable javascript associated with the product (eg. to calculate pricing)
statusthe current status of the product
tagsa list of tags added to describe the product
typeproductType 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.