Internal

Overview

An Internal entity represents a single internal user in the system. He/she can be internal staff of an insurer or agents, managers of branches, etc., who can manage products, cases or policies.

Example:

Could be an admin user in the CoverAdmin, broker user on a Broker Portal etc.

Fields usually used

FieldsDescription
associatedLoginthe login details of the individuals for authentication purpose
createdAtthe timestamp when the individual was created
eventsa list of change events happened to the individual
fieldsdynamic fields associated with the internal (usually in form of json)
idthe id which was automatically generated when the individual was created
notesadditional notes on the individual with tile and content
notificationslist of notifications (email, sms) sent to the individual, if any
notificationListsimilar to notifications, but with totalCount available
subscriptionslist of topics that the internal subscribed to
tagstags added to describe individuals (lead, customer…)
relationshipListlist of links between entities added by mutation.addLink

To see a full list of fields please visit our Playground

Creating an Internal

Query Examples

mutation createInternal(
  $input: createInternalInput!
) {
  createInternal(
    createInternalInput: $input
  ){
    createdStatus { id ids } 
    errors 
    status
  }
}

Input:

{
  "input":{
    "englishFirstName": "Cover Go",
    "englishLastName": "Internal",
    "email": "[email protected]",
    "fields": "{\"gender\":\"female\",\"address\":\"Unit 603, 6\/F, Tower 1, Admiralty Centre 18 Harcourt Road, Admiralty, Hong Kong\",\"phone\":\"+852 12345678\"}"
  }
}

Example Result:

{
  "data": {
    "createInternal": {
      "createdStatus": {
        "id": "655bd112-61a6-4002-81b3-96012ac92624",
        "ids": null
      },
      "errors": null,
      "status": "success"
    }
  }
}

Querying Internals

Query Examples

query internals {
  internals (where: { email:"[email protected]" }){
    list {
      associatedLogin { id username email isEmailConfirmed }
      createdAt
      events { type } 
      fields
      id
      notes { title content }
      notifications { id }
      notificationList { list {id} }
      subscriptions { id startDate endDate }
      tags
      relationshipList { list { type values { key value }} }
    }
  }
}

Results:

{
  "data": {
    "internals": {
      "list": [
        {
          "associatedLogin": null,
          "createdAt": "2021-04-30T04:52:04.574Z",
          "events": [
            {
              "type": "creation"
            },
            {
              "type": "addContact"
            }
          ],
          "fields": "{\"gender\":\"female\",\"address\":\"Unit 603, 6/F, Tower 1, Admiralty Centre 18 Harcourt Road, Admiralty, Hong Kong\",\"phone\":\"+852 12345678\"}",
          "id": "655bd112-61a6-4002-81b3-96012ac92624",
          "notes": [],
          "notifications": [],
          "notificationList": {
            "list": []
          },
          "subscriptions": [],
          "tags": null,
          "relationshipList": {
            "list": null
          }
        }
      ]
    }
  }
}

For more details on how to create login for internal, please refer to Login.