GraphQLRepositoriesentityHealth
entities.entityHealth
Read entity health records with the entityHealth repository, and change them with the entity health mutations. Same records as the REST EntityHealths entity.
Queries
Fields of entities { entityHealth { … } }.
| Kind | Field | Returns |
|---|---|---|
| QUERY | getById(entityId: ID!)Returns the record with the given id, or null when there is none. Deleted records are returned as well. | EntityHealthEntity |
| QUERY | getByIds(entityIds: [ID!]!)Returns the records with the given ids; ids without a record are left out. Deleted records are returned as well. | [EntityHealthEntity!]! |
| QUERY | getAll(limit: Int, offset: Int, filter: EntityHealthFilterInput, orderBy: [EntityHealthOrderByInput!], includeDeleted: Boolean)Returns the records that match the filter, paged with limit and offset. | [EntityHealthEntity!]! |
| QUERY | getByCriteria(filter: EntityHealthFilterInput, orderBy: [EntityHealthOrderByInput!], includeDeleted: Boolean, before: String, after: String, first: Int, last: Int)Returns the records that match the filter as a cursor-paginated connection. | EntityHealthEntityConnection |
| QUERY | getChangedFieldsSinceRevision(id: UUID!, revision: Int!)Returns the ids of the fields of a record that changed after the given revision. Returns an empty list for entities without change tracking. | [UUID!]! |
| QUERY | getByTypeId(typeId: UUID!, strict: Boolean)Returns the account health configuration for the given account type. | EntityHealthEntity! |
Mutations
| Kind | Mutation | Does | Returns |
|---|---|---|---|
| MUTATION | updateEntityHealth(input: UpdateEntityHealthInput!, validationLevel: [ValidationLevel!], sessionIdToUpdate: String) | Update fields | UpdateEntityHealthPayload |
Types
The types this repository uses, each with its fields and their descriptions. Types several repositories share, such as PageInfo and the filter fields, are in the types index.
EntityHealthEntity object 14 fields: isDeleteProtected, id, isDeleted, …
Health configuration of an account type, defining when accounts of that type are healthy or in critical health.
| Field | Type | Description |
|---|---|---|
isDeleteProtected | Boolean! | True when the record is protected against deletion because it must always exist in the space. Deleting a record that is not protected can still fail on other checks. Read-only. |
id | ID! | Unique identifier of entity. |
isDeleted | Boolean | Specifies if the entity is considered deleted. |
modified | DateTime | Last modification time. |
created | DateTime | Creation time. |
type | AccountTypeEntity | Account type this health configuration applies to. |
entityType | BaseEntityTypeEnum! | Entity whose records the health configuration evaluates; currently always Account. Read-only. |
isEnabled | Boolean! | When false, health is configured but not evaluated for records of this type. |
lastRecalculation | DateTime | Timestamp of the last full health recalculation across all matching records. |
typeId | ID! | Id of the account type. |
revision | Int | Revision when entity was lastly changed. |
settings | EntityHealthSettings! | Health configuration: indicator filter definitions for healthy and critical-health states. Stored as a versioned JSON document; updates create a new history entry. |
calculationProgress | Int | Progress of the in-flight health recalculation as a percentage (0-100). Null when no recalculation has been queued. |
instancePermissions | [EntityPermsEnum!]! (1 args) | Permissions the current user has on this record, out of the requested ones. |
EntityHealthEntityConnection object pageInfo: PageInfo!, edges: [EntityHealthEntityEdge]!, totalCount: Int
Paginated list of EntityHealth records.
| Field | Type | Description |
|---|---|---|
pageInfo | PageInfo! | Pagination data for this connection. |
edges | [EntityHealthEntityEdge]! | Contains the nodes in this connection. |
totalCount | Int | Total number of items in the connection. |
EntityHealthEntityEdge object node: EntityHealthEntity, cursor: String!
A Relay edge containing a EntityHealthEntity and its cursor.
| Field | Type | Description |
|---|---|---|
node | EntityHealthEntity | The item at the end of the edge |
cursor | String! | A cursor for use in pagination |
EntityHealthFilterInput input AND, OR, NOT, globalSearchQuery, one condition per field
Filter conditions for EntityHealth records. Conditions on different fields are combined with AND; use OR, AND and NOT for other combinations.
| Input field | Type | Description |
|---|---|---|
OR | [EntityHealthFilterInput!] | Matches records that meet at least one of the listed filters. |
AND | [EntityHealthFilterInput!] | Matches records that meet all of the listed filters. |
NOT | EntityHealthFilterInput | Matches records that do not meet this filter. |
globalSearchQuery | String | Search term matched against the fields that the global search covers for this entity. |
id | EntityFilterStringField | Unique identifier of entity. |
isDeleted | Boolean | Specifies if the entity is considered deleted. |
modified | EntityFilterDateTimeField | Last modification time. |
created | EntityFilterDateTimeField | Creation time. |
entityType | BaseEntityTypeEnumFilterInput | Entity whose records the health configuration evaluates; currently always Account. Read-only. |
isEnabled | Boolean | When false, health is configured but not evaluated for records of this type. |
lastRecalculation | EntityFilterDateTimeField | Timestamp of the last full health recalculation across all matching records. |
typeId | EntityFilterStringField | Id of the account type. |
revision | EntityFilterNumberField | Revision when entity was lastly changed. |
type | AccountTypeFilterInput | Account type this health configuration applies to. Matches records where a related record meets these conditions. |
EntityHealthOrderByInput input Asc or Desc per field
Sorting of EntityHealth records. Set exactly one field in each item; list several items to sort by more fields, in order of priority.
| Input field | Type | Description |
|---|---|---|
id | OrderByEnum | Unique identifier of entity. |
isDeleted | OrderByEnum | Specifies if the entity is considered deleted. |
modified | OrderByEnum | Last modification time. |
created | OrderByEnum | Creation time. |
type | [AccountTypeOrderByNestedInput!] | Account type this health configuration applies to. Sorts by fields of the related record, listed in order of priority. |
isEnabled | OrderByEnum | When false, health is configured but not evaluated for records of this type. |
lastRecalculation | OrderByEnum | Timestamp of the last full health recalculation across all matching records. |
typeId | OrderByEnum | Id of the account type. |
revision | OrderByEnum | Revision when entity was lastly changed. |
UpdateEntityHealthInput input 9 fields: clientMutationId, id, modified, …
Id of an EntityHealth record and the field values to change.
| Input field | Type | Description |
|---|---|---|
clientMutationId | String | Optional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention). |
id | ID! | Unique identifier of entity. |
modified | DateTime | Last modification time. |
created | DateTime | Creation time. |
isEnabled | Boolean | When false, health is configured but not evaluated for records of this type. |
lastRecalculation | DateTime | Timestamp of the last full health recalculation across all matching records. |
typeId | ID | Id of the account type. |
revision | Int | Revision when entity was lastly changed. |
settings | EntityHealthSettingsJSONString | Health configuration: indicator filter definitions for healthy and critical-health states. Stored as a versioned JSON document; updates create a new history entry. |
UpdateEntityHealthPayload object entityHealth: EntityHealthEntity, clientMutationId: String
Result of the updateEntityHealth mutation.
| Field | Type | Description |
|---|---|---|
entityHealth | EntityHealthEntity | The updated record. |
clientMutationId | String | Optional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention). |
EntityHealthCalculationTypeEnum enum Manual, Priority
How the scores of health indicators are combined into a record's health score.
| Value | Description |
|---|---|
Manual | Each indicator uses the score configured on it. |
Priority | Scores are derived from the order of the indicators; earlier indicators weigh more. |
EntityHealthFieldConfiguration object filterMainBox: EntityHealthMainFilterBox!, filterSiblingBoxes: [EntityHealthFilterBox!]!
Set of health indicator rules: rules on the record itself and rules on its related records.
| Field | Type | Description |
|---|---|---|
filterMainBox | EntityHealthMainFilterBox! | Indicator rules evaluated directly on the scored entity. |
filterSiblingBoxes | [EntityHealthFilterBox!]! | Additional rule boxes evaluated on related records, each tied to a relation from the scored entity. |
EntityHealthFilterBox object 5 fields: id, entity, lookupFieldId, …
Group of health indicator rules evaluated on a record related to the scored record.
| Field | Type | Description |
|---|---|---|
id | String! | Unique identifier of the filter box. |
entity | String! | Related entity type the indicator rules in this box are evaluated on. |
lookupFieldId | UUID | Lookup field that connects the scored entity to the related record this box evaluates. |
relation | HardCodedRelation | Predefined relationship to the related record this box evaluates, such as the next scheduled or last finished activity. |
filterFields | [EntityHealthFieldFilterRule!]! | Health indicator rules evaluated on the related record. |
EntityHealthMainFilterBox object id: String!, entity: String!, lookupFieldId: UUID, filterFields: [EntityHealthFieldFilterRule!]!
Group of health indicator rules evaluated on the scored record itself.
| Field | Type | Description |
|---|---|---|
id | String! | Unique identifier of the filter box. |
entity | String! | Entity type the indicator rules in this box are evaluated on. |
lookupFieldId | UUID | When the box evaluates a related record, the lookup field that connects this entity to that record. |
filterFields | [EntityHealthFieldFilterRule!]! | Health indicator rules evaluated directly on the scored entity. |
EntityHealthSettings object categories: [HealthCategory!]!, calculationType: EntityHealthCalculationTypeEnum!, healthIndicators: EntityHealthFieldConfiguration!, criticalHealthIndicators: EntityHealthFieldConfiguration!
Configuration of a health score: categories, how the score is calculated and the indicator rules.
| Field | Type | Description |
|---|---|---|
categories | [HealthCategory!]! | Health categories that group records by score range (for example Good, Watch, Critical). |
calculationType | EntityHealthCalculationTypeEnum! | How indicator scores are combined. Manual uses the score configured on each indicator; Priority derives scores from the order of the indicators. |
healthIndicators | EntityHealthFieldConfiguration! | Indicator rules that contribute positive or negative points to the health score. |
criticalHealthIndicators | EntityHealthFieldConfiguration! | Indicator rules that force the record into the critical category when they match. |
FilterBoxInterface interface id: String!, entity: String!, lookupFieldId: UUID
Group of filter conditions evaluated on one record type.
| Field | Type | Description |
|---|---|---|
id | String! | Identifier of this filter box within the filter tab. |
entity | String! | Name of the record type whose fields the conditions in this box are evaluated against. |
lookupFieldId | UUID | Identifier of the lookup field that connects this box to the main record type when the box filters a related record reached through a lookup. |
HardCodedRelation object kind: SiblingRelationType!
Predefined relation that links a filter box to the filtered records.
| Field | Type | Description |
|---|---|---|
kind | SiblingRelationType! | Predefined relationship that links this filter box to the main record type (for example Primary, Aggregation, NextScheduledActivity). |
HealthCategory object 5 fields: id, label, useLang, …
Health category, such as Good or Critical: a score range with its label and color.
| Field | Type | Description |
|---|---|---|
id | UUID! | Unique identifier of the health category. |
label | String! | Display name of the health category (for example Good, Watch, Critical). |
useLang | Boolean! | When true, the label is treated as a translation key and localized in the UI; otherwise the literal label text is shown. |
value | Int! | Upper health-score threshold of this category. A record falls into the category whose threshold its score does not exceed. The critical category uses -1. |
color | Int! | Color used to render this category in the UI, encoded as an integer. |
SiblingRelationType enum NoRelation, Custom, Aggregation, LastFinishedActivity, NextScheduledActivity, Primary, … (15 values)
Predefined relationship that selects which related records of another type a report box or filter box uses for each main record.
| Value | Description |
|---|---|
NoRelation | No predefined relationship is set. |
Custom | Reserved for a user-defined relationship; not supported. |
Aggregation | Values of all related records are combined into one value per main record. |
LastFinishedActivity | The related activity that was finished most recently. |
NextScheduledActivity | The next upcoming related activity. |
Primary | The primary related record, such as the primary account or contact; for quotes of an opportunity, the active quote. |
NextOpenOpportunity | Reserved for the next open opportunity; not supported. |
LastWonOpportunity | Reserved for the most recently won opportunity; not supported. |
LastLostOpportunity | Reserved for the most recently lost opportunity; not supported. |
LastOnlineFormResponse | The most recently created related online form response. |
LastNote | The most recently created related note. |
LastMessage | The most recent related message. |
LastActivityComment | The most recent comment on the activity. |
All | Every related record; the main record appears once per related record. |
Sender | The account, contact or user who sent the email. |