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

# entities.target

Read target records with the target repository, and change them with the target mutations. Same records as the REST Targets entity.

REST: [Targets](https://developers.coevera.com/reference/rest/targets.md).

## Queries

- `getById(entityId: ID!): TargetEntity` Returns the record with the given id, or null when there is none. Deleted records are returned as well.
- `getByIds(entityIds: [ID!]!): [TargetEntity!]!` 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: TargetFilterInput, orderBy: [TargetOrderByInput!], includeDeleted: Boolean): [TargetEntity!]!` Returns the records that match the filter, paged with limit and offset.
- `getByCriteria(filter: TargetFilterInput, orderBy: [TargetOrderByInput!], includeDeleted: Boolean, before: String, after: String, first: Int, last: Int): TargetEntityConnection` 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.

## Mutations

- `createTarget(input: CreateTargetInput!, validationLevel: [ValidationLevel!]): CreateTargetPayload` Create one record.
- `updateTarget(input: UpdateTargetInput!, validationLevel: [ValidationLevel!], sessionIdToUpdate: String): UpdateTargetPayload` Update fields.
- `bulkUpdateTarget(input: [CreateOrUpdateTargetInput!]!, deleteInput: [DeleteTargetInput!], validationLevel: [ValidationLevel!], rollbackMethod: RollbackMethod, match: MatchingInput): BulkUpdateTargetPayload` Create or update many; per-item results.
- `deleteTarget(input: DeleteTargetInput!, deleteChildren: Boolean!): DeleteTargetPayload` Soft-delete.
- `updateDetailSettingsTarget(input: [UpdateTargetSettingsInput!]!): UpdateDetailSettingsTargetPayload` Updates the calculation settings of one or more targets: which indicators are included, whether the target value is locked, the chart granularity and the calculated and custom indicator values. GraphQL only.
- `activateTarget(input: ActivateTargetInput!): ActivateTargetPayload` Activates a draft target so its progress is tracked over the period computed from its period settings; activating a group target also activates its inactive user targets. GraphQL only.
- `bulkActivateUserTarget(input: BulkActivateUserTargetInput!): BulkActivateUserTargetPayload` Activates several user targets at once, as activateTarget does for each. Group targets and targets that cannot be activated are skipped without an error. GraphQL only.
- `finishTarget(input: FinishTargetInput!): FinishTargetPayload` Finishes an active target early, ending its tracking as of today. Fails when the target is not active. GraphQL only.
- `bulkFinishUserTarget(input: BulkFinishUserTargetInput!): BulkFinishUserTargetPayload` Finishes several active user targets at once, as finishTarget does for each. Group targets and targets that cannot be finished are skipped without an error. GraphQL only.
- `copyTarget(input: CopyTargetInput!): CopyTargetPayload` Copy a record. GraphQL only.
- `removeTarget(input: RemoveTargetInput!): RemoveTargetPayload` Removes a user target from a group target. The user target itself is kept. GraphQL only.
- `bulkRemoveTarget(input: BulkRemoveTargetInput!): BulkRemoveTargetPayload` Removes several user targets from their group targets at once. The user targets themselves are kept. GraphQL only.

## Types

### TargetEntity (object)

Sales target set for a user or a group of users for a period, measured by a chosen metric.

- `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.
- `currency: CurrencyEntity` Currency the target value is expressed in. Required when calculationType is a currency-based metric.
- `owner: ClientEntity` User who owns the target.
- `targetClient: ClientEntity` User the target is set on (the assignee). Required for User-type targets; null for group targets.
- `calculationType: TargetCalculationTypeEnum` What the target measures: revenue from opportunities won, or the number of leads qualified or created in the target period.
- `currencyId: ID` Id of the target currency.
- `description: String` Free-text description shown alongside the target.
- `isActive: Boolean!` When true, the target is currently being tracked; when false, the target is a draft or has been deactivated.
- `name: String!` Name of the entity and its default text representation.
- `ownerId: ID!` Id of the owning user.
- `periodFrom: Date` First date of the active target period. Set when isActive is true; recomputed from settings.period when activated.
- `periodTo: Date` Last date of the active target period.
- `settings: TargetsSettings!` Target configuration: period (year, quarter/month etc.), value, fragment breakdown and indicator inputs. Stored as a JSON document. This payload conforms to the `TargetsSettings` JSON Schema: GET /api/v100/rest/schemas/TargetsSettings.json on your region's API host
- `targetClientId: ID` Id of the assignee user.
- `type: TargetTypeEnum` Kind of target: a User target for targetClient, a group target that is split into or combines user targets, or a Simulated what-if target.
- `revision: Int` Revision when entity was lastly changed.
- `target: Float` Target value the user committed to for the current period.
- `virtualPeriodFrom: Date` Start date of the target period, derived from periodType and periodYear.
- `virtualPeriodTo: Date` End date of the target period, derived from periodType and periodYear.
- `daysLeft: Int!` Whole days remaining until the target period ends, or zero once the period is past.
- `status: TargetStatusEnum` Progress state of the target: Draft until it is activated, then NotStarted before its period begins, InProgress while the period runs, and Finished once it is marked finished or the period has ended.
- `finishedDate: Date` Date the target was marked as finished. Empty until the target is closed.
- `estimatedTarget: Float` Projected end-of-period value extrapolated from progress to date. Used to compare against the committed target.
- `periodYear: Int!` Calendar year the target period belongs to (e.g. 2026).
- `periodType: TargetsPeriodTypeEnum!` Whether the target period follows the calendar year (CalendarYear) or the space's financial year (FinancialYear). Combined with periodYear to determine virtualPeriodFrom / virtualPeriodTo.
- `hasParentGroupTarget: Boolean!` Returns if current target has any non-deleted parent group target.
- `childTargets: TargetRelationEntityConnection (8 args)` User-level child targets that aggregate into this group target.
- `periodFragmentType: TargetsPeriodFragmentTypeEnum!` Length of the fragments the target period is split into: the whole year (Year), quarters (Quarter) or months (Month).
- `periodFragmentIndex: Int!` Zero-based position of the current fragment within the parent period (e.g. fragment index 2 for the 3rd month in a yearly target split into monthly fragments).
- `instancePermissions: [EntityPermsEnum!]! (1 args)` Permissions the current user has on this record, out of the requested ones.
- `targetGoal: Int! (1 args)` Goal value to reach within the selected period; when the period covers only part of the target or forecast period, only the matching months count.
- `currentIndicators: TargetsIndicators!` Current sales performance indicators (qualification and win rates, deal size, sales cycle length) computed from the actual records in the target's scope.
- `currentMetrics: [TargetsCurrentMetrics]! (1 args)` Progress of the target per period part (year, quarters, months); for a group target the values of its member targets are combined.
- `currentTargetValue: Float! (1 args)` Value achieved toward the target so far; for a group target, the sum over its member user targets.
- `chartData: [TargetsUserChartData!]! (3 args)` Values of the selected metric over the target period, one series per user target (one per member for a group target).
- `absolutePeriod: TargetsAbsolutePeriod` First and last day of the target period; null for group targets. An active target keeps the dates set on activation; a draft computes them from its period settings.
- `canUpdatePeriodTypeAndYear: Boolean!` Returns if period.type and period.year can be updated - Child of inactive group is dependent on the group
- `canUpdatePeriodFragmentType: Boolean!` Returns if period.fragmentType can be updated - Child of inactive group is dependent on the group!
- `canChangeFilterSettings: Boolean!` Returns if settings.filter and settings.pipelineLeadProcessId can be changed - Child of inactive group is dependent on the group
- `canChangeTargetClient: Boolean!` Indicate if targetClient can be changed.
- `simulatedIndicators: SimulatedTargetIndicators!` Expected results (created, qualified and closed leads, won opportunities and amount) derived from the indicators set in the target's settings.

### TargetEntityConnection (object)

Paginated list of Target records.

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

### TargetEntityEdge (object)

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

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

### TargetCalculationTypeEnumFilterInput (input)

Conditions on an enumeration field. Several conditions given together must all match.

- `eq: [TargetCalculationTypeEnum!]` Matches any of the listed values.
- `NOT: TargetCalculationTypeEnumFilterInput` Matches values that do not meet this condition.

### TargetFilterInput (input)

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

- `OR: [TargetFilterInput!]` Matches records that meet at least one of the listed filters.
- `AND: [TargetFilterInput!]` Matches records that meet all of the listed filters.
- `NOT: TargetFilterInput` 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.
- `calculationType: TargetCalculationTypeEnumFilterInput` What the target measures: revenue from opportunities won, or the number of leads qualified or created in the target period.
- `currencyId: EntityFilterStringField` Id of the target currency.
- `description: EntityFilterStringField` Free-text description shown alongside the target.
- `isActive: Boolean` When true, the target is currently being tracked; when false, the target is a draft or has been deactivated.
- `name: EntityFilterStringField` Name of the entity and its default text representation.
- `ownerId: EntityFilterStringField` Id of the owning user.
- `targetClientId: EntityFilterStringField` Id of the assignee user.
- `type: TargetTypeEnumFilterInput` Kind of target: a User target for targetClient, a group target that is split into or combines user targets, or a Simulated what-if target.
- `revision: EntityFilterNumberField` Revision when entity was lastly changed.
- `target: Float` Target value the user committed to for the current period.
- `virtualPeriodFrom: Date` Start date of the target period, derived from periodType and periodYear.
- `virtualPeriodTo: Date` End date of the target period, derived from periodType and periodYear.
- `daysLeft: Int` Whole days remaining until the target period ends, or zero once the period is past.
- `status: TargetStatusEnum` Progress state of the target: Draft until it is activated, then NotStarted before its period begins, InProgress while the period runs, and Finished once it is marked finished or the period has ended.
- `finishedDate: Date` Date the target was marked as finished. Empty until the target is closed.
- `estimatedTarget: Float` Projected end-of-period value extrapolated from progress to date. Used to compare against the committed target.
- `periodYear: Int` Calendar year the target period belongs to (e.g. 2026).
- `periodType: TargetsPeriodTypeEnum` Whether the target period follows the calendar year (CalendarYear) or the space's financial year (FinancialYear). Combined with periodYear to determine virtualPeriodFrom / virtualPeriodTo.
- `hasParentGroupTarget: Boolean` True when this target is rolled up into a parent group target (e.g. a team-level target aggregating its members). Read-only.
- `periodFragmentType: TargetsPeriodFragmentTypeEnum` Length of the fragments the target period is split into: the whole year (Year), quarters (Quarter) or months (Month).
- `periodFragmentIndex: Int` Zero-based position of the current fragment within the parent period (e.g. fragment index 2 for the 3rd month in a yearly target split into monthly fragments).
- `currency: CurrencyFilterInput` Currency the target value is expressed in. Required when calculationType is a currency-based metric. Matches records where a related record meets these conditions.
- `owner: ClientFilterInput` User who owns the target. Matches records where a related record meets these conditions.
- `targetClient: ClientFilterInput` User the target is set on (the assignee). Required for User-type targets; null for group targets. Matches records where a related record meets these conditions.
- `childTargets: TargetRelationFilterInput` User-level child targets that aggregate into this group target. Matches records where a related record meets these conditions.

### TargetOrderByInput (input)

Sorting of Target 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.
- `owner: [ClientOrderByNestedInput!]` User who owns the target. Sorts by fields of the related record, listed in order of priority.
- `targetClient: [ClientOrderByNestedInput!]` User the target is set on (the assignee). Required for User-type targets; null for group targets. Sorts by fields of the related record, listed in order of priority.
- `calculationType: OrderByEnum` What the target measures: revenue from opportunities won, or the number of leads qualified or created in the target period.
- `description: OrderByEnum` Free-text description shown alongside the target.
- `isActive: OrderByEnum` When true, the target is currently being tracked; when false, the target is a draft or has been deactivated.
- `name: OrderByEnum` Name of the entity and its default text representation.
- `ownerId: OrderByEnum` Id of the owning user.
- `periodFrom: OrderByEnum` First date of the active target period. Set when isActive is true; recomputed from settings.period when activated.
- `periodTo: OrderByEnum` Last date of the active target period.
- `targetClientId: OrderByEnum` Id of the assignee user.
- `type: OrderByEnum` Kind of target: a User target for targetClient, a group target that is split into or combines user targets, or a Simulated what-if target.
- `revision: OrderByEnum` Revision when entity was lastly changed.
- `target: OrderByEnum` Target value the user committed to for the current period.
- `virtualPeriodFrom: OrderByEnum` Start date of the target period, derived from periodType and periodYear.
- `virtualPeriodTo: OrderByEnum` End date of the target period, derived from periodType and periodYear.
- `daysLeft: OrderByEnum` Whole days remaining until the target period ends, or zero once the period is past.
- `status: OrderByEnum` Progress state of the target: Draft until it is activated, then NotStarted before its period begins, InProgress while the period runs, and Finished once it is marked finished or the period has ended.
- `finishedDate: OrderByEnum` Date the target was marked as finished. Empty until the target is closed.
- `estimatedTarget: OrderByEnum` Projected end-of-period value extrapolated from progress to date. Used to compare against the committed target.
- `periodYear: OrderByEnum` Calendar year the target period belongs to (e.g. 2026).
- `periodType: OrderByEnum` Whether the target period follows the calendar year (CalendarYear) or the space's financial year (FinancialYear). Combined with periodYear to determine virtualPeriodFrom / virtualPeriodTo.
- `hasParentGroupTarget: OrderByEnum` True when this target is rolled up into a parent group target (e.g. a team-level target aggregating its members). Read-only.
- `periodFragmentType: OrderByEnum` Length of the fragments the target period is split into: the whole year (Year), quarters (Quarter) or months (Month).
- `periodFragmentIndex: OrderByEnum` Zero-based position of the current fragment within the parent period (e.g. fragment index 2 for the 3rd month in a yearly target split into monthly fragments).

### TargetTypeEnumFilterInput (input)

Conditions on an enumeration field. Several conditions given together must all match.

- `eq: [TargetTypeEnum!]` Matches any of the listed values.
- `NOT: TargetTypeEnumFilterInput` Matches values that do not meet this condition.

### ActivateTargetInput (input)

Parameters of the activateTarget mutation.

- `id: UUID!` Target to activate.
- `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).

### BulkActivateUserTargetInput (input)

Parameters of the bulkActivateUserTarget mutation.

- `includedIds: [ID!]!` Targets to activate, in addition to those taken from sessionId.
- `excludedIds: [ID!]!` Targets to leave out of the selection.
- `sessionId: String` Id of an open list view whose records are added to the selection. Integrations can leave it empty.
- `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).

### BulkFinishUserTargetInput (input)

Parameters of the bulkFinishUserTarget mutation.

- `includedIds: [ID!]!` Targets to finish, in addition to those taken from sessionId.
- `excludedIds: [ID!]!` Targets to leave out of the selection.
- `sessionId: String` Id of an open list view whose records are added to the selection. Integrations can leave it empty.
- `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).

### BulkRemoveTargetInput (input)

Parameters of the bulkRemoveTarget mutation.

- `groupChildIds: [GroupChildIdParams!]!` Pairs of a group target (parentTargetId) and a user target to remove from it (childTargetId).
- `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).

### CopyTargetInput (input)

Parameters of the copyTarget mutation.

- `id: UUID!` Target to copy.
- `name: String!` Name of the new target.
- `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).

### CreateOrUpdateTargetInput (input)

Field values of a Target 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.
- `calculationType: TargetCalculationTypeEnum` What the target measures: revenue from opportunities won, or the number of leads qualified or created in the target period.
- `currencyId: ID` Id of the target currency.
- `description: String` Free-text description shown alongside the target.
- `isActive: Boolean` When true, the target is currently being tracked; when false, the target is a draft or has been deactivated.
- `name: String` Name of the entity and its default text representation.
- `ownerId: ID` Id of the owning user.
- `periodFrom: Date` First date of the active target period. Set when isActive is true; recomputed from settings.period when activated.
- `periodTo: Date` Last date of the active target period.
- `targetClientId: ID` Id of the assignee user.
- `type: TargetTypeEnum` Kind of target: a User target for targetClient, a group target that is split into or combines user targets, or a Simulated what-if target.
- `revision: Int` Revision when entity was lastly changed.
- `childTargets: [CreateTargetRelationNoGroupTargetBackrefInput!]` User-level child targets that aggregate into this group target.

### CreateTargetInput (input)

Field values of a new Target record.

- `name: String!` Name of the target.
- `description: String` Free-text description shown alongside the target.
- `targetClientIds: [UUID]` Users the target is set on: the assignee of a User target, or the members of a GroupFromUser target, each of whom gets a user target of their own.
- `existingTargetsIds: [UUID]` User targets a GroupFromExisting target combines.
- `pipelineLeadProcessId: UUID` Sales pipeline (revenue targets) or lead process (lead targets) whose records count toward the target.
- `currencyId: UUID!` Currency the target value is expressed in.
- `filter: FieldFilterParams` Field conditions selecting which records count toward the target. Required for User and GroupFromUser targets unless fromSimulatedTargetId is set.
- `period: TargetsPeriodParams!` Period the target applies to: a calendar or financial year, or one quarter or month of it.
- `ownerId: UUID` User who owns a new target; defaults to the calling user. Not changed by updateTarget.
- `isActive: Boolean!` When true, the target is created active. Only a GroupFromExisting target can be created active; other targets start as drafts.
- `targetType: TargetTypeEnum!` Kind of target: User, GroupFromUser (one user target per user in targetClientIds), GroupFromExisting (combines existingTargetsIds) or Simulated.
- `calculationType: TargetCalculationTypeEnum!` What the target measures: revenue from won opportunities, or the number of leads created or qualified.
- `fromSimulatedTargetId: UUID` Simulated target whose indicators the new User target takes over.
- `simulatedIndicators: SimulatedTargetIndicatorsParams` Expected results the Simulated target is built from; required for Simulated targets.
- `targetValue: Float` Target value of a User target, overriding the value computed from the indicators.
- `targetClientTargetValues: [Float]` Target value of each user of a GroupFromUser target, in the order of targetClientIds.

### CreateTargetRelationNoGroupTargetBackrefInput (input)

Field values of a new TargetRelation record, created together with the record it belongs to.

- `modified: DateTime` Last modification time.
- `created: DateTime` Creation time.
- `userTargetId: ID!` Id of the user target that rolls up into the group target.
- `revision: Int` Revision when entity was lastly changed.

### DeleteTargetInput (input)

Id of the Target 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.

### FinishTargetInput (input)

Parameters of the finishTarget mutation.

- `id: UUID!` Target to finish.
- `applyToChildren: Boolean!` For a group target, when true, also finishes its active user targets that are not finished yet.
- `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).

### GroupChildIdParams (input)

Pair of a group target and one of its user targets.

- `parentTargetId: UUID!` Group target the user target belongs to.
- `childTargetId: UUID!` User target to remove from the group.

### RemoveTargetInput (input)

Parameters of the removeTarget mutation.

- `parentTargetId: UUID!` Group target to remove the user target from.
- `childTargetId: UUID!` User target to remove from the group.
- `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).

### SimulatedTargetIndicatorsParams (input)

Expected results of a target derived from its indicators: leads created, qualified and closed, and opportunities closed, won and their value.

- `target: Float!` Target value: the won amount for revenue targets, or the number of leads to create or qualify for lead targets.
- `leadClosedCount: Int` Expected number of leads closed (qualified or lost) in the period.
- `leadCreatedCount: Int` Expected number of leads created in the period.
- `leadQualifiedCount: Int` Expected number of leads qualified in the period.
- `opportunityClosedCount: Int` Expected number of opportunities closed (won or lost) in the period.
- `opportunityWonCount: Int` Expected number of won opportunities in the period.
- `opportunityWonAmount: Float` Expected value of the won opportunities in the period, in the target currency.
- `opportunityAverageVelocity: Float` Average rate at which opportunity value is won over time.

### TargetsIndicatorsParams (input)

Sales performance indicators of a target, such as lead qualification rate, average deal size, win rate and length of the sales cycle.

- `target: Float` Target value to be reached over the period.
- `leadQualificationRate: Float` Share of closed leads that were qualified, as a ratio.
- `leadSalesTimeToQualify: Int` Average number of days it takes for a lead to be qualified.
- `leadSalesTimeToLose: Int` Average number of days it takes for a lead to be lost.
- `leadClosedCount: Int` Number of leads closed (qualified or lost) over the period.
- `opportunityAverageSize: Float` Average monetary value of a won opportunity.
- `opportunityAverageVelocity: Float` Average rate at which opportunity value is won over time.
- `opportunityWinRate: Float` Share of closed opportunities that were won, as a ratio.
- `opportunitySalesTimeToWin: Int` Average number of days it takes for an opportunity to be won.
- `opportunitySalesTimeToLose: Int` Average number of days it takes for an opportunity to be lost.
- `opportunityClosedCount: Int` Number of opportunities closed (won or lost) over the period.
- `leadAverageEngagementTime: Int` Average time, in minutes, spent engaging a lead.
- `opportunityAverageEngagementTime: Int` Average time, in minutes, spent engaging an opportunity.
- `workingHoursPerWeek: Int` Number of working hours available per week.
- `nonSellingHoursPerWeek: Int` Number of weekly working hours not spent selling (admin, meetings, etc.).
- `vacationDaysPerYear: Int` Number of vacation days per year.
- `holidaysPerYear: Int` Number of public holidays per year.
- `sickDaysPerYear: Int` Expected number of sick days per year.
- `leadAverageEngagementsBeforeQualifyLost: Float` Average number of engagements with a lead before it is qualified or lost.
- `leadAverageEngagementsBeforeQualify: Float` Average number of engagements with a lead before it is qualified.
- `leadAverageEngagementsBeforeLost: Float` Average number of engagements with a lead before it is lost.
- `opptyAverageEngagementsBeforeWonLost: Float` Average number of engagements with an opportunity before it is won or lost.
- `opptyAverageEngagementsBeforeWon: Float` Average number of engagements with an opportunity before it is won.
- `opptyAverageEngagementsBeforeLost: Float` Average number of engagements with an opportunity before it is lost.
- `targetUserWorkingDaysTotal: Int` Number of working days target user worked in company.
- `targetUserYearsInWork: Int` Number of years user has worked in company

### TargetsPeriodParams (input)

Period of a sales target: a year, quarter or month of the calendar or financial year.

- `type: TargetsPeriodTypeEnum!` Whether the period follows the CalendarYear (Jan 1) or the company FinancialYear start.
- `year: Int!` Calendar or financial year the target applies to.
- `fragmentType: TargetsPeriodFragmentTypeEnum!` Granularity of the period within the year — Year, Quarter or Month.
- `fragmentIndex: Int` Quarter (1-4, counted from the start of the year) or calendar month (1-12, January = 1) the period covers; null when fragmentType is Year.

### UpdateTargetInput (input)

Id of a Target record and the field values to change.

- `name: String!` Name of the target.
- `description: String` Free-text description shown alongside the target.
- `targetClientIds: [UUID]` Users the target is set on: the assignee of a User target, or the members of a GroupFromUser target, each of whom gets a user target of their own.
- `existingTargetsIds: [UUID]` User targets a GroupFromExisting target combines.
- `pipelineLeadProcessId: UUID` Sales pipeline (revenue targets) or lead process (lead targets) whose records count toward the target.
- `currencyId: UUID!` Currency the target value is expressed in.
- `filter: FieldFilterParams` Field conditions selecting which records count toward the target. Required for User and GroupFromUser targets unless fromSimulatedTargetId is set.
- `period: TargetsPeriodParams!` Period the target applies to: a calendar or financial year, or one quarter or month of it.
- `ownerId: UUID` User who owns a new target; defaults to the calling user. Not changed by updateTarget.
- `id: UUID!` Id of the target to update.

### UpdateTargetSettingsInput (input)

Parameters of the updateDetailSettingsTarget mutation.

- `id: UUID!` Id of the target to update.
- `leadsEnabled: Boolean!` When true, lead indicators are included in the target calculation.
- `workingTimeEnabled: Boolean!` When true, working-time indicators (working hours, vacation, holidays, sick days) are included in the target calculation.
- `targetValueLocked: Boolean!` When true, the target value is fixed and not recomputed from the indicators.
- `chartGranularity: TargetsChartGranularityEnum!` Granularity at which target progress is charted.
- `calculatedIndicators: TargetsIndicatorsParams!` Indicator values computed from historical data, used as defaults.
- `customIndicators: TargetsIndicatorsParams!` User-overridden indicator values; each set value takes precedence over the corresponding calculated indicator.

### ActivateTargetPayload (object)

Result of the activateTarget mutation.

- `target: TargetEntity` The activated target.
- `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).

### BulkActivateUserTargetPayload (object)

Result of the bulkActivateUserTarget mutation.

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

### BulkFinishUserTargetPayload (object)

Result of the bulkFinishUserTarget mutation.

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

### BulkRemoveTargetPayload (object)

Result of the bulkRemoveTarget mutation.

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

### BulkUpdateTargetPayload (object)

Result of the bulkUpdateTarget mutation.

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

### CopyTargetPayload (object)

Result of the copyTarget mutation.

- `target: TargetEntity` The new draft target.
- `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).

### CreateTargetPayload (object)

Result of the createTarget mutation.

- `target: TargetEntity` The created record.

### DeleteTargetPayload (object)

Result of the deleteTarget mutation.

- `target: TargetEntity` 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).

### FinishTargetPayload (object)

Result of the finishTarget mutation.

- `target: TargetEntity` The finished target.
- `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).

### RemoveTargetPayload (object)

Result of the removeTarget mutation.

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

### UpdateDetailSettingsTargetPayload (object)

Result of the updateDetailSettingsTarget mutation.

- `result: [TargetEntity!]!` The updated targets.

### UpdateTargetPayload (object)

Result of the updateTarget mutation.

- `target: TargetEntity` The updated record.

### SimulatedTargetIndicators (object)

Expected results of a target derived from its indicators: leads created, qualified and closed, and opportunities closed, won and their value.

- `target: Float!` Target value: the won amount for revenue targets, or the number of leads to create or qualify for lead targets.
- `leadClosedCount: Int` Expected number of leads closed (qualified or lost) in the period.
- `leadCreatedCount: Int` Expected number of leads created in the period.
- `leadQualifiedCount: Int` Expected number of leads qualified in the period.
- `opportunityClosedCount: Int` Expected number of opportunities closed (won or lost) in the period.
- `opportunityWonCount: Int` Expected number of won opportunities in the period.
- `opportunityWonAmount: Float` Expected value of the won opportunities in the period, in the target currency.
- `opportunityAverageVelocity: Float` Average rate at which opportunity value is won over time.

### TargetCalculationTypeEnum (enum)

What a target measures.

- `Revenue` Value of opportunities won in the target period.
- `LeadQualified` Number of leads qualified in the target period.
- `LeadCreated` Number of leads created in the target period.

### TargetsAbsolutePeriod (object)

Start and end dates of a target's period.

- `periodFrom: Date!` First day of the target period.
- `periodTo: Date!` Last day of the target period.

### TargetsChartGranularityEnum (enum)

Interval between data points on a target progress chart.

- `Yearly` One data point per year.
- `Quarterly` One data point per quarter.
- `Monthly` One data point per month.
- `Weekly` One data point per week.
- `Daily` One data point per day.

### TargetsChartValue (object)

Value of a target metric in one step of a target chart.

- `date: Date!` Start date of the chart step.
- `index: Int!` Number of the step: the month (1-12) for Monthly, the week number for Weekly, otherwise its position starting at 1.
- `value: Float!` Metric value in the step; 0 when there is none.

### TargetsCurrentMetrics (object)

Progress of a target in one part of its period (the year, a quarter, month or week): the lead and opportunity counts and values achieved so far.

- `relativeRate: Float!` Share of the working time of the period that has elapsed as of today, from 0 to 1.
- `period: TargetsMetricPeriodEnum` Part of the target period the metrics cover: the year, or the current quarter, month or week.
- `periodIndex: Int!` Number of the covered part: the year for Year, 1-4 for Quarter, 1-12 for Month, or the week number within the target year for Week.
- `quota: Float` Value of the won opportunities closed in the period, in the target currency; revenue targets only.
- `leadsNew: Int` Number of leads created in the period.
- `leadsQualified: Int` Number of leads qualified in the period.
- `opportunitiesWon: Int` Number of won opportunities closed in the period; revenue targets only.
- `opportunitiesNew: Int` Number of opportunities created in the period; revenue targets only.
- `unweightedTarget: Float` Total value of open and won opportunities closing in the period, in the target currency; revenue targets only.
- `unweightedTargetByVelocity: Float` Currently the same value as unweightedTarget; revenue targets only.

### TargetsIndicators (object)

Sales performance indicators of a target, such as lead qualification rate, average deal size, win rate and length of the sales cycle.

- `target: Float` Target value to be reached over the period.
- `leadQualificationRate: Float` Share of closed leads that were qualified, as a ratio.
- `leadSalesTimeToQualify: Int` Average number of days it takes for a lead to be qualified.
- `leadSalesTimeToLose: Int` Average number of days it takes for a lead to be lost.
- `leadClosedCount: Int` Number of leads closed (qualified or lost) over the period.
- `opportunityAverageSize: Float` Average monetary value of a won opportunity.
- `opportunityAverageVelocity: Float` Average rate at which opportunity value is won over time.
- `opportunityWinRate: Float` Share of closed opportunities that were won, as a ratio.
- `opportunitySalesTimeToWin: Int` Average number of days it takes for an opportunity to be won.
- `opportunitySalesTimeToLose: Int` Average number of days it takes for an opportunity to be lost.
- `opportunityClosedCount: Int` Number of opportunities closed (won or lost) over the period.
- `leadAverageEngagementTime: Int` Average time, in minutes, spent engaging a lead.
- `opportunityAverageEngagementTime: Int` Average time, in minutes, spent engaging an opportunity.
- `workingHoursPerWeek: Int` Number of working hours available per week.
- `nonSellingHoursPerWeek: Int` Number of weekly working hours not spent selling (admin, meetings, etc.).
- `vacationDaysPerYear: Int` Number of vacation days per year.
- `holidaysPerYear: Int` Number of public holidays per year.
- `sickDaysPerYear: Int` Expected number of sick days per year.
- `leadAverageEngagementsBeforeQualifyLost: Float` Average number of engagements with a lead before it is qualified or lost.
- `leadAverageEngagementsBeforeQualify: Float` Average number of engagements with a lead before it is qualified.
- `leadAverageEngagementsBeforeLost: Float` Average number of engagements with a lead before it is lost.
- `opptyAverageEngagementsBeforeWonLost: Float` Average number of engagements with an opportunity before it is won or lost.
- `opptyAverageEngagementsBeforeWon: Float` Average number of engagements with an opportunity before it is won.
- `opptyAverageEngagementsBeforeLost: Float` Average number of engagements with an opportunity before it is lost.
- `targetUserWorkingDaysTotal: Int` Number of working days target user worked in company.
- `targetUserYearsInWork: Int` Number of years user has worked in company

### TargetsMetricEnum (enum)

Metric reported for a target over its periods and used for drill-down.

- `Quota` Value of won opportunities closing within the period.
- `LeadsNew` Number of leads created.
- `LeadsQualified` Number of leads qualified.
- `OpportunitiesWon` Number of won opportunities closing within the period.
- `OpportunitiesNew` Number of opportunities created directly.
- `UnweightedTarget` Full value of open and won opportunities closing within the period.
- `UnweightedTargetByVelocity` Full value of open and won opportunities closing within the period, as used for the velocity projection.

### TargetsMetricPeriodEnum (enum)

Period length used when breaking target metrics down.

- `Year` Targets are broken down by year.
- `Quarter` Targets are broken down by quarter.
- `Month` Targets are broken down by month.
- `Week` Targets are broken down by week.

### TargetsPeriod (object)

Period of a sales target: a year, quarter or month of the calendar or financial year.

- `type: TargetsPeriodTypeEnum!` Whether the period follows the CalendarYear (Jan 1) or the company FinancialYear start.
- `year: Int!` Calendar or financial year the target applies to.
- `fragmentType: TargetsPeriodFragmentTypeEnum!` Granularity of the period within the year — Year, Quarter or Month.
- `fragmentIndex: Int` Quarter (1-4, counted from the start of the year) or calendar month (1-12, January = 1) the period covers; null when fragmentType is Year.

### TargetsPeriodFragmentTypeEnum (enum)

Length of the fragments a target period is split into.

- `Year` The whole year is one fragment.
- `Quarter` The year is split into quarters.
- `Month` The year is split into months.

### TargetsPeriodTypeEnum (enum)

Year basis a target period follows.

- `CalendarYear` Periods follow the calendar year starting on 1 January.
- `FinancialYear` Periods follow the space's financial year.

### TargetsSettings (object)

Settings of a sales target: its period, the records it covers and the indicators its value is calculated from.

- `leadsEnabled: Boolean!` When true, lead indicators are included in the target calculation.
- `workingTimeEnabled: Boolean!` When true, working-time indicators (working hours, vacation, holidays, sick days) are included in the target calculation.
- `targetValueLocked: Boolean!` When true, the target value is fixed and not recomputed from the indicators.
- `period: TargetsPeriod!` Time period the target applies to.
- `filter: FieldFilter` Field-condition filter selecting which records contribute to the target. The main box entity must be LeadOppty for Revenue and LeadQualified targets, and Lead (or LeadOppty) for LeadCreated targets; other entities are rejected.
- `pipelineLeadProcessId: UUID` Either pipelineId or leadProcessId depending on type of Target.
- `chartGranularity: TargetsChartGranularityEnum!` Granularity at which target progress is charted — Yearly, Quarterly, Monthly, Weekly or Daily.
- `calculatedIndicators: TargetsIndicators!` Indicator values computed from historical data, used as defaults.
- `customIndicators: TargetsIndicators!` User-overridden indicator values; each set value takes precedence over the corresponding calculated indicator.

### TargetStatusEnum (enum)

Progress state of a target.

- `Draft` The target has not been activated yet.
- `NotStarted` The target is active but its period has not begun.
- `InProgress` The target is active and its period is running.
- `Finished` The target was marked finished or its period has ended.

### TargetsUserChartData (object)

Chart series of one user target: the values of a metric over the target period.

- `targetId: UUID!` Id of the user target the series belongs to.
- `values: [TargetsChartValue!]!` Metric values, one per chart step over the target period.

### TargetTypeEnum (enum)

Kind of sales target.

- `User` Target assigned to a single user.
- `GroupFromUser` Group target that defines the settings and is split into user targets for its members.
- `GroupFromExisting` Group target that combines existing user targets.
- `Simulated` What-if target used to simulate the activity needed to reach a goal.

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 FirstTargets {
  entities {
    target {
      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 FirstTargets { entities { target { getByCriteria(first: 3, orderBy: [{ modified: Desc }]) { totalCount edges { node { id name modified } } } } } }"}'
```
