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

# entities.opportunity

Read opportunity records with the opportunity repository, and change them with the opportunity mutations. Same records as the REST Opportunities entity.

REST: [Opportunities](https://developers.coevera.com/reference/rest/opportunities.md).

## Queries

- `getById(entityId: ID!): OpportunityEntity` Returns the record with the given id, or null when there is none. Deleted records are returned as well.
- `getByIds(entityIds: [ID!]!): [OpportunityEntity!]!` 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: OpportunityFilterInput, orderBy: [OpportunityOrderByInput!], includeDeleted: Boolean): [OpportunityEntity!]!` Returns the records that match the filter, paged with limit and offset.
- `getByCriteria(filter: OpportunityFilterInput, orderBy: [OpportunityOrderByInput!], includeDeleted: Boolean, before: String, after: String, first: Int, last: Int): OpportunityEntityConnection` 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.
- `getBySession(includedIds: [UUID!]!, excludedIds: [UUID!]!, sessionId: String!, before: String, after: String, first: Int, last: Int): OpportunityEntityConnection` Returns a page of records selected in a list or report: all records of the given result plus the explicitly included ids, minus the excluded ids.
- `getByIdFormatted(id: UUID!, fieldIds: [UUID!]): JSONString` Returns the values of a record's fields formatted for display, keyed by field id.
- `autoPrefill(mappingId: UUID!, entityId: UUID!, targetEntityTypeId: UUID): OpportunityEntity!` Returns a new, unsaved record pre-filled from a source record according to a field mapping. Nothing is saved; the returned values can be used as input for create.
- `aiAutoPrefill(actionId: String!): OpportunityAutoPrefill!` Returns an unsaved record pre-filled with the values proposed by an AI record suggestion, together with the fields the suggestion filled in.

## Mutations

- `changeOwnershipOpportunity(input: ChangeOwnershipOpportunityInput!): ChangeOwnershipOpportunityPayload` Change owner. GraphQL only.
- `manageSharingOpportunity(input: ManageSharingOpportunityInput!): ManageSharingOpportunityPayload` Change who it is shared with. GraphQL only.
- `changeLabelFlagOpportunity(input: ChangeLabelFlagOpportunityInput!): ChangeLabelFlagOpportunityPayload` Change the label flag. GraphQL only.
- `restoreOpportunity(input: RestoreOpportunityInput!): RestoreOpportunityPayload` Restore a deleted record.
- `archiveOpportunity(input: ArchiveOpportunityInput!): ArchiveOpportunityPayload` Archive. GraphQL only.
- `moveOpportunity(input: MoveOpportunityInput!): MoveOpportunityPayload` Move to another step. GraphQL only.
- `changePipelineOpportunity(input: ChangePipelineOpportunityInput!): ChangePipelineOpportunityPayload` Move to another pipeline. GraphQL only.
- `createOpportunity(input: CreateOpportunityInput!, validationLevel: [ValidationLevel!]): CreateOpportunityPayload` Create one record.
- `updateOpportunity(input: UpdateOpportunityInput!, validationLevel: [ValidationLevel!], sessionIdToUpdate: String): UpdateOpportunityPayload` Update fields.
- `bulkUpdateOpportunity(input: [CreateOrUpdateOpportunityInput!]!, deleteInput: [DeleteOpportunityInput!], validationLevel: [ValidationLevel!], rollbackMethod: RollbackMethod, match: MatchingInput): BulkUpdateOpportunityPayload` Create or update many; per-item results.
- `deleteOpportunity(input: DeleteOpportunityInput!): DeleteOpportunityPayload` Soft-delete.
- `bulkArchiveOpportunity(input: BulkArchiveOpportunityInput!): BulkArchiveOpportunityPayload` Archive many. GraphQL only.
- `bulkReactivateOpportunity(input: BulkReactivateOpportunityInput!): BulkReactivateOpportunityPayload` Undo archive for many. GraphQL only.
- `bulkMoveOpportunity(input: BulkMoveOpportunityInput!): BulkMoveOpportunityPayload` Move many to another step. GraphQL only.
- `convertOpportunity(input: CreateOpportunityInput!, sourceEntity: EntityNameEnum!, sourceEntityId: UUID!, operation: RecordConversionOperationEnum!, options: RecordConversionOptions!, sourceEntityApiName: String, validationLevel: [ValidationLevel!]): ConvertOpportunityPayload` Create from another record. GraphQL only.

## Types

### OpportunityEntity (object)

Potential deal with a value and closing date that moves through the steps of a sales pipeline until it is won or lost.

- `customFields: JSONString! (1 args)` Values of the record's custom fields as a JSON object keyed by custom field apiName (camelCase).
- `pendingScheduledActions: Int` Filled only when a single record is read by its id; otherwise null or an empty list.
- `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.
- `activeQuote: QuoteEntity` Quote currently used to drive the opportunity (e.g. for synchronisation of monetary fields). Empty when no quote is active.
- `currencyExchangeRatesList: CurrencyExchangeRatesListEntity` Currency exchange rate list used to convert monetary fields linked to this opportunity. Empty to inherit the team space default.
- `leadSource: DataEntity` How the opportunity originated (e.g. Website, Referral, Trade Show). Configurable per team space.
- `opptyType: OpportunityTypeEntity` Opportunity type that classifies this opportunity. Each type maps to one pipeline and drives which form, fields and stages apply.
- `owner: ClientEntity` Sales user who owns this opportunity.
- `productCurrency: CurrencyEntity` Currency used for product line-item prices on this opportunity.
- `productPriceList: ProductPriceListEntity` Product price list used to populate prices for product line items added to this opportunity. Empty to use catalog defaults.
- `reasonOfClose: DataEntity` Configurable reason recorded when the opportunity is archived (lost). Required when the lost form mandates it.
- `step: StepEntity` Pipeline step the opportunity is currently sitting in. Reaching the last step in the pipeline marks the opportunity as won; archiving sets it to lost.
- `unit: SalesUnitEntity` Sales unit this opportunity is assigned to. Determines which team members can see the record under unit-based sharing.
- `activeQuoteId: ID` Id of the quote currently synchronized with this opportunity, or empty when no quote is active. A quote can be active on only one opportunity at a time.
- `closingDate: Date!` Expected or actual closing date of the opportunity.
- `currencyExchangeRatesListId: ID` Id of the currency exchange rate list applied to this opportunity.
- `description: String` Free-form description of the opportunity.
- `isArchived: Boolean` True when the opportunity has been archived (lost). Archived opportunities remain readable but are hidden from active lists and cannot be edited until reactivated.
- `isValueAutoCalculate: Boolean` True when value is auto-calculated from the opportunity product line items. False when the user enters value directly.
- `labelFlag: Int` User-set colored flag used to highlight the opportunity in lists and reports.
- `lastAiBuyingCenterApplied: DateTime` Time when an AI-suggested buying center was last applied to this opportunity.
- `leadSourceId: ID` Id of the lead source the opportunity originated from.
- `name: String!` Name of the entity and its default text representation.
- `opptyTypeId: ID` Id of the opportunity type.
- `ownerId: ID!` Id of the opportunity owner.
- `productCurrencyId: ID` Id of the currency used for product line-item prices on this opportunity.
- `productPriceListId: ID` Id of the price list that supplies prices for product line items added to this opportunity, or empty to use catalog defaults.
- `productSections: [ProductSection!]` Product sections grouping the record's line items, as a JSON array of {"id": <UUID>, "name": <string>} objects. Validated on write.
- `quickAccountEmail: String` Free-text company email captured at opportunity creation when no Account record has been linked yet.
- `quickAccountName: String` Free-text company name captured at opportunity creation when no Account record has been linked yet.
- `quickAccountPhone: String` Free-text company phone captured at opportunity creation when no Account record has been linked yet.
- `quickContactName: String` Free-text contact name captured at opportunity creation when no Contact record has been linked yet.
- `quickEmail: String` Free-text contact email captured at opportunity creation when no Contact record has been linked yet.
- `quickPhone: String` Free-text contact phone captured at opportunity creation when no Contact record has been linked yet.
- `ranking: Int` Qualitative ranking score (1-10) the user assigns to indicate the strength of the opportunity.
- `reasonOfCloseDescription: String` Free-form note explaining why the opportunity was archived (lost).
- `reasonOfCloseId: ID` Id of the reason of close option selected when the opportunity was archived (lost).
- `shareMode: ShareModeEnum` Sharing model applied on top of the owner/unit visibility (e.g. shared with selected sales units or selected users). The matching sharingUnits / sharingClients lists control who is granted access.
- `stepId: ID!` Id of the pipeline step.
- `tableName: String!` Discriminator identifying the concrete record type — always "opportunity" for Opportunity records. Read-only; useful when consuming polymorphic LeadOppty results.
- `unitId: ID` Id of the sales unit.
- `wasQualified: Boolean` True when the opportunity has gone through the qualification step at least once.
- `revision: Int` Revision when entity was lastly changed.
- `value: CurrencyForeignField` Monetary value of the opportunity in the team space base currency, with the foreign value and currency code preserved alongside.
- `enrolledEmailSequences: Int!` Number of email sequences this record is currently actively enrolled in (soft-deleted or ended enrollments are not counted).
- `opptyRecurrence: OpptyRecurrenceEntity` Recurrence schedule generating periodic copies of this opportunity, or empty when no recurrence is set up.
- `revenueSchedule: OpptyRevenueScheduleEntity` Revenue schedule splitting the opportunity value across periods, or empty when revenue scheduling is not enabled for this opportunity.
- `productRelations: OpptyProductRelationEntityConnection (8 args)` Product line items on this opportunity. Each entry holds the product, quantity, price and discount that contribute to the opportunity value when isValueAutoCalculate is true.
- `primaryContact: ContactEntity` Primary contact of this opportunity. Set automatically from the contact relation marked as primary.
- `primaryAccount: AccountEntity` Primary account of this opportunity. Set automatically from the account relation marked as primary.
- `contactRelations: LeadOpptyContactRelationEntityConnection (8 args)` Contacts linked to this opportunity, including their roles and org-chart positions.
- `accountRelations: LeadOpptyAccountRelationEntityConnection (8 args)` Accounts linked to this opportunity, including the primary-account flag.
- `documents: CloudObjectRelationEntityConnection (8 args)` Documents linked to this opportunity.
- `quoteRelations: QuoteEntityConnection (7 args)` Quotes prepared for this opportunity.
- `status: OpptyStatusEnum!` Current status of the opportunity (Open, Won, Lost). Read-only; derived from the current pipeline step and the archived flag.
- `qualifyDate: DateTime` Timestamp of when the opportunity was qualified, taken from the matching KPI event. Empty for opportunities that have not been qualified. Read-only.
- `wonDate: DateTime` Timestamp of when the opportunity was won. Setting it adjusts the underlying win event; empty for opportunities that have not been won.
- `lostDate: DateTime` Timestamp of when the opportunity was archived (lost). Setting it adjusts the underlying loss event; empty for opportunities that have not been archived.
- `daysInStep: Int!` Number of days the opportunity has been sitting in its current pipeline step. Read-only; computed by Coevera from the most recent move event and per-step timeframe history.
- `isFavorite: Boolean!` True when the current authenticated user has marked this opportunity as favorite. Per-user.
- `sharingUnits: LeadOpptySharingSalesUnitRelationEntityConnection (8 args)` Sales units that have been granted shared access to this opportunity. Editable only when shareMode allows unit sharing.
- `sharingClients: LeadOpptySharingClientRelationEntityConnection (8 args)` Users that have been granted shared access to this opportunity. Editable only when shareMode allows user sharing.
- `tags: TagRelationEntityConnection (8 args)` Tag labels applied to this opportunity.
- `staticProfiles: ProfileRelationEntityConnection (8 args)` Saved view profiles this opportunity currently matches.
- `fitness: WarningLevelEnum` Filled only when a single record is read by its id; otherwise null or an empty list.
- `fitnessDescription: FitnessDescription` Filled only when a single record is read by its id; otherwise null or an empty list.
- `formattedName: String!` Display version of the opportunity name, used in lists and references.
- `viewerIdsPerSalesUnit: [UUID!]!` Filled only when a single record is read by its id; otherwise null or an empty list.
- `modifiedByUser: DateTime` Timestamp of the most recent modification made by an end user (excluding system changes). Read-only; computed by Coevera.
- `instancePermissions: [EntityPermsEnum!]! (1 args)` Permissions the current user has on this record, out of the requested ones.
- `relatedEntitiesDrilldown: CompactViewDrilldownModel! (1 args)` Records of the given entity type that are related to this record, as a drilldown list.
- `charts: [DashboardChartData!] (1 args)` Data of the given preview pane charts and lists, computed for this record.
- `chartsDrilldown: CompactViewDrilldownModel! (3 args)` Records behind one preview pane chart of this record: all records of a list chart, or the records of a single data point of a report chart.
- `fields: [InterfaceFieldData]! (2 args)` Values of the fields shown in the record's preview pane, as configured for the record's type.
- `stepChecklists: [StepChecklistActivityItem]! (1 args)` Checklist items of the steps of the record's pipeline, with the completion state of each item for this record.
- `approval: ApprovalEntity` Approval request of this record that is pending or was rejected; null when there is none or it was approved.

### OpportunityEntityConnection (object)

Paginated list of Opportunity records.

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

### OpportunityEntityEdge (object)

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

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

### OpportunityFilterInput (input)

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

- `OR: [OpportunityFilterInput!]` Matches records that meet at least one of the listed filters.
- `AND: [OpportunityFilterInput!]` Matches records that meet all of the listed filters.
- `NOT: OpportunityFilterInput` 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.
- `activeQuoteId: EntityFilterStringField` Id of the quote currently synchronized with this opportunity, or empty when no quote is active. A quote can be active on only one opportunity at a time.
- `currencyExchangeRatesListId: EntityFilterStringField` Id of the currency exchange rate list applied to this opportunity.
- `description: EntityFilterStringField` Free-form description of the opportunity.
- `isArchived: Boolean` True when the opportunity has been archived (lost). Archived opportunities remain readable but are hidden from active lists and cannot be edited until reactivated.
- `isValueAutoCalculate: Boolean` True when value is auto-calculated from the opportunity product line items. False when the user enters value directly.
- `labelFlag: LabelFlagEnumFilterInput` User-set colored flag used to highlight the opportunity in lists and reports.
- `lastAiBuyingCenterApplied: EntityFilterDateTimeField` Time when an AI-suggested buying center was last applied to this opportunity.
- `leadSourceId: EntityFilterStringField` Id of the lead source the opportunity originated from.
- `name: EntityFilterStringField` Name of the entity and its default text representation.
- `opptyTypeId: EntityFilterStringField` Id of the opportunity type.
- `ownerId: EntityFilterStringField` Id of the opportunity owner.
- `productCurrencyId: EntityFilterStringField` Id of the currency used for product line-item prices on this opportunity.
- `productPriceListId: EntityFilterStringField` Id of the price list that supplies prices for product line items added to this opportunity, or empty to use catalog defaults.
- `quickAccountEmail: EntityFilterStringField` Free-text company email captured at opportunity creation when no Account record has been linked yet.
- `quickAccountName: EntityFilterStringField` Free-text company name captured at opportunity creation when no Account record has been linked yet.
- `quickAccountPhone: EntityFilterStringField` Free-text company phone captured at opportunity creation when no Account record has been linked yet.
- `quickContactName: EntityFilterStringField` Free-text contact name captured at opportunity creation when no Contact record has been linked yet.
- `quickEmail: EntityFilterStringField` Free-text contact email captured at opportunity creation when no Contact record has been linked yet.
- `quickPhone: EntityFilterStringField` Free-text contact phone captured at opportunity creation when no Contact record has been linked yet.
- `ranking: EntityFilterNumberField` Qualitative ranking score (1-10) the user assigns to indicate the strength of the opportunity.
- `reasonOfCloseDescription: EntityFilterStringField` Free-form note explaining why the opportunity was archived (lost).
- `reasonOfCloseId: EntityFilterStringField` Id of the reason of close option selected when the opportunity was archived (lost).
- `shareMode: ShareModeEnumFilterInput` Sharing model applied on top of the owner/unit visibility (e.g. shared with selected sales units or selected users). The matching sharingUnits / sharingClients lists control who is granted access.
- `stepId: EntityFilterStringField` Id of the pipeline step.
- `tableName: EntityFilterStringField` Discriminator identifying the concrete record type — always "opportunity" for Opportunity records. Read-only; useful when consuming polymorphic LeadOppty results.
- `unitId: EntityFilterStringField` Id of the sales unit.
- `wasQualified: Boolean` True when the opportunity has gone through the qualification step at least once.
- `revision: EntityFilterNumberField` Revision when entity was lastly changed.
- `enrolledEmailSequences: Int` Number of email sequences this record is currently actively enrolled in (soft-deleted or ended enrollments are not counted).
- `pipelineId: EntityFilterStringField` Id of the pipeline the opportunity runs in. Read-only; derived from the opportunity type. Useful as a filter when listing opportunities by pipeline.
- `status: OpptyStatusEnumFilterInput` Current status of the opportunity (Open, Won, Lost). Read-only; derived from the current pipeline step and the archived flag.
- `relatedEntities: [EntityFilterRelatedField]` Matches records related to at least one of the listed records.
- `withCustom: [CustomField!]` Conditions on custom fields, each identified by its api name. All listed conditions must match.
- `activeQuote: QuoteFilterInput` Quote currently used to drive the opportunity (e.g. for synchronisation of monetary fields). Empty when no quote is active. Matches records where a related record meets these conditions.
- `currencyExchangeRatesList: CurrencyExchangeRatesListFilterInput` Currency exchange rate list used to convert monetary fields linked to this opportunity. Empty to inherit the team space default. Matches records where a related record meets these conditions.
- `leadSource: DataFilterInput` How the opportunity originated (e.g. Website, Referral, Trade Show). Configurable per team space. Matches records where a related record meets these conditions.
- `opptyType: OpportunityTypeFilterInput` Opportunity type that classifies this opportunity. Each type maps to one pipeline and drives which form, fields and stages apply. Matches records where a related record meets these conditions.
- `owner: ClientFilterInput` Sales user who owns this opportunity. Matches records where a related record meets these conditions.
- `productCurrency: CurrencyFilterInput` Currency used for product line-item prices on this opportunity. Matches records where a related record meets these conditions.
- `productPriceList: ProductPriceListFilterInput` Product price list used to populate prices for product line items added to this opportunity. Empty to use catalog defaults. Matches records where a related record meets these conditions.
- `reasonOfClose: DataFilterInput` Configurable reason recorded when the opportunity is archived (lost). Required when the lost form mandates it. Matches records where a related record meets these conditions.
- `step: StepFilterInput` Pipeline step the opportunity is currently sitting in. Reaching the last step in the pipeline marks the opportunity as won; archiving sets it to lost. Matches records where a related record meets these conditions.
- `unit: SalesUnitFilterInput` Sales unit this opportunity is assigned to. Determines which team members can see the record under unit-based sharing. Matches records where a related record meets these conditions.
- `opptyRecurrence: OpptyRecurrenceFilterInput` Recurrence schedule generating periodic copies of this opportunity, or empty when no recurrence is set up. Matches records where a related record meets these conditions.
- `revenueSchedule: OpptyRevenueScheduleFilterInput` Revenue schedule splitting the opportunity value across periods, or empty when revenue scheduling is not enabled for this opportunity. Matches records where a related record meets these conditions.
- `productRelations: OpptyProductRelationFilterInput` Product line items on this opportunity. Each entry holds the product, quantity, price and discount that contribute to the opportunity value when isValueAutoCalculate is true. Matches records where a related record meets these conditions.
- `primaryContact: ContactFilterInput` Primary contact of this opportunity. Set automatically from the contact relation marked as primary. Matches records where a related record meets these conditions.
- `primaryAccount: AccountFilterInput` Primary account of this opportunity. Set automatically from the account relation marked as primary. Matches records where a related record meets these conditions.
- `contactRelations: LeadOpptyContactRelationFilterInput` Contacts linked to this opportunity, including their roles and org-chart positions. Matches records where a related record meets these conditions.
- `accountRelations: LeadOpptyAccountRelationFilterInput` Accounts linked to this opportunity, including the primary-account flag. Matches records where a related record meets these conditions.
- `documents: CloudObjectRelationFilterInput` Documents linked to this opportunity. Matches records where a related record meets these conditions.
- `quoteRelations: QuoteFilterInput` Quotes prepared for this opportunity. Matches records where a related record meets these conditions.
- `sharingUnits: LeadOpptySharingSalesUnitRelationFilterInput` Sales units that have been granted shared access to this opportunity. Editable only when shareMode allows unit sharing. Matches records where a related record meets these conditions.
- `sharingClients: LeadOpptySharingClientRelationFilterInput` Users that have been granted shared access to this opportunity. Editable only when shareMode allows user sharing. Matches records where a related record meets these conditions.
- `tags: TagRelationFilterInput` Tag labels applied to this opportunity. Matches records where a related record meets these conditions.
- `staticProfiles: ProfileRelationFilterInput` Saved view profiles this opportunity currently matches. Matches records where a related record meets these conditions.

### OpportunityOrderByInput (input)

Sorting of Opportunity 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.
- `activeQuote: [QuoteOrderByNestedInput!]` Quote currently used to drive the opportunity (e.g. for synchronisation of monetary fields). Empty when no quote is active. Sorts by fields of the related record, listed in order of priority.
- `currencyExchangeRatesList: [CurrencyExchangeRatesListOrderByNestedInput!]` Currency exchange rate list used to convert monetary fields linked to this opportunity. Empty to inherit the team space default. Sorts by fields of the related record, listed in order of priority.
- `leadSource: [DataOrderByNestedInput!]` How the opportunity originated (e.g. Website, Referral, Trade Show). Configurable per team space. Sorts by fields of the related record, listed in order of priority.
- `opptyType: [OpportunityTypeOrderByNestedInput!]` Opportunity type that classifies this opportunity. Each type maps to one pipeline and drives which form, fields and stages apply. Sorts by fields of the related record, listed in order of priority.
- `owner: [ClientOrderByNestedInput!]` Sales user who owns this opportunity. Sorts by fields of the related record, listed in order of priority.
- `productPriceList: [ProductPriceListOrderByNestedInput!]` Product price list used to populate prices for product line items added to this opportunity. Empty to use catalog defaults. Sorts by fields of the related record, listed in order of priority.
- `reasonOfClose: [DataOrderByNestedInput!]` Configurable reason recorded when the opportunity is archived (lost). Required when the lost form mandates it. Sorts by fields of the related record, listed in order of priority.
- `step: [StepOrderByNestedInput!]` Pipeline step the opportunity is currently sitting in. Reaching the last step in the pipeline marks the opportunity as won; archiving sets it to lost. Sorts by fields of the related record, listed in order of priority.
- `unit: [SalesUnitOrderByNestedInput!]` Sales unit this opportunity is assigned to. Determines which team members can see the record under unit-based sharing. Sorts by fields of the related record, listed in order of priority.
- `activeQuoteId: OrderByEnum` Id of the quote currently synchronized with this opportunity, or empty when no quote is active. A quote can be active on only one opportunity at a time.
- `closingDate: OrderByEnum` Expected or actual closing date of the opportunity.
- `currencyExchangeRatesListId: OrderByEnum` Id of the currency exchange rate list applied to this opportunity.
- `description: OrderByEnum` Free-form description of the opportunity.
- `isArchived: OrderByEnum` True when the opportunity has been archived (lost). Archived opportunities remain readable but are hidden from active lists and cannot be edited until reactivated.
- `isValueAutoCalculate: OrderByEnum` True when value is auto-calculated from the opportunity product line items. False when the user enters value directly.
- `labelFlag: OrderByEnum` User-set colored flag used to highlight the opportunity in lists and reports.
- `leadSourceId: OrderByEnum` Id of the lead source the opportunity originated from.
- `name: OrderByEnum` Name of the entity and its default text representation.
- `opptyTypeId: OrderByEnum` Id of the opportunity type.
- `ownerId: OrderByEnum` Id of the opportunity owner.
- `productPriceListId: OrderByEnum` Id of the price list that supplies prices for product line items added to this opportunity, or empty to use catalog defaults.
- `quickAccountEmail: OrderByEnum` Free-text company email captured at opportunity creation when no Account record has been linked yet.
- `quickAccountName: OrderByEnum` Free-text company name captured at opportunity creation when no Account record has been linked yet.
- `quickAccountPhone: OrderByEnum` Free-text company phone captured at opportunity creation when no Account record has been linked yet.
- `quickContactName: OrderByEnum` Free-text contact name captured at opportunity creation when no Contact record has been linked yet.
- `quickEmail: OrderByEnum` Free-text contact email captured at opportunity creation when no Contact record has been linked yet.
- `quickPhone: OrderByEnum` Free-text contact phone captured at opportunity creation when no Contact record has been linked yet.
- `ranking: OrderByEnum` Qualitative ranking score (1-10) the user assigns to indicate the strength of the opportunity.
- `reasonOfCloseDescription: OrderByEnum` Free-form note explaining why the opportunity was archived (lost).
- `reasonOfCloseId: OrderByEnum` Id of the reason of close option selected when the opportunity was archived (lost).
- `shareMode: OrderByEnum` Sharing model applied on top of the owner/unit visibility (e.g. shared with selected sales units or selected users). The matching sharingUnits / sharingClients lists control who is granted access.
- `stepId: OrderByEnum` Id of the pipeline step.
- `unitId: OrderByEnum` Id of the sales unit.
- `wasQualified: OrderByEnum` True when the opportunity has gone through the qualification step at least once.
- `revision: OrderByEnum` Revision when entity was lastly changed.
- `value: OrderByEnum` Monetary value of the opportunity in the team space base currency, with the foreign value and currency code preserved alongside.
- `enrolledEmailSequences: OrderByEnum` Number of email sequences this record is currently actively enrolled in (soft-deleted or ended enrollments are not counted).
- `opptyRecurrence: [OpptyRecurrenceOrderByNestedInput!]` Recurrence schedule generating periodic copies of this opportunity, or empty when no recurrence is set up. Sorts by fields of the related record, listed in order of priority.
- `revenueSchedule: [OpptyRevenueScheduleOrderByNestedInput!]` Revenue schedule splitting the opportunity value across periods, or empty when revenue scheduling is not enabled for this opportunity. Sorts by fields of the related record, listed in order of priority.
- `status: OrderByEnum` Current status of the opportunity (Open, Won, Lost). Read-only; derived from the current pipeline step and the archived flag.
- `relatedEntities: CommonEntityRepositoryOrderByEntityRelationField` Sorts records by whether they are related to the listed records.
- `withCustom: CommonEntityRepositoryOrderByCustomField` Sorts by a custom field.

### OpptyStatusEnumFilterInput (input)

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

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

### ArchiveOpportunityInput (input)

Parameters of the archiveOpportunity mutation.

- `entity: UpdateOpportunityInput!` Id of the opportunity and optional field values to save together with the archive, such as reasonOfCloseId.
- `memoText: String` Text of a memo added to the opportunity together with the archive.
- `completeActivityIds: [UUID!]` Ids of tasks linked to the opportunity to mark as completed.
- `archiveQuoteIds: [UUID!]` Ids of the opportunity's open quotes to archive as canceled.
- `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).

### BulkArchiveOpportunityInput (input)

Parameters of the bulkArchiveOpportunity mutation.

- `bulkFilter: BulkOperationInput!` Opportunities to archive: includedIds minus excludedIds. Integrations can leave sessionId empty.
- `entity: CreateOrUpdateOpportunityInput!` Field values saved on every archived opportunity, such as reasonOfCloseId.
- `memoText: String` Text of a memo added to every archived opportunity.
- `completeActivityIds: [UUID!]` Ids of linked tasks to mark as completed.
- `archiveQuoteIds: [UUID!]` Ids of open quotes of these opportunities to archive as canceled.
- `rollbackMethod: RollbackMethod` ROLLBACK_ALL fails the whole request when any item fails; ROLLBACK_FAILED skips only the failed items and reports them in errors.
- `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).

### BulkMoveOpportunityInput (input)

Parameters of the bulkMoveOpportunity mutation.

- `bulkFilter: BulkOperationInput!` Opportunities to move: includedIds minus excludedIds. Integrations can leave sessionId empty.
- `entity: CreateOrUpdateOpportunityInput!` Target step (stepId) and field values applied to every opportunity.
- `memoText: String` Text of a memo added to every moved opportunity.
- `completeActivityIds: [UUID!]` Ids of linked tasks to mark as completed.
- `acceptQuoteIds: [UUID!]` Ids of open quotes of these opportunities to move to their last (accepted) step.
- `archiveQuoteIds: [UUID!]` Ids of open quotes of these opportunities to archive as canceled.
- `rollbackMethod: RollbackMethod` ROLLBACK_ALL fails the whole request when any item fails; ROLLBACK_FAILED skips only the failed items and reports them in errors.
- `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).

### BulkReactivateOpportunityInput (input)

Parameters of the bulkReactivateOpportunity mutation.

- `bulkFilter: BulkOperationInput!` Opportunities to reactivate: includedIds minus excludedIds. Integrations can leave sessionId empty.
- `closingDate: Date` New expected closing date set on every reactivated opportunity; when empty, each opportunity keeps its current closing date.
- `rollbackMethod: RollbackMethod` ROLLBACK_ALL fails the whole request when any item fails; ROLLBACK_FAILED skips only the failed items and reports them in errors.
- `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).

### ChangeLabelFlagOpportunityInput (input)

Parameters of the changeLabelFlagOpportunity mutation.

- `hot: Boolean!` Marks the record as hot.
- `priority: Boolean!` Marks the record as priority.
- `stalled: Boolean!` Marks the record as stalled.
- `id: ID!` Identifier of the OpportunityEntity to perform the action on.
- `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).

### ChangeOwnershipOpportunityInput (input)

Parameters of the changeOwnershipOpportunity mutation.

- `ownerId: ID!` User who becomes the new owner of the record.
- `unitId: ID!` Sales unit the record is assigned to.
- `keepOwnerAsEditor: Boolean!` When true, the previous owner (if still an active user) stays on the record as a shared user with the Editor role, and a Private sharing mode is switched to Standard.
- `transferLinkedRecords: Boolean!` When true, the new owner and sales unit are also applied to the record's open tasks and appointments and its notes. Linked records that cannot be transferred are skipped without failing the mutation.
- `id: ID!` Identifier of the OpportunityEntity to perform the action on.
- `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).

### ChangePipelineOpportunityInput (input)

Parameters of the changePipelineOpportunity mutation.

- `entity: UpdateOpportunityInput!` Id of the opportunity, the target stepId, an optional new ownerId or unitId, and any other field values to save.
- `keepOwnerAsEditor: Boolean!` Adds the previous owner as an editor of the opportunity; a private opportunity becomes shared.
- `transferLinkedRecords: Boolean!` Gives the new owner the opportunity's open activities and its notes.
- `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).

### CreateOpportunityInput (input)

Field values of a new Opportunity record.

- `clientMutationId: String` Optional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).
- `modified: DateTime` Last modification time.
- `created: DateTime` Creation time.
- `activeQuoteId: ID` Id of the quote currently synchronized with this opportunity, or empty when no quote is active. A quote can be active on only one opportunity at a time.
- `closingDate: Date!` Expected or actual closing date of the opportunity.
- `currencyExchangeRatesListId: ID` Id of the currency exchange rate list applied to this opportunity.
- `description: String` Free-form description of the opportunity.
- `isArchived: Boolean` True when the opportunity has been archived (lost). Archived opportunities remain readable but are hidden from active lists and cannot be edited until reactivated.
- `isValueAutoCalculate: Boolean` True when value is auto-calculated from the opportunity product line items. False when the user enters value directly.
- `labelFlag: Int` User-set colored flag used to highlight the opportunity in lists and reports.
- `lastAiBuyingCenterApplied: DateTime` Time when an AI-suggested buying center was last applied to this opportunity.
- `leadSourceId: ID` Id of the lead source the opportunity originated from.
- `name: String!` Name of the entity and its default text representation.
- `opptyTypeId: ID` Id of the opportunity type.
- `ownerId: ID!` Id of the opportunity owner.
- `productCurrencyId: ID` Id of the currency used for product line-item prices on this opportunity.
- `productPriceListId: ID` Id of the price list that supplies prices for product line items added to this opportunity, or empty to use catalog defaults.
- `productSections: JSONString` Product sections grouping the record's line items, as a JSON array of {"id": <UUID>, "name": <string>} objects. Validated on write.
- `quickAccountEmail: String` Free-text company email captured at opportunity creation when no Account record has been linked yet.
- `quickAccountName: String` Free-text company name captured at opportunity creation when no Account record has been linked yet.
- `quickAccountPhone: String` Free-text company phone captured at opportunity creation when no Account record has been linked yet.
- `quickContactName: String` Free-text contact name captured at opportunity creation when no Contact record has been linked yet.
- `quickEmail: String` Free-text contact email captured at opportunity creation when no Contact record has been linked yet.
- `quickPhone: String` Free-text contact phone captured at opportunity creation when no Contact record has been linked yet.
- `ranking: Int` Qualitative ranking score (1-10) the user assigns to indicate the strength of the opportunity.
- `reasonOfCloseDescription: String` Free-form note explaining why the opportunity was archived (lost).
- `reasonOfCloseId: ID` Id of the reason of close option selected when the opportunity was archived (lost).
- `shareMode: ShareModeEnum` Sharing model applied on top of the owner/unit visibility (e.g. shared with selected sales units or selected users). The matching sharingUnits / sharingClients lists control who is granted access.
- `stepId: ID!` Id of the pipeline step.
- `unitId: ID` Id of the sales unit.
- `wasQualified: Boolean` True when the opportunity has gone through the qualification step at least once.
- `customFields: JSONString` Custom field values to set, as a JSON object keyed by custom field API name, e.g. {"cfBudget": 1000}. Only the custom fields included are changed; each value uses the format of that field.
- `revision: Int` Revision when entity was lastly changed.
- `value: CurrencyForeignFieldInput` Monetary value of the opportunity in the team space base currency, with the foreign value and currency code preserved alongside.
- `opptyRecurrence: CreateOpptyRecurrenceNoOpptyBackrefInput` Recurrence schedule generating periodic copies of this opportunity, or empty when no recurrence is set up.
- `revenueSchedule: CreateOpptyRevenueScheduleNoIdBackrefInput` Revenue schedule splitting the opportunity value across periods, or empty when revenue scheduling is not enabled for this opportunity.
- `productRelations: [CreateOpptyProductRelationNoBackrefInput!]` Product line items on this opportunity. Each entry holds the product, quantity, price and discount that contribute to the opportunity value when isValueAutoCalculate is true.
- `contactRelations: [CreateLeadOpptyContactRelationNoLeadOpptyBackrefInput!]` Contacts linked to this opportunity, including their roles and org-chart positions.
- `accountRelations: [CreateLeadOpptyAccountRelationNoLeadOpptyBackrefInput!]` Accounts linked to this opportunity, including the primary-account flag.
- `documents: [CreateCloudObjectRelationNoBackrefInput!]` Documents linked to this opportunity.
- `quoteRelations: [CreateQuoteNoOpptyBackrefInput!]` Quotes prepared for this opportunity.
- `wonDate: DateTime` Timestamp of when the opportunity was won. Setting it adjusts the underlying win event; empty for opportunities that have not been won.
- `lostDate: DateTime` Timestamp of when the opportunity was archived (lost). Setting it adjusts the underlying loss event; empty for opportunities that have not been archived.
- `sharingUnits: [CreateLeadOpptySharingSalesUnitRelationNoLeadOpptyBackrefInput!]` Sales units that have been granted shared access to this opportunity. Editable only when shareMode allows unit sharing.
- `sharingClients: [CreateLeadOpptySharingClientRelationNoLeadOpptyBackrefInput!]` Users that have been granted shared access to this opportunity. Editable only when shareMode allows user sharing.
- `tags: [CreateTagRelationNoOpptyBackrefInput!]` Tag labels applied to this opportunity.
- `staticProfiles: [CreateProfileRelationNoLeadOpptyBackrefInput!]` Saved view profiles this opportunity currently matches.

### CreateOpptyRecurrenceNoOpptyBackrefInput (input)

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

- `applyRecurrence: Boolean` Default true. When set, then reccurence will apply when other conditions passed. With the value false (e.g. when skip button is used) then recurrence will not apply
- `modified: DateTime` Last modification time.
- `created: DateTime` Creation time.
- `condition: Int` Bit Flag field, with limited combination of integer values.
- `day: DateDayEnum` Field whose values are strictly defined with an enumeration of values. The day of the month. This setting is applicable only for RecurrenceTypeEnum.MonthlyRelative and RecurrenceTypeEnum.YearlyRelative.
- `dayOfWeek: Int` Bit Flag field, with limited combination of integer values.
- `endDate: Date` Date information. The last date when no more other items should be created.
- `month: DateMonthEnum` Field whose values are strictly defined with an enumeration of values. The number of month this setting is applicable only for RecurrenceTypeEnum.YearlyAbsolute and RecurrenceTypeEnum.YearlyRelative.
- `occurEvery: Int` The number of units of a given recurrence type between occurrences according to RecurrenceTypeEnum.
- `occurrencesCount: Int` Whole natural number. The number of remaining occurrences. Each time a new one is created, it decreases. When item is set to 1, only last one can be created. If it is set to 0, recurrence is stopped. If -1, no limits are applied.
- `startDate: Date!` Date information. The effective start date of recurrence, which means each next recurrence must be on or after this date.
- `stepId: ID!` Id of the pipeline step the opportunities created by the recurrence start in.
- `type: RecurrenceTypeEnum` Recurrence cadence (e.g. Daily, Weekly, MonthlyAbsolute, MonthlyRelative, YearlyAbsolute, YearlyRelative).
- `week: DateWeekEnum` Field whose values are strictly defined with an enumeration of values. The week of month. This setting is applicable only for RecurrenceTypeEnum.MonthlyAbsolute and RecurrenceTypeEnum.YearlyAbsolute.
- `revision: Int` Revision when entity was lastly changed.

### CreateOpptyRevenueScheduleNoIdBackrefInput (input)

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

- `isDeleted: Boolean` Specifies if the entity is considered deleted.
- `modified: DateTime` Last modification time.
- `created: DateTime` Creation time.
- `cancelationDate: Date` Date when the revenue schedule was cancelled. Empty for active schedules.
- `periodCount: Int` Number of periods the opportunity value is split into.
- `periodType: RevenueSchedulePeriodTypeEnum` Length of each period (e.g. Monthly, Quarterly, Yearly).
- `startDate: Date` Date when revenue recognition for the opportunity begins.
- `revision: Int` Revision when entity was lastly changed.

### CreateOrUpdateOpportunityInput (input)

Field values of an Opportunity 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.
- `activeQuoteId: ID` Id of the quote currently synchronized with this opportunity, or empty when no quote is active. A quote can be active on only one opportunity at a time.
- `closingDate: Date` Expected or actual closing date of the opportunity.
- `currencyExchangeRatesListId: ID` Id of the currency exchange rate list applied to this opportunity.
- `description: String` Free-form description of the opportunity.
- `isArchived: Boolean` True when the opportunity has been archived (lost). Archived opportunities remain readable but are hidden from active lists and cannot be edited until reactivated.
- `isValueAutoCalculate: Boolean` True when value is auto-calculated from the opportunity product line items. False when the user enters value directly.
- `labelFlag: Int` User-set colored flag used to highlight the opportunity in lists and reports.
- `lastAiBuyingCenterApplied: DateTime` Time when an AI-suggested buying center was last applied to this opportunity.
- `leadSourceId: ID` Id of the lead source the opportunity originated from.
- `name: String` Name of the entity and its default text representation.
- `opptyTypeId: ID` Id of the opportunity type.
- `ownerId: ID` Id of the opportunity owner.
- `productCurrencyId: ID` Id of the currency used for product line-item prices on this opportunity.
- `productPriceListId: ID` Id of the price list that supplies prices for product line items added to this opportunity, or empty to use catalog defaults.
- `productSections: JSONString` Product sections grouping the record's line items, as a JSON array of {"id": <UUID>, "name": <string>} objects. Validated on write.
- `quickAccountEmail: String` Free-text company email captured at opportunity creation when no Account record has been linked yet.
- `quickAccountName: String` Free-text company name captured at opportunity creation when no Account record has been linked yet.
- `quickAccountPhone: String` Free-text company phone captured at opportunity creation when no Account record has been linked yet.
- `quickContactName: String` Free-text contact name captured at opportunity creation when no Contact record has been linked yet.
- `quickEmail: String` Free-text contact email captured at opportunity creation when no Contact record has been linked yet.
- `quickPhone: String` Free-text contact phone captured at opportunity creation when no Contact record has been linked yet.
- `ranking: Int` Qualitative ranking score (1-10) the user assigns to indicate the strength of the opportunity.
- `reasonOfCloseDescription: String` Free-form note explaining why the opportunity was archived (lost).
- `reasonOfCloseId: ID` Id of the reason of close option selected when the opportunity was archived (lost).
- `shareMode: ShareModeEnum` Sharing model applied on top of the owner/unit visibility (e.g. shared with selected sales units or selected users). The matching sharingUnits / sharingClients lists control who is granted access.
- `stepId: ID` Id of the pipeline step.
- `unitId: ID` Id of the sales unit.
- `wasQualified: Boolean` True when the opportunity has gone through the qualification step at least once.
- `customFields: JSONString` Custom field values to set, as a JSON object keyed by custom field API name, e.g. {"cfBudget": 1000}. Only the custom fields included are changed; each value uses the format of that field.
- `revision: Int` Revision when entity was lastly changed.
- `value: CurrencyForeignFieldInput` Monetary value of the opportunity in the team space base currency, with the foreign value and currency code preserved alongside.
- `opptyRecurrence: UpdateOpptyRecurrenceNoOpptyBackrefInput` Recurrence schedule generating periodic copies of this opportunity, or empty when no recurrence is set up.
- `revenueSchedule: UpdateOpptyRevenueScheduleNoIdBackrefInput` Revenue schedule splitting the opportunity value across periods, or empty when revenue scheduling is not enabled for this opportunity.
- `productRelations: [CreateOrUpdateOpptyProductRelationNoBackrefInput!]` Product line items on this opportunity. Each entry holds the product, quantity, price and discount that contribute to the opportunity value when isValueAutoCalculate is true.
- `contactRelations: [CreateLeadOpptyContactRelationNoLeadOpptyBackrefInput!]` Contacts linked to this opportunity, including their roles and org-chart positions.
- `accountRelations: [CreateLeadOpptyAccountRelationNoLeadOpptyBackrefInput!]` Accounts linked to this opportunity, including the primary-account flag.
- `documents: [CreateCloudObjectRelationNoBackrefInput!]` Documents linked to this opportunity.
- `quoteRelations: [CreateQuoteNoOpptyBackrefInput!]` Quotes prepared for this opportunity.
- `wonDate: DateTime` Timestamp of when the opportunity was won. Setting it adjusts the underlying win event; empty for opportunities that have not been won.
- `lostDate: DateTime` Timestamp of when the opportunity was archived (lost). Setting it adjusts the underlying loss event; empty for opportunities that have not been archived.
- `sharingUnits: [CreateLeadOpptySharingSalesUnitRelationNoLeadOpptyBackrefInput!]` Sales units that have been granted shared access to this opportunity. Editable only when shareMode allows unit sharing.
- `sharingClients: [CreateLeadOpptySharingClientRelationNoLeadOpptyBackrefInput!]` Users that have been granted shared access to this opportunity. Editable only when shareMode allows user sharing.
- `tags: [CreateTagRelationNoOpptyBackrefInput!]` Tag labels applied to this opportunity.
- `staticProfiles: [CreateProfileRelationNoLeadOpptyBackrefInput!]` Saved view profiles this opportunity currently matches.

### CreateQuoteNoOpptyBackrefInput (input)

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

- `modified: DateTime` Last modification time.
- `created: DateTime` Creation time.
- `currencyExchangeRatesListId: ID` Id of the currency exchange rate list applied to this quote.
- `description: String` Free-form description of the quote.
- `expirationDate: Date` Date after which the quote is no longer considered valid.
- `isArchived: Boolean` True when the quote has been archived (lost). Archived quotes remain readable but are hidden from active lists and cannot be edited until reactivated.
- `name: String!` Name of the entity and its default text representation.
- `ownerId: ID!` Id of the quote owner.
- `productCurrencyId: ID` Id of the currency used for product line-item prices on this quote.
- `productPriceListId: ID` Id of the price list that supplies prices for product line items added to this quote, or empty to use catalog defaults.
- `productSections: JSONString` Product sections grouping the record's line items, as a JSON array of {"id": <UUID>, "name": <string>} objects. Validated on write.
- `quickAccountEmail: String` Free-text company email captured at quote creation when no Account record has been linked yet.
- `quickAccountName: String` Free-text company name captured at quote creation when no Account record has been linked yet.
- `quickAccountPhone: String` Free-text company phone captured at quote creation when no Account record has been linked yet.
- `quickContactName: String` Free-text contact name captured at quote creation when no Contact record has been linked yet.
- `quickEmail: String` Free-text contact email captured at quote creation when no Contact record has been linked yet.
- `quickPhone: String` Free-text contact phone captured at quote creation when no Contact record has been linked yet.
- `quoteTypeId: ID` Id of the quote type that classifies this quote.
- `reasonOfCloseDescription: String` Free-form note explaining why the quote was archived (lost).
- `reasonOfCloseId: ID` Id of the reason of close option selected when the quote was archived (lost).
- `shareMode: ShareModeEnum` Sharing model applied on top of the owner/unit visibility (e.g. shared with selected sales units or selected users). The matching sharingUnits / sharingClients lists control who is granted access.
- `stepId: ID!` Id of the quote-process step.
- `unitId: ID` Id of the sales unit.
- `version: Int` Revision number of the quote, incremented when a new version of the same quote is created.
- `customFields: JSONString` Custom field values to set, as a JSON object keyed by custom field API name, e.g. {"cfBudget": 1000}. Only the custom fields included are changed; each value uses the format of that field.
- `revision: Int` Revision when entity was lastly changed.
- `totalAmount: CurrencyForeignFieldInput` Total monetary value of the quote in the team space base currency, with the foreign value and currency code preserved alongside.
- `productRelations: [CreateOpptyProductRelationNoBackrefInput!]` Product line items on this quote. Each entry holds the product, quantity, price and discount that contribute to totalAmount.
- `contactRelations: [CreateQuoteContactRelationNoQuoteBackrefInput!]` Contacts linked to this quote.
- `accountRelations: [CreateQuoteAccountRelationNoQuoteBackrefInput!]` Accounts linked to this quote, including the primary-account flag.
- `documents: [CreateCloudObjectRelationNoBackrefInput!]` Documents linked to this quote.
- `sharingUnits: [CreateQuoteSharingSalesUnitRelationNoQuoteBackrefInput!]` Sales units that have been granted shared access to this quote. Editable only when shareMode allows unit sharing.
- `sharingClients: [CreateQuoteSharingClientRelationNoQuoteBackrefInput!]` Users that have been granted shared access to this quote. Editable only when shareMode allows user sharing.
- `isActiveInOpportunity: Boolean` If quote is set as active in opportunity.
- `staticProfiles: [CreateProfileRelationNoQuoteBackrefInput!]` Saved view profiles this quote currently matches.
- `tags: [CreateTagRelationNoQuoteBackrefInput!]` Tag labels applied to this quote.

### CreateTagRelationNoOpptyBackrefInput (input)

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

- `modified: DateTime` Last modification time.
- `created: DateTime` Creation time.
- `accountId: ID` Id of the linked account.
- `appointmentId: ID` Id of the linked appointment.
- `contactId: ID` Id of the linked contact.
- `customEntityId: ID` Id of the linked custom entity record.
- `emailId: ID` Id of the linked email.
- `leadId: ID` Id of the linked lead.
- `processId: ID` Id of the linked sales process.
- `projectId: ID` Id of the linked project.
- `quoteId: ID` Id of the linked quote.
- `solutionId: ID` Id of the linked solution.
- `tagId: ID!` Id of the tag attached to the record.
- `taskId: ID` Id of the linked task.
- `revision: Int` Revision when entity was lastly changed.

### DeleteOpportunityInput (input)

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

### ManageSharingOpportunityInput (input)

Parameters of the manageSharingOpportunity mutation.

- `shareMode: ShareModeEnum!` Sharing mode of the record: Standard, Private, AllView or AllEdit.
- `sharingClients: [CreateLeadOpptySharingClientRelationNoLeadOpptyBackrefInput!]` Users the record is shared with, each with the Watcher (view) or Editor (edit) role. Send an empty list to remove all shared users.
- `sharingUnits: [CreateLeadOpptySharingSalesUnitRelationNoLeadOpptyBackrefInput!]` Sales units the record is shared with, each with the Watcher or Editor role. Send an empty list to remove all shared units.
- `id: ID!` Identifier of the OpportunityEntity to perform the action on.
- `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).

### MoveOpportunityInput (input)

Parameters of the moveOpportunity mutation.

- `entity: UpdateOpportunityInput!` Id of the opportunity, the target step (stepId) and any field values to save with the move.
- `memoText: String` Text of a memo added to the opportunity together with the move.
- `completeActivityIds: [UUID!]` Ids of tasks linked to the opportunity or its quotes to mark as completed.
- `acceptQuoteIds: [UUID!]` Ids of the opportunity's open quotes to move to the last (accepted) step of their quote process.
- `archiveQuoteIds: [UUID!]` Ids of the opportunity's open quotes to archive as canceled.
- `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).

### OpptyRecurrenceOrderByNestedInput (input)

Sorting by a field of the related OpptyRecurrence record. Set exactly one field in each item.

- `id: OrderByEnum` Unique identifier of entity.
- `isDeleted: OrderByEnum` Specifies if the entity is considered deleted.
- `modified: OrderByEnum` Last modification time.
- `created: OrderByEnum` Creation time.
- `condition: OrderByEnum` Bit Flag field, with limited combination of integer values.
- `day: OrderByEnum` Field whose values are strictly defined with an enumeration of values. The day of the month. This setting is applicable only for RecurrenceTypeEnum.MonthlyRelative and RecurrenceTypeEnum.YearlyRelative.
- `dayOfWeek: OrderByEnum` Bit Flag field, with limited combination of integer values.
- `endDate: OrderByEnum` Date information. The last date when no more other items should be created.
- `month: OrderByEnum` Field whose values are strictly defined with an enumeration of values. The number of month this setting is applicable only for RecurrenceTypeEnum.YearlyAbsolute and RecurrenceTypeEnum.YearlyRelative.
- `occurEvery: OrderByEnum` The number of units of a given recurrence type between occurrences according to RecurrenceTypeEnum.
- `occurrencesCount: OrderByEnum` Whole natural number. The number of remaining occurrences. Each time a new one is created, it decreases. When item is set to 1, only last one can be created. If it is set to 0, recurrence is stopped. If -1, no limits are applied.
- `opptyId: OrderByEnum` Id of the parent opportunity.
- `startDate: OrderByEnum` Date information. The effective start date of recurrence, which means each next recurrence must be on or after this date.
- `stepId: OrderByEnum` Id of the pipeline step the opportunities created by the recurrence start in.
- `type: OrderByEnum` Recurrence cadence (e.g. Daily, Weekly, MonthlyAbsolute, MonthlyRelative, YearlyAbsolute, YearlyRelative).
- `week: OrderByEnum` Field whose values are strictly defined with an enumeration of values. The week of month. This setting is applicable only for RecurrenceTypeEnum.MonthlyAbsolute and RecurrenceTypeEnum.YearlyAbsolute.
- `revision: OrderByEnum` Revision when entity was lastly changed.

### RestoreOpportunityInput (input)

Parameters of the restoreOpportunity mutation.

- `id: ID!` Identifier of the OpportunityEntity to perform the action on.
- `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).

### UpdateOpportunityInput (input)

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

- `clientMutationId: String` Optional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).
- `id: ID!` Unique identifier of entity.
- `modified: DateTime` Last modification time.
- `created: DateTime` Creation time.
- `activeQuoteId: ID` Id of the quote currently synchronized with this opportunity, or empty when no quote is active. A quote can be active on only one opportunity at a time.
- `closingDate: Date` Expected or actual closing date of the opportunity.
- `currencyExchangeRatesListId: ID` Id of the currency exchange rate list applied to this opportunity.
- `description: String` Free-form description of the opportunity.
- `isArchived: Boolean` True when the opportunity has been archived (lost). Archived opportunities remain readable but are hidden from active lists and cannot be edited until reactivated.
- `isValueAutoCalculate: Boolean` True when value is auto-calculated from the opportunity product line items. False when the user enters value directly.
- `labelFlag: Int` User-set colored flag used to highlight the opportunity in lists and reports.
- `lastAiBuyingCenterApplied: DateTime` Time when an AI-suggested buying center was last applied to this opportunity.
- `leadSourceId: ID` Id of the lead source the opportunity originated from.
- `name: String` Name of the entity and its default text representation.
- `opptyTypeId: ID` Id of the opportunity type.
- `ownerId: ID` Id of the opportunity owner.
- `productCurrencyId: ID` Id of the currency used for product line-item prices on this opportunity.
- `productPriceListId: ID` Id of the price list that supplies prices for product line items added to this opportunity, or empty to use catalog defaults.
- `productSections: JSONString` Product sections grouping the record's line items, as a JSON array of {"id": <UUID>, "name": <string>} objects. Validated on write.
- `quickAccountEmail: String` Free-text company email captured at opportunity creation when no Account record has been linked yet.
- `quickAccountName: String` Free-text company name captured at opportunity creation when no Account record has been linked yet.
- `quickAccountPhone: String` Free-text company phone captured at opportunity creation when no Account record has been linked yet.
- `quickContactName: String` Free-text contact name captured at opportunity creation when no Contact record has been linked yet.
- `quickEmail: String` Free-text contact email captured at opportunity creation when no Contact record has been linked yet.
- `quickPhone: String` Free-text contact phone captured at opportunity creation when no Contact record has been linked yet.
- `ranking: Int` Qualitative ranking score (1-10) the user assigns to indicate the strength of the opportunity.
- `reasonOfCloseDescription: String` Free-form note explaining why the opportunity was archived (lost).
- `reasonOfCloseId: ID` Id of the reason of close option selected when the opportunity was archived (lost).
- `shareMode: ShareModeEnum` Sharing model applied on top of the owner/unit visibility (e.g. shared with selected sales units or selected users). The matching sharingUnits / sharingClients lists control who is granted access.
- `stepId: ID` Id of the pipeline step.
- `unitId: ID` Id of the sales unit.
- `wasQualified: Boolean` True when the opportunity has gone through the qualification step at least once.
- `customFields: JSONString` Custom field values to set, as a JSON object keyed by custom field API name, e.g. {"cfBudget": 1000}. Only the custom fields included are changed; each value uses the format of that field.
- `revision: Int` Revision when entity was lastly changed.
- `value: CurrencyForeignFieldInput` Monetary value of the opportunity in the team space base currency, with the foreign value and currency code preserved alongside.
- `opptyRecurrence: UpdateOpptyRecurrenceNoOpptyBackrefInput` Recurrence schedule generating periodic copies of this opportunity, or empty when no recurrence is set up.
- `revenueSchedule: UpdateOpptyRevenueScheduleNoIdBackrefInput` Revenue schedule splitting the opportunity value across periods, or empty when revenue scheduling is not enabled for this opportunity.
- `productRelations: [CreateOrUpdateOpptyProductRelationNoBackrefInput!]` Product line items on this opportunity. Each entry holds the product, quantity, price and discount that contribute to the opportunity value when isValueAutoCalculate is true.
- `contactRelations: [CreateLeadOpptyContactRelationNoLeadOpptyBackrefInput!]` Contacts linked to this opportunity, including their roles and org-chart positions.
- `accountRelations: [CreateLeadOpptyAccountRelationNoLeadOpptyBackrefInput!]` Accounts linked to this opportunity, including the primary-account flag.
- `documents: [CreateCloudObjectRelationNoBackrefInput!]` Documents linked to this opportunity.
- `quoteRelations: [CreateQuoteNoOpptyBackrefInput!]` Quotes prepared for this opportunity.
- `wonDate: DateTime` Timestamp of when the opportunity was won. Setting it adjusts the underlying win event; empty for opportunities that have not been won.
- `lostDate: DateTime` Timestamp of when the opportunity was archived (lost). Setting it adjusts the underlying loss event; empty for opportunities that have not been archived.
- `sharingUnits: [CreateLeadOpptySharingSalesUnitRelationNoLeadOpptyBackrefInput!]` Sales units that have been granted shared access to this opportunity. Editable only when shareMode allows unit sharing.
- `sharingClients: [CreateLeadOpptySharingClientRelationNoLeadOpptyBackrefInput!]` Users that have been granted shared access to this opportunity. Editable only when shareMode allows user sharing.
- `tags: [CreateTagRelationNoOpptyBackrefInput!]` Tag labels applied to this opportunity.
- `staticProfiles: [CreateProfileRelationNoLeadOpptyBackrefInput!]` Saved view profiles this opportunity currently matches.

### UpdateOpptyRecurrenceNoOpptyBackrefInput (input)

Id of an OpptyRecurrence record and the field values to change, updated together with the record it belongs to.

- `applyRecurrence: Boolean` Default true. When set, then reccurence will apply when other conditions passed. With the value false (e.g. when skip button is used) then recurrence will not apply
- `modified: DateTime` Last modification time.
- `created: DateTime` Creation time.
- `condition: Int` Bit Flag field, with limited combination of integer values.
- `day: DateDayEnum` Field whose values are strictly defined with an enumeration of values. The day of the month. This setting is applicable only for RecurrenceTypeEnum.MonthlyRelative and RecurrenceTypeEnum.YearlyRelative.
- `dayOfWeek: Int` Bit Flag field, with limited combination of integer values.
- `endDate: Date` Date information. The last date when no more other items should be created.
- `month: DateMonthEnum` Field whose values are strictly defined with an enumeration of values. The number of month this setting is applicable only for RecurrenceTypeEnum.YearlyAbsolute and RecurrenceTypeEnum.YearlyRelative.
- `occurEvery: Int` The number of units of a given recurrence type between occurrences according to RecurrenceTypeEnum.
- `occurrencesCount: Int` Whole natural number. The number of remaining occurrences. Each time a new one is created, it decreases. When item is set to 1, only last one can be created. If it is set to 0, recurrence is stopped. If -1, no limits are applied.
- `startDate: Date` Date information. The effective start date of recurrence, which means each next recurrence must be on or after this date.
- `stepId: ID` Id of the pipeline step the opportunities created by the recurrence start in.
- `type: RecurrenceTypeEnum` Recurrence cadence (e.g. Daily, Weekly, MonthlyAbsolute, MonthlyRelative, YearlyAbsolute, YearlyRelative).
- `week: DateWeekEnum` Field whose values are strictly defined with an enumeration of values. The week of month. This setting is applicable only for RecurrenceTypeEnum.MonthlyAbsolute and RecurrenceTypeEnum.YearlyAbsolute.
- `revision: Int` Revision when entity was lastly changed.

### UpdateOpptyRevenueScheduleNoIdBackrefInput (input)

Id of an OpptyRevenueSchedule record and the field values to change, updated together with the record it belongs to.

- `isDeleted: Boolean` Specifies if the entity is considered deleted.
- `modified: DateTime` Last modification time.
- `created: DateTime` Creation time.
- `cancelationDate: Date` Date when the revenue schedule was cancelled. Empty for active schedules.
- `periodCount: Int` Number of periods the opportunity value is split into.
- `periodType: RevenueSchedulePeriodTypeEnum` Length of each period (e.g. Monthly, Quarterly, Yearly).
- `startDate: Date` Date when revenue recognition for the opportunity begins.
- `revision: Int` Revision when entity was lastly changed.

### ArchiveOpportunityPayload (object)

Result of the archiveOpportunity mutation.

- `result: OpportunityEntity` The archived opportunity.
- `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).

### BulkArchiveOpportunityPayload (object)

Result of the bulkArchiveOpportunity mutation.

- `result: BulkUpdateResults!` Ids of the archived opportunities and the items that failed.
- `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).

### BulkMoveOpportunityPayload (object)

Result of the bulkMoveOpportunity mutation.

- `result: BulkUpdateResults!` Ids of the moved opportunities and the items that failed.
- `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).

### BulkReactivateOpportunityPayload (object)

Result of the bulkReactivateOpportunity mutation.

- `result: BulkUpdateResults!` Ids of the reactivated opportunities and the items that failed.
- `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).

### BulkUpdateOpportunityPayload (object)

Result of the bulkUpdateOpportunity mutation.

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

### ChangeLabelFlagOpportunityPayload (object)

Result of the changeLabelFlagOpportunity mutation.

- `result: OpportunityEntity` The updated record.
- `clientMutationId: String` Optional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).

### ChangeOwnershipOpportunityPayload (object)

Result of the changeOwnershipOpportunity mutation.

- `result: OpportunityEntity` The record with its new owner.
- `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).

### ChangePipelineOpportunityPayload (object)

Result of the changePipelineOpportunity mutation.

- `result: OpportunityEntity` The updated opportunity.
- `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).

### ConvertOpportunityPayload (object)

Result of the convertOpportunity mutation.

- `opportunity: OpportunityEntity!` The created record.
- `clientMutationId: String` Optional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).

### CreateOpportunityPayload (object)

Result of the createOpportunity mutation.

- `opportunity: OpportunityEntity` The created record.
- `clientMutationId: String` Optional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).

### DeleteOpportunityPayload (object)

Result of the deleteOpportunity mutation.

- `opportunity: OpportunityEntity` 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).

### ManageSharingOpportunityPayload (object)

Result of the manageSharingOpportunity mutation.

- `result: OpportunityEntity` The record with its updated sharing.
- `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).

### MoveOpportunityPayload (object)

Result of the moveOpportunity mutation.

- `result: OpportunityEntity` The moved opportunity.
- `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).

### RestoreOpportunityPayload (object)

Result of the restoreOpportunity mutation.

- `result: OpportunityEntity` The restored 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).

### UpdateOpportunityPayload (object)

Result of the updateOpportunity mutation.

- `opportunity: OpportunityEntity` The updated record.
- `clientMutationId: String` Optional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).

### OpportunityAutoPrefill (object)

New, unsaved opportunity pre-filled with the values of an AI suggestion, with the ids of the fields that were filled in.

- `entity: OpportunityEntity` New opportunity carrying the pre-filled values; it is not saved.
- `fieldIds: [UUID!]!` Ids of the fields that were filled in.

### OpptyStatusEnum (enum)

Status of an opportunity.

- `Open` The opportunity is active in the pipeline.
- `Lost` The opportunity was archived without being won.
- `Won` The opportunity reached the last step of its pipeline.

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

## Examples of each operation

Built from the schema and checked against it; replace the placeholders, such as `<opportunity id>`, with values from your space.

### getById

```graphql
query OpportunityGetById {
  entities {
    opportunity {
      getById(entityId: "<opportunity id>") {
        id
        name
        formattedName
        modified
      }
    }
  }
}
```

### getByIds

```graphql
query OpportunityGetByIds {
  entities {
    opportunity {
      getByIds(entityIds: ["<opportunity id>"]) {
        id
        name
        formattedName
        modified
      }
    }
  }
}
```

### getAll

```graphql
query OpportunityGetAll {
  entities {
    opportunity {
      getAll(limit: 10) {
        id
        name
        formattedName
        modified
      }
    }
  }
}
```

### getByCriteria

```graphql
query OpportunityGetByCriteria {
  entities {
    opportunity {
      getByCriteria(first: 10) {
        totalCount
        edges {
          node {
            id
            name
            formattedName
            modified
          }
        }
        pageInfo {
          hasNextPage
          endCursor
        }
      }
    }
  }
}
```

### getChangedFieldsSinceRevision

```graphql
query OpportunityGetChangedFieldsSinceRevision {
  entities {
    opportunity {
      getChangedFieldsSinceRevision(id: "<opportunity id>", revision: 10)
    }
  }
}
```

### getBySession

```graphql
query OpportunityGetBySession {
  entities {
    opportunity {
      getBySession(
        includedIds: ["<opportunity id>"]
        excludedIds: ["<opportunity id>"]
        sessionId: "<session id>"
        first: 10
      ) {
        totalCount
        edges {
          node {
            id
            name
            formattedName
            modified
          }
        }
        pageInfo {
          hasNextPage
          endCursor
        }
      }
    }
  }
}
```

### getByIdFormatted

```graphql
query OpportunityGetByIdFormatted {
  entities {
    opportunity {
      getByIdFormatted(id: "<opportunity id>")
    }
  }
}
```

### autoPrefill

```graphql
query OpportunityAutoPrefill {
  entities {
    opportunity {
      autoPrefill(mappingId: "<mapping id>", entityId: "<opportunity id>") {
        id
        name
        formattedName
        modified
      }
    }
  }
}
```

### aiAutoPrefill

```graphql
query OpportunityAiAutoPrefill {
  entities {
    opportunity {
      aiAutoPrefill(actionId: "<action id>") {
        entity {
          id
          name
          formattedName
          modified
        }
        fieldIds
      }
    }
  }
}
```

### changeOwnershipOpportunity

```graphql
mutation ChangeOwnershipOpportunity {
  changeOwnershipOpportunity(
    input: {ownerId: "<owner id>", unitId: "<unit id>", keepOwnerAsEditor: false, transferLinkedRecords: false, id: "<opportunity id>"}
  ) {
    result {
      id
      name
      formattedName
      modified
    }
  }
}
```

### manageSharingOpportunity

```graphql
mutation ManageSharingOpportunity {
  manageSharingOpportunity(input: {shareMode: Standard, id: "<opportunity id>"}) {
    result {
      id
      name
      formattedName
      modified
    }
  }
}
```

### changeLabelFlagOpportunity

```graphql
mutation ChangeLabelFlagOpportunity {
  changeLabelFlagOpportunity(
    input: {hot: false, priority: false, stalled: false, id: "<opportunity id>"}
  ) {
    result {
      id
      name
      formattedName
      modified
    }
  }
}
```

### restoreOpportunity

```graphql
mutation RestoreOpportunity {
  restoreOpportunity(input: {id: "<opportunity id>"}) {
    result {
      id
      name
      formattedName
      modified
    }
  }
}
```

### archiveOpportunity

```graphql
mutation ArchiveOpportunity {
  archiveOpportunity(input: {entity: {id: "<opportunity id>"}}) {
    result {
      id
      name
      formattedName
      modified
    }
  }
}
```

### moveOpportunity

```graphql
mutation MoveOpportunity {
  moveOpportunity(input: {entity: {id: "<opportunity id>"}}) {
    result {
      id
      name
      formattedName
      modified
    }
  }
}
```

### changePipelineOpportunity

```graphql
mutation ChangePipelineOpportunity {
  changePipelineOpportunity(
    input: {entity: {id: "<opportunity id>"}, keepOwnerAsEditor: false, transferLinkedRecords: false}
  ) {
    result {
      id
      name
      formattedName
      modified
    }
  }
}
```

### createOpportunity

```graphql
mutation CreateOpportunity {
  createOpportunity(
    input: {closingDate: "2026-12-15", name: "Northwind Analytics", ownerId: "<owner id>", stepId: "<step id>"}
  ) {
    opportunity {
      id
      name
      formattedName
      modified
    }
  }
}
```

### updateOpportunity

```graphql
mutation UpdateOpportunity {
  updateOpportunity(input: {id: "<opportunity id>"}) {
    opportunity {
      id
      name
      formattedName
      modified
    }
  }
}
```

### bulkUpdateOpportunity

```graphql
mutation BulkUpdateOpportunity {
  bulkUpdateOpportunity(input: [{id: "<opportunity id>"}]) {
    result {
      created {
        id
      }
      errors {
        index
        code
        message
        entityId
      }
      updated
      deleted
      errorsOnDelete {
        index
        code
        message
        entityId
      }
    }
  }
}
```

### deleteOpportunity

```graphql
mutation DeleteOpportunity {
  deleteOpportunity(input: {id: "<opportunity id>"}) {
    opportunity {
      id
      name
      formattedName
      modified
    }
  }
}
```

### bulkArchiveOpportunity

```graphql
mutation BulkArchiveOpportunity {
  bulkArchiveOpportunity(
    input: {bulkFilter: {includedIds: ["<opportunity id>"]}, entity: {id: "<opportunity id>"}}
  ) {
    result {
      created {
        id
      }
      errors {
        index
        code
        message
        entityId
      }
      updated
      deleted
      errorsOnDelete {
        index
        code
        message
        entityId
      }
    }
  }
}
```

### bulkReactivateOpportunity

```graphql
mutation BulkReactivateOpportunity {
  bulkReactivateOpportunity(
    input: {bulkFilter: {includedIds: ["<opportunity id>"]}}
  ) {
    result {
      created {
        id
      }
      errors {
        index
        code
        message
        entityId
      }
      updated
      deleted
      errorsOnDelete {
        index
        code
        message
        entityId
      }
    }
  }
}
```

### bulkMoveOpportunity

```graphql
mutation BulkMoveOpportunity {
  bulkMoveOpportunity(
    input: {bulkFilter: {includedIds: ["<opportunity id>"]}, entity: {id: "<opportunity id>"}}
  ) {
    result {
      created {
        id
      }
      errors {
        index
        code
        message
        entityId
      }
      updated
      deleted
      errorsOnDelete {
        index
        code
        message
        entityId
      }
    }
  }
}
```

### convertOpportunity

```graphql
mutation ConvertOpportunity {
  convertOpportunity(
    input: {closingDate: "2026-12-15", name: "Northwind Analytics", ownerId: "<owner id>", stepId: "<step id>"}
    sourceEntity: AiAgent
    sourceEntityId: "<source entity id>"
    operation: Nothing
    options: {}
  ) {
    opportunity {
      id
      name
      formattedName
      modified
    }
  }
}
```
