---
title: entities.entityScoring
description: Read entity scoring records with the entityScoring repository, and change them with the entity scoring mutations. Same records as the REST EntityScorings entity.
canonical: https://developers.coevera.com/reference/graphql/entity-scoring/
section: graphql
verification: schema
generatedFrom: schema f155746 (2026-10-20)
publisher: Coevera
---

# entities.entityScoring

Read entity scoring records with the entityScoring repository, and change them with the entity scoring mutations. Same records as the REST EntityScorings entity.

REST: [EntityScorings](https://developers.coevera.com/reference/rest/entity-scorings.md).

## Queries

- `getById(entityId: ID!): EntityScoringEntity` Returns the record with the given id, or null when there is none. Deleted records are returned as well.
- `getByIds(entityIds: [ID!]!): [EntityScoringEntity!]!` Returns the records with the given ids; ids without a record are left out. Deleted records are returned as well.
- `getAll(limit: Int, offset: Int, filter: EntityScoringFilterInput, orderBy: [EntityScoringOrderByInput!], includeDeleted: Boolean): [EntityScoringEntity!]!` Returns the records that match the filter, paged with limit and offset.
- `getByCriteria(filter: EntityScoringFilterInput, orderBy: [EntityScoringOrderByInput!], includeDeleted: Boolean, before: String, after: String, first: Int, last: Int): EntityScoringEntityConnection` Returns the records that match the filter as a cursor-paginated connection.
- `getChangedFieldsSinceRevision(id: UUID!, revision: Int!): [UUID!]!` Returns the ids of the fields of a record that changed after the given revision. Returns an empty list for entities without change tracking.
- `getRecalculationStatus(entityType: BaseEntityTypeEnum!): EntityScoringRecalculationStatus!` Returns the progress of the score recalculation for the given record type and when scores were last recalculated. Both values are null when no scoring is enabled for the type.
- `getByEntityType(entityType: BaseEntityTypeEnum!): [EntityScoringEntity!]!` Returns the scoring definitions for the given record type, in their configured order.

## Mutations

- `createEntityScoring(input: CreateEntityScoringInput!, validationLevel: [ValidationLevel!]): CreateEntityScoringPayload` Create one record.
- `updateEntityScoring(input: UpdateEntityScoringInput!, validationLevel: [ValidationLevel!], sessionIdToUpdate: String): UpdateEntityScoringPayload` Update fields.
- `bulkUpdateEntityScoring(input: [CreateOrUpdateEntityScoringInput!]!, deleteInput: [DeleteEntityScoringInput!], validationLevel: [ValidationLevel!], rollbackMethod: RollbackMethod, match: MatchingInput): BulkUpdateEntityScoringPayload` Create or update many; per-item results.
- `deleteEntityScoring(input: DeleteEntityScoringInput!): DeleteEntityScoringPayload` Soft-delete.

## Types

### EntityScoringEntity (object)

Lead scoring configuration: rules that give leads a score, so that the most promising ones stand out.

- `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.
- `entityType: BaseEntityTypeEnum!` Entity whose records the scoring configuration scores; currently only Lead is supported. Set on create and cannot be changed.
- `isEnabled: Boolean!` When false, the scoring configuration is defined but not evaluated for records.
- `name: String!` Name of the entity and its default text representation.
- `settings: EntityScoringSettings!` Entity scoring definition in json format. This payload conforms to the `EntityScoringSettings` JSON Schema: GET /api/v100/rest/schemas/EntityScoringSettings.json on your region's API host
- `sortOrder: Int!` Position of this scoring configuration among others for the same entity type. Configurations are evaluated in this order until one matches.
- `useLang: Boolean` When true, the configuration name is treated as a translation key and localized in the UI; otherwise the literal name is shown.
- `revision: Int` Revision when entity was lastly changed.
- `instancePermissions: [EntityPermsEnum!]! (1 args)` Permissions the current user has on this record, out of the requested ones.

### EntityScoringEntityConnection (object)

Paginated list of EntityScoring records.

- `pageInfo: PageInfo!` Pagination data for this connection.
- `edges: [EntityScoringEntityEdge]!` Contains the nodes in this connection.
- `totalCount: Int` Total number of items in the connection.

### EntityScoringEntityEdge (object)

A Relay edge containing a `EntityScoringEntity` and its cursor.

- `node: EntityScoringEntity` The item at the end of the edge
- `cursor: String!` A cursor for use in pagination

### EntityScoringFilterInput (input)

Filter conditions for EntityScoring records. Conditions on different fields are combined with AND; use OR, AND and NOT for other combinations.

- `OR: [EntityScoringFilterInput!]` Matches records that meet at least one of the listed filters.
- `AND: [EntityScoringFilterInput!]` Matches records that meet all of the listed filters.
- `NOT: EntityScoringFilterInput` 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 scoring configuration scores; currently only Lead is supported. Set on create and cannot be changed.
- `isEnabled: Boolean` When false, the scoring configuration is defined but not evaluated for records.
- `name: EntityFilterStringField` Name of the entity and its default text representation.
- `sortOrder: EntityFilterNumberField` Position of this scoring configuration among others for the same entity type. Configurations are evaluated in this order until one matches.
- `useLang: Boolean` When true, the configuration name is treated as a translation key and localized in the UI; otherwise the literal name is shown.
- `revision: EntityFilterNumberField` Revision when entity was lastly changed.

### EntityScoringOrderByInput (input)

Sorting of EntityScoring records. Set exactly one field in each item; list several items to sort by more fields, in order of priority.

- `id: OrderByEnum` Unique identifier of entity.
- `isDeleted: OrderByEnum` Specifies if the entity is considered deleted.
- `modified: OrderByEnum` Last modification time.
- `created: OrderByEnum` Creation time.
- `isEnabled: OrderByEnum` When false, the scoring configuration is defined but not evaluated for records.
- `name: OrderByEnum` Name of the entity and its default text representation.
- `sortOrder: OrderByEnum` Position of this scoring configuration among others for the same entity type. Configurations are evaluated in this order until one matches.
- `useLang: OrderByEnum` When true, the configuration name is treated as a translation key and localized in the UI; otherwise the literal name is shown.
- `revision: OrderByEnum` Revision when entity was lastly changed.

### CreateEntityScoringInput (input)

Field values of a new EntityScoring 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).
- `modified: DateTime` Last modification time.
- `created: DateTime` Creation time.
- `entityType: BaseEntityTypeEnum!` Entity whose records the scoring configuration scores; currently only Lead is supported. Set on create and cannot be changed.
- `isEnabled: Boolean!` When false, the scoring configuration is defined but not evaluated for records.
- `name: String!` Name of the entity and its default text representation.
- `settings: EntityScoringSettingsJSONString!` Entity scoring definition in json format. This payload conforms to the `EntityScoringSettings` JSON Schema: GET /api/v100/rest/schemas/EntityScoringSettings.json on your region's API host
- `sortOrder: Int!` Position of this scoring configuration among others for the same entity type. Configurations are evaluated in this order until one matches.
- `useLang: Boolean` When true, the configuration name is treated as a translation key and localized in the UI; otherwise the literal name is shown.
- `revision: Int` Revision when entity was lastly changed.

### CreateOrUpdateEntityScoringInput (input)

Field values of an EntityScoring record to create, or to update when its id is set.

- `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.
- `entityType: BaseEntityTypeEnum` Entity whose records the scoring configuration scores; currently only Lead is supported. Set on create and cannot be changed.
- `isEnabled: Boolean` When false, the scoring configuration is defined but not evaluated for records.
- `name: String` Name of the entity and its default text representation.
- `settings: EntityScoringSettingsJSONString` Entity scoring definition in json format. This payload conforms to the `EntityScoringSettings` JSON Schema: GET /api/v100/rest/schemas/EntityScoringSettings.json on your region's API host
- `sortOrder: Int` Position of this scoring configuration among others for the same entity type. Configurations are evaluated in this order until one matches.
- `useLang: Boolean` When true, the configuration name is treated as a translation key and localized in the UI; otherwise the literal name is shown.
- `revision: Int` Revision when entity was lastly changed.

### DeleteEntityScoringInput (input)

Id of the EntityScoring record to delete.

- `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.

### UpdateEntityScoringInput (input)

Id of an EntityScoring record and the field values to change.

- `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, the scoring configuration is defined but not evaluated for records.
- `name: String` Name of the entity and its default text representation.
- `settings: EntityScoringSettingsJSONString` Entity scoring definition in json format. This payload conforms to the `EntityScoringSettings` JSON Schema: GET /api/v100/rest/schemas/EntityScoringSettings.json on your region's API host
- `sortOrder: Int` Position of this scoring configuration among others for the same entity type. Configurations are evaluated in this order until one matches.
- `useLang: Boolean` When true, the configuration name is treated as a translation key and localized in the UI; otherwise the literal name is shown.
- `revision: Int` Revision when entity was lastly changed.

### BulkUpdateEntityScoringPayload (object)

Result of the bulkUpdateEntityScoring mutation.

- `result: BulkUpdateResults!` Ids of the created, updated and deleted records, and the items that failed.

### CreateEntityScoringPayload (object)

Result of the createEntityScoring mutation.

- `entityScoring: EntityScoringEntity` The created 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).

### DeleteEntityScoringPayload (object)

Result of the deleteEntityScoring mutation.

- `entityScoring: EntityScoringEntity` The deleted 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).

### UpdateEntityScoringPayload (object)

Result of the updateEntityScoring mutation.

- `entityScoring: EntityScoringEntity` 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).

### EntityScoringActivityRule (object)

Scoring rule that awards points for activities of a record with a given status.

- `id: UUID!` Unique identifier of the scoring rule.
- `isEnabled: Boolean!` When false, the rule is configured but does not contribute to the score.
- `name: String!` Display name of the scoring rule.
- `useLang: Boolean!` When true, the name is treated as a translation key and localized in the UI; otherwise the literal name text is shown.
- `expiration: Int!` How long the points awarded by this rule remain in effect, measured in expirationUnit. Applies only when expirationEnabled is true.
- `expirationUnit: EntityScoringRuleExpirationUnitEnum!` Time unit for the expiration value: hour, day, week, or month.
- `expirationEnabled: Boolean!` When true, the points awarded by this rule expire after the configured expiration period; when false, they remain indefinitely.
- `score: Int!` Points added to (or, when negative, subtracted from) the record score each time the rule matches.
- `scoreMultiplier: Boolean!` When true, the score is multiplied by a per-record factor instead of being added as a fixed amount.
- `conditions: EntityScoringRuleFilter!` Filter conditions a record must satisfy for the rule to award its score.
- `activityStatus: ActivityStatusEnum!` Activity status that triggers the rule, such as a scheduled or completed activity.

### EntityScoringEmailRule (object)

Scoring rule that changes the score of a record when an email event happens for it, such as an email being opened, clicked or replied to.

- `id: UUID!` Unique identifier of the scoring rule.
- `isEnabled: Boolean!` When false, the rule is configured but does not contribute to the score.
- `name: String!` Display name of the scoring rule.
- `useLang: Boolean!` When true, the name is treated as a translation key and localized in the UI; otherwise the literal name text is shown.
- `expiration: Int!` How long the points awarded by this rule remain in effect, measured in expirationUnit. Applies only when expirationEnabled is true.
- `expirationUnit: EntityScoringRuleExpirationUnitEnum!` Time unit for the expiration value: hour, day, week, or month.
- `expirationEnabled: Boolean!` When true, the points awarded by this rule expire after the configured expiration period; when false, they remain indefinitely.
- `score: Int!` Points added to (or, when negative, subtracted from) the record score each time the rule matches.
- `scoreMultiplier: Boolean!` When true, the score is multiplied by a per-record factor instead of being added as a fixed amount.
- `conditions: EntityScoringRuleFilter!` Filter conditions a record must satisfy for the rule to award its score.
- `emailEventType: EntityScoringRuleEmailEventTypeEnum!` Email event that triggers the rule: sent, opened, clicked, replied, bounced, or unsubscribed.

### EntityScoringFieldRule (object)

Scoring rule that awards points when the field values of a record match its conditions.

- `id: UUID!` Unique identifier of the scoring rule.
- `isEnabled: Boolean!` When false, the rule is configured but does not contribute to the score.
- `name: String!` Display name of the scoring rule.
- `useLang: Boolean!` When true, the name is treated as a translation key and localized in the UI; otherwise the literal name text is shown.
- `expiration: Int!` How long the points awarded by this rule remain in effect, measured in expirationUnit. Applies only when expirationEnabled is true.
- `expirationUnit: EntityScoringRuleExpirationUnitEnum!` Time unit for the expiration value: hour, day, week, or month.
- `expirationEnabled: Boolean!` When true, the points awarded by this rule expire after the configured expiration period; when false, they remain indefinitely.
- `score: Int!` Points added to (or, when negative, subtracted from) the record score each time the rule matches.
- `scoreMultiplier: Boolean!` When true, the score is multiplied by a per-record factor instead of being added as a fixed amount.
- `conditions: EntityScoringRuleFilter!` Filter conditions a record must satisfy for the rule to award its score.
- `scoreMultiplierFieldId: UUID` Numeric field whose value is used as the multiplier when scoreMultiplier is true.

### EntityScoringRecalculationStatus (object)

Progress of the score recalculation of a record type, and when scores were last recalculated.

- `lastRecalculation: DateTime` When the scores were last recalculated; null when no scoring is enabled for the record type.
- `calculationProgress: Int` Progress of the running recalculation in percent (0-100); null when nothing is queued.

### EntityScoringRule (interface)

Rule of a scoring that adds points to the score of a record, or subtracts them, when the record matches it.

- `id: UUID!` Unique identifier of the scoring rule.
- `isEnabled: Boolean!` When false, the rule is configured but does not contribute to the score.
- `name: String!` Display name of the scoring rule.
- `useLang: Boolean!` When true, the name is treated as a translation key and localized in the UI; otherwise the literal name text is shown.
- `expiration: Int!` How long the points awarded by this rule remain in effect, measured in expirationUnit. Applies only when expirationEnabled is true.
- `expirationUnit: EntityScoringRuleExpirationUnitEnum!` Time unit for the expiration value: hour, day, week, or month.
- `expirationEnabled: Boolean!` When true, the points awarded by this rule expire after the configured expiration period; when false, they remain indefinitely.
- `score: Int!` Points added to (or, when negative, subtracted from) the record score each time the rule matches.
- `scoreMultiplier: Boolean!` When true, the score is multiplied by a per-record factor instead of being added as a fixed amount.
- `conditions: EntityScoringRuleFilter!` Filter conditions a record must satisfy for the rule to award its score.

### EntityScoringRuleEmailEventTypeEnum (enum)

Email event that makes a scoring rule add or subtract points.

- `Sent` An email was sent to the record.
- `Opened` The recipient opened an email.
- `Clicked` The recipient clicked a link in an email.
- `Replied` The recipient replied to an email.
- `Bounced` An email to the recipient bounced.
- `Unsubscribed` The recipient unsubscribed.

### EntityScoringRuleExpirationUnitEnum (enum)

Time unit after which points awarded by a scoring rule expire.

- `Hour` Points expire after a number of hours.
- `Day` Points expire after a number of days.
- `Week` Points expire after a number of weeks.
- `Month` Points expire after a number of months.

### EntityScoringRuleFilter (object)

Conditions a record must meet for a scoring rule to award its score.

- `operator: FilterGroupOperator!` How the filter boxes combine — And or Or.
- `formula: String` Optional boolean formula combining the filter boxes by their number.
- `filterMainBox: MainFilterBox!` Primary group of filter conditions.
- `filterSiblingBoxes: [FilterBox!]!` Additional condition groups, combined per operator/formula.

### EntityScoringSettings (object)

Configuration of a scoring: score categories, the records it scores and the rules that add or subtract points.

- `categories: [EntityScoringCategory!]!` Scoring categories that group records by accumulated score range (for example Hot, Warm, Cold).
- `filter: FieldFilter!` Filter that limits which records are eligible for scoring; records outside it are not scored.
- `rules: [EntityScoringRule!]` Scoring rules whose matching adjusts a record score.

Types several repositories share, such as `PageInfo` and the filter fields, are in the [types index](https://developers.coevera.com/reference/graphql/types.md). The [SDL](https://developers.coevera.com/graphql/schema.graphql) has the whole schema in one file.

## Example

```graphql
query FirstEntityScorings {
  entities {
    entityScoring {
      getByCriteria(first: 3, orderBy: [{ modified: Desc }]) {
        totalCount
        edges { node { id name modified } }
      }
    }
  }
}
```

```bash
curl 'https://{region}.api.coevera.com/api/v100/app/space/{space_id}/graphql/public' \
  --user "$COEVERA_API_KEY:$COEVERA_API_SECRET" \
  --header 'Content-Type: application/json' \
  --data '{"query":"query FirstEntityScorings { entities { entityScoring { getByCriteria(first: 3, orderBy: [{ modified: Desc }]) { totalCount edges { node { id name modified } } } } } }"}'
```
