OBJECT

TargetEntity

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

link GraphQL Schema definition

  • type TargetEntity {
  • # 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.
  • isDeleteProtected: Boolean!
  • # Unique identifier of entity.
  • id: ID!
  • # Specifies if the entity is considered deleted.
  • isDeleted: Boolean
  • # Last modification time.
  • modified: DateTime
  • # Creation time.
  • created: DateTime
  • # Currency the target value is expressed in. Required when calculationType is a
  • # currency-based metric.
  • currency: CurrencyEntity
  • # User who owns the target.
  • owner: ClientEntity
  • # User the target is set on (the assignee). Required for User-type targets; null
  • # for group targets.
  • targetClient: ClientEntity
  • # What the target measures: revenue from opportunities won, or the number of leads
  • # qualified or created in the target period.
  • calculationType: TargetCalculationTypeEnum
  • # Id of the target currency.
  • currencyId: ID
  • # Free-text description shown alongside the target.
  • description: String
  • # When true, the target is currently being tracked; when false, the target is a
  • # draft or has been deactivated.
  • isActive: Boolean!
  • # Name of the entity and its default text representation.
  • name: String!
  • # Id of the owning user.
  • ownerId: ID!
  • # First date of the active target period. Set when isActive is true; recomputed
  • # from settings.period when activated.
  • periodFrom: Date
  • # Last date of the active target period.
  • periodTo: Date
  • # 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:
  • # https://api-doc.coevera.com/schemas/TargetsSettings.json
  • settings: TargetsSettings!
  • # Id of the assignee user.
  • targetClientId: ID
  • # 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.
  • type: TargetTypeEnum
  • # Revision when entity was lastly changed.
  • revision: Int
  • # Target value the user committed to for the current period.
  • target: Float
  • # Start date of the target period, derived from periodType and periodYear.
  • virtualPeriodFrom: Date
  • # End date of the target period, derived from periodType and periodYear.
  • virtualPeriodTo: Date
  • # Whole days remaining until the target period ends, or zero once the period is
  • # past.
  • daysLeft: Int!
  • # 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.
  • status: TargetStatusEnum
  • # Date the target was marked as finished. Empty until the target is closed.
  • finishedDate: Date
  • # Projected end-of-period value extrapolated from progress to date. Used to
  • # compare against the committed target.
  • estimatedTarget: Float
  • # Calendar year the target period belongs to (e.g. 2026).
  • periodYear: Int!
  • # Whether the target period follows the calendar year (CalendarYear) or the
  • # space's financial year (FinancialYear). Combined with periodYear to determine
  • # virtualPeriodFrom / virtualPeriodTo.
  • periodType: TargetsPeriodTypeEnum!
  • # Returns if current target has any non-deleted parent group target.
  • hasParentGroupTarget: Boolean!
  • # User-level child targets that aggregate into this group target.
  • #
  • # Arguments
  • # filter: Filter Target relations by target Target attributes.
  • # filterEdge: Filter TargetRelation relations by edge (relation)
  • # TargetRelation attributes.
  • # orderBy: Order Target relations by target Target attributes.
  • # includeDeleted: Returns deleted target records as well. Default
  • # is true.
  • # before: Cursor until which to take entities to result set.
  • # after: Cursor after which to start taking entities to result
  • # set.
  • # first: Number of entities to return from beginning of the
  • # result set.
  • # last: Return only the "last" number of entities from result
  • # set.
  • childTargets(
  • filter: TargetFilterInput,
  • filterEdge: TargetRelationFilterInput,
  • orderBy: [TargetOrderByInput!],
  • includeDeleted: Boolean,
  • before: String,
  • after: String,
  • first: Int,
  • last: Int
  • ): TargetRelationEntityConnection
  • # Length of the fragments the target period is split into: the whole year (Year),
  • # quarters (Quarter) or months (Month).
  • periodFragmentType: TargetsPeriodFragmentTypeEnum!
  • # 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).
  • periodFragmentIndex: Int!
  • # Permissions the current user has on this record, out of the requested ones.
  • #
  • # Arguments
  • # permissions: Permissions to check; the result lists those the
  • # current user has.
  • instancePermissions(permissions: [EntityPermsEnum!]!): [EntityPermsEnum!]!
  • # 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.
  • #
  • # Arguments
  • # period: Period to compute the goal for; the whole period when
  • # omitted.
  • targetGoal(period: PeriodOptionParams): Int!
  • # Current sales performance indicators (qualification and win rates, deal size,
  • # sales cycle length) computed from the actual records in the target's scope.
  • currentIndicators: TargetsIndicators!
  • # Progress of the target per period part (year, quarters, months); for a group
  • # target the values of its member targets are combined.
  • #
  • # Arguments
  • # includeChildIds: For a group target, limits the result to these
  • # member user targets; all members when omitted.
  • currentMetrics(includeChildIds: [UUID]): [TargetsCurrentMetrics]!
  • # Value achieved toward the target so far; for a group target, the sum over its
  • # member user targets.
  • #
  • # Arguments
  • # includeChildIds: For a group target, limits the result to these
  • # member user targets; all members when omitted.
  • currentTargetValue(includeChildIds: [UUID]): Float!
  • # Values of the selected metric over the target period, one series per user target
  • # (one per member for a group target).
  • #
  • # Arguments
  • # metric: Metric to chart.
  • # granularity: Time step between the chart values.
  • # includeChildIds: For a group target, limits the result to these
  • # member user targets; all members when omitted.
  • chartData(
  • metric: TargetsMetricEnum!,
  • granularity: TargetsChartGranularityEnum!,
  • includeChildIds: [UUID]
  • ): [TargetsUserChartData!]!
  • # 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.
  • absolutePeriod: TargetsAbsolutePeriod
  • # Returns if period.type and period.year can be updated - Child of inactive group
  • # is dependent on the group
  • canUpdatePeriodTypeAndYear: Boolean!
  • # Returns if period.fragmentType can be updated - Child of inactive group is
  • # dependent on the group!
  • canUpdatePeriodFragmentType: Boolean!
  • # Returns if settings.filter and settings.pipelineLeadProcessId can be changed -
  • # Child of inactive group is dependent on the group
  • canChangeFilterSettings: Boolean!
  • # Indicate if targetClient can be changed.
  • canChangeTargetClient: Boolean!
  • # Expected results (created, qualified and closed leads, won opportunities and
  • # amount) derived from the indicators set in the target's settings.
  • simulatedIndicators: SimulatedTargetIndicators!
  • }