Individual

Overview

An individual represents a single person that can be customer, lead, holder and beneficiary (as defined in tags). Dynamic content of individual can be defined in fields.

Fields usually used

FieldsDescription
associatedLoginthe login details of the individual for authentication purpose
caseHolderOflist of cases which the individual associated with, if any
createdAtthe timestamp when the individual was created
eventsa list of change events happened to the individual
fieldsdynamic fields associated with the individual (usually in form of json)
holderOflist of policies which the individual holds, if any
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
preferredLanguagethe preferred language of the individual
stakeHolderslist of entities which the individual is a stakeHolder (eg. an individual can be a stakeHolder of a company)
subscriptionslist of topics that the individual 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 Individual

Query Examples

mutation createIndividual (
  $input: createIndividualInput!
){
  createIndividual(
    createIndividualInput: $input
  ){
    createdStatus { id ids } 
    errors 
    status
  }
}

Input:

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

Example Result:

{
  "data": {
    "createIndividual": {
      "createdStatus": {
        "id": "acf660e7-c2ce-40e6-9331-759ab83386be",
        "ids": null
      },
      "errors": null,
      "status": "success"
    }
  }
}

Querying Individuals

Query Examples

query individual {
  individuals {
    list {
      name
      acceptsMarketing
      associatedLogin { id username email isEmailConfirmed }
      caseHolderOf { id name } 
      createdAt
      events { type } 
      fields
      holderOf { id }
      id
      notes { title content }
      notifications { id }
      notificationList { list {id} }
      preferredLanguage
      stakeholders { entity { id name }}
      subscriptions { id startDate endDate }
      tags
      relationshipList { list { type values { key value }} }
    }
  }
}

Example Result:

{
  "data": {
    "individuals": {
      "list": [
        {
          "name": "Cover Go",
          "acceptsMarketing": null,
          "associatedLogin": null,
          "caseHolderOf": [],
          "createdAt": "2021-04-30T04:43:51.809Z",
          "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\"}",
          "holderOf": [],
          "id": "acf660e7-c2ce-40e6-9331-759ab83386be",
          "notes": [],
          "notifications": [],
          "notificationList": {
            "list": []
          },
          "preferredLanguage": null,
          "stakeholders": null,
          "subscriptions": [],
          "tags": [
            "lead"
          ],
          "relationshipList": {
            "list": null
          }
        }
      ]
    }
  }
}

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