GraphQLRepositoriestarget
entities.target
Read target records with the target repository, and change them with the target mutations. Same records as the REST Targets entity.
Queries
Fields of entities { target { … } }.
| 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. | TargetEntity |
| QUERY | getByIds(entityIds: [ID!]!)Returns the records with the given ids; ids without a record are left out. Deleted records are returned as well. | [TargetEntity!]! |
| QUERY | getAll(limit: Int, offset: Int, filter: TargetFilterInput, orderBy: [TargetOrderByInput!], includeDeleted: Boolean)Returns the records that match the filter, paged with limit and offset. | [TargetEntity!]! |
| QUERY | getByCriteria(filter: TargetFilterInput, orderBy: [TargetOrderByInput!], includeDeleted: Boolean, before: String, after: String, first: Int, last: Int)Returns the records that match the filter as a cursor-paginated connection. | TargetEntityConnection |
| 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!]! |
Mutations
| Kind | Mutation | Does | Returns |
|---|---|---|---|
| MUTATION | createTarget(input: CreateTargetInput!, validationLevel: [ValidationLevel!]) | Create one record | CreateTargetPayload |
| MUTATION | updateTarget(input: UpdateTargetInput!, validationLevel: [ValidationLevel!], sessionIdToUpdate: String) | Update fields | UpdateTargetPayload |
| MUTATION | bulkUpdateTarget(input: [CreateOrUpdateTargetInput!]!, deleteInput: [DeleteTargetInput!], validationLevel: [ValidationLevel!], rollbackMethod: RollbackMethod, match: MatchingInput) | Create or update many; per-item results | BulkUpdateTargetPayload |
| MUTATION | deleteTarget(input: DeleteTargetInput!, deleteChildren: Boolean!) | Soft-delete | DeleteTargetPayload |
| MUTATION | updateDetailSettingsTarget(input: [UpdateTargetSettingsInput!]!) | 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 | UpdateDetailSettingsTargetPayload |
| MUTATION | activateTarget(input: ActivateTargetInput!) | 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 | ActivateTargetPayload |
| MUTATION | bulkActivateUserTarget(input: BulkActivateUserTargetInput!) | 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 | BulkActivateUserTargetPayload |
| MUTATION | finishTarget(input: FinishTargetInput!) | Finishes an active target early, ending its tracking as of today. Fails when the target is not active. GraphQL only | FinishTargetPayload |
| MUTATION | bulkFinishUserTarget(input: BulkFinishUserTargetInput!) | 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 | BulkFinishUserTargetPayload |
| MUTATION | copyTarget(input: CopyTargetInput!) | Copy a record GraphQL only | CopyTargetPayload |
| MUTATION | removeTarget(input: RemoveTargetInput!) | Removes a user target from a group target. The user target itself is kept. GraphQL only | RemoveTargetPayload |
| MUTATION | bulkRemoveTarget(input: BulkRemoveTargetInput!) | Removes several user targets from their group targets at once. The user targets themselves are kept. GraphQL only | BulkRemoveTargetPayload |
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.
TargetEntity object 45 fields: isDeleteProtected, id, isDeleted, …
Sales target set for a user or a group of users for a period, measured by a chosen metric.
| 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. |
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 pageInfo: PageInfo!, edges: [TargetEntityEdge]!, totalCount: Int
Paginated list of Target records.
| Field | Type | Description |
|---|---|---|
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 node: TargetEntity, cursor: String!
A Relay edge containing a TargetEntity and its cursor.
| Field | Type | Description |
|---|---|---|
node | TargetEntity | The item at the end of the edge |
cursor | String! | A cursor for use in pagination |
TargetCalculationTypeEnumFilterInput input eq: [TargetCalculationTypeEnum!], NOT: TargetCalculationTypeEnumFilterInput
Conditions on an enumeration field. Several conditions given together must all match.
| Input field | Type | Description |
|---|---|---|
eq | [TargetCalculationTypeEnum!] | Matches any of the listed values. |
NOT | TargetCalculationTypeEnumFilterInput | Matches values that do not meet this condition. |
TargetFilterInput input AND, OR, NOT, globalSearchQuery, one condition per field
Filter conditions for Target records. Conditions on different fields are combined with AND; use OR, AND and NOT for other combinations.
| Input field | Type | Description |
|---|---|---|
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 Asc or Desc per field
Sorting of Target 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. |
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 eq: [TargetTypeEnum!], NOT: TargetTypeEnumFilterInput
Conditions on an enumeration field. Several conditions given together must all match.
| Input field | Type | Description |
|---|---|---|
eq | [TargetTypeEnum!] | Matches any of the listed values. |
NOT | TargetTypeEnumFilterInput | Matches values that do not meet this condition. |
ActivateTargetInput input id: UUID!, clientMutationId: String
Parameters of the activateTarget mutation.
| Input field | Type | Description |
|---|---|---|
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 includedIds: [ID!]!, excludedIds: [ID!]!, sessionId: String, clientMutationId: String
Parameters of the bulkActivateUserTarget mutation.
| Input field | Type | Description |
|---|---|---|
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 includedIds: [ID!]!, excludedIds: [ID!]!, sessionId: String, clientMutationId: String
Parameters of the bulkFinishUserTarget mutation.
| Input field | Type | Description |
|---|---|---|
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 groupChildIds: [GroupChildIdParams!]!, clientMutationId: String
Parameters of the bulkRemoveTarget mutation.
| Input field | Type | Description |
|---|---|---|
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 id: UUID!, name: String!, clientMutationId: String
Parameters of the copyTarget mutation.
| Input field | Type | Description |
|---|---|---|
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 16 fields: clientMutationId, id, modified, …
Field values of a Target record to create, or to update when its id is set.
| 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. |
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 16 fields: name, description, targetClientIds, …
Field values of a new Target record.
| Input field | Type | Description |
|---|---|---|
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 modified: DateTime, created: DateTime, userTargetId: ID!, revision: Int
Field values of a new TargetRelation record, created together with the record it belongs to.
| Input field | Type | Description |
|---|---|---|
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 clientMutationId: String, id: ID!
Id of the Target record to delete.
| 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. |
FinishTargetInput input id: UUID!, applyToChildren: Boolean!, clientMutationId: String
Parameters of the finishTarget mutation.
| Input field | Type | Description |
|---|---|---|
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 parentTargetId: UUID!, childTargetId: UUID!
Pair of a group target and one of its user targets.
| Input field | Type | Description |
|---|---|---|
parentTargetId | UUID! | Group target the user target belongs to. |
childTargetId | UUID! | User target to remove from the group. |
RemoveTargetInput input parentTargetId: UUID!, childTargetId: UUID!, clientMutationId: String
Parameters of the removeTarget mutation.
| Input field | Type | Description |
|---|---|---|
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 8 fields: target, leadClosedCount, leadCreatedCount, …
Expected results of a target derived from its indicators: leads created, qualified and closed, and opportunities closed, won and their value.
| Input field | Type | Description |
|---|---|---|
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 26 fields: target, leadQualificationRate, leadSalesTimeToQualify, …
Sales performance indicators of a target, such as lead qualification rate, average deal size, win rate and length of the sales cycle.
| Input field | Type | Description |
|---|---|---|
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 type: TargetsPeriodTypeEnum!, year: Int!, fragmentType: TargetsPeriodFragmentTypeEnum!, fragmentIndex: Int
Period of a sales target: a year, quarter or month of the calendar or financial year.
| Input field | Type | Description |
|---|---|---|
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 10 fields: name, description, targetClientIds, …
Id of a Target record and the field values to change.
| Input field | Type | Description |
|---|---|---|
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 7 fields: id, leadsEnabled, workingTimeEnabled, …
Parameters of the updateDetailSettingsTarget mutation.
| Input field | Type | Description |
|---|---|---|
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 target: TargetEntity, clientMutationId: String
Result of the activateTarget mutation.
| Field | Type | Description |
|---|---|---|
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 clientMutationId: String
Result of the bulkActivateUserTarget mutation.
| 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). |
BulkFinishUserTargetPayload object clientMutationId: String
Result of the bulkFinishUserTarget mutation.
| 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). |
BulkRemoveTargetPayload object clientMutationId: String
Result of the bulkRemoveTarget mutation.
| 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). |
BulkUpdateTargetPayload object result: BulkUpdateResults!
Result of the bulkUpdateTarget mutation.
| Field | Type | Description |
|---|---|---|
result | BulkUpdateResults! | Ids of the created, updated and deleted records, and the items that failed. |
CopyTargetPayload object target: TargetEntity, clientMutationId: String
Result of the copyTarget mutation.
| Field | Type | Description |
|---|---|---|
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 target: TargetEntity
Result of the createTarget mutation.
| Field | Type | Description |
|---|---|---|
target | TargetEntity | The created record. |
DeleteTargetPayload object target: TargetEntity, clientMutationId: String
Result of the deleteTarget mutation.
| Field | Type | Description |
|---|---|---|
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 target: TargetEntity, clientMutationId: String
Result of the finishTarget mutation.
| Field | Type | Description |
|---|---|---|
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 clientMutationId: String
Result of the removeTarget mutation.
| 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). |
UpdateDetailSettingsTargetPayload object result: [TargetEntity!]!
Result of the updateDetailSettingsTarget mutation.
| Field | Type | Description |
|---|---|---|
result | [TargetEntity!]! | The updated targets. |
UpdateTargetPayload object target: TargetEntity
Result of the updateTarget mutation.
| Field | Type | Description |
|---|---|---|
target | TargetEntity | The updated record. |
SimulatedTargetIndicators object 8 fields: target, leadClosedCount, leadCreatedCount, …
Expected results of a target derived from its indicators: leads created, qualified and closed, and opportunities closed, won and their value.
| Field | Type | Description |
|---|---|---|
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 Revenue, LeadQualified, LeadCreated
What a target measures.
| Value | Description |
|---|---|
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 periodFrom: Date!, periodTo: Date!
Start and end dates of a target's period.
| Field | Type | Description |
|---|---|---|
periodFrom | Date! | First day of the target period. |
periodTo | Date! | Last day of the target period. |
TargetsChartGranularityEnum enum Yearly, Quarterly, Monthly, Weekly, Daily
Interval between data points on a target progress chart.
| Value | Description |
|---|---|
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 date: Date!, index: Int!, value: Float!
Value of a target metric in one step of a target chart.
| Field | Type | Description |
|---|---|---|
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 10 fields: relativeRate, period, periodIndex, …
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.
| Field | Type | Description |
|---|---|---|
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 26 fields: target, leadQualificationRate, leadSalesTimeToQualify, …
Sales performance indicators of a target, such as lead qualification rate, average deal size, win rate and length of the sales cycle.
| Field | Type | Description |
|---|---|---|
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 Quota, LeadsNew, LeadsQualified, OpportunitiesWon, OpportunitiesNew, UnweightedTarget, UnweightedTargetByVelocity
Metric reported for a target over its periods and used for drill-down.
| Value | Description |
|---|---|
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 Year, Quarter, Month, Week
Period length used when breaking target metrics down.
| Value | Description |
|---|---|
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 type: TargetsPeriodTypeEnum!, year: Int!, fragmentType: TargetsPeriodFragmentTypeEnum!, fragmentIndex: Int
Period of a sales target: a year, quarter or month of the calendar or financial year.
| Field | Type | Description |
|---|---|---|
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 Year, Quarter, Month
Length of the fragments a target period is split into.
| Value | Description |
|---|---|
Year | The whole year is one fragment. |
Quarter | The year is split into quarters. |
Month | The year is split into months. |
TargetsPeriodTypeEnum enum CalendarYear, FinancialYear
Year basis a target period follows.
| Value | Description |
|---|---|
CalendarYear | Periods follow the calendar year starting on 1 January. |
FinancialYear | Periods follow the space's financial year. |
TargetsSettings object 9 fields: leadsEnabled, workingTimeEnabled, targetValueLocked, …
Settings of a sales target: its period, the records it covers and the indicators its value is calculated from.
| Field | Type | Description |
|---|---|---|
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 Draft, NotStarted, InProgress, Finished
Progress state of a target.
| Value | Description |
|---|---|
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 targetId: UUID!, values: [TargetsChartValue!]!
Chart series of one user target: the values of a metric over the target period.
| Field | Type | Description |
|---|---|---|
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 User, GroupFromUser, GroupFromExisting, Simulated
Kind of sales target.
| Value | Description |
|---|---|
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. |