Developers
Set your API contextPick a region and space ID once. Every sample fills in your base URL.
Where do I find these?

In Coevera: open your space's API application and choose Show Access. It shows the space ID and the base URL, whose host starts with your region.

From the API: if you know the space ID, the discovery endpoint GET /api/discovery/spaces/{space_id} returns its region and base URLs, without credentials.

Only the region and space ID are kept, in this browser. Never paste a key or password here.

More in the quickstart

GraphQLRepositoriesleadOpptyKpi

entities.leadOpptyKpi

Read lead oppty KPI records with the leadOpptyKpi repository, and change them with the lead oppty KPI mutations. Same records as the REST LeadOpptyKPIs entity.

Queries

Fields of entities { leadOpptyKpi { … } }.

KindFieldReturns
QUERYgetById(entityId: ID!)
Returns the record with the given id, or null when there is none. Deleted records are returned as well.
LeadOpptyKPIEntity
QUERYgetByIds(entityIds: [ID!]!)
Returns the records with the given ids; ids without a record are left out. Deleted records are returned as well.
[LeadOpptyKPIEntity!]!
QUERYgetAll(limit: Int, offset: Int, filter: LeadOpptyKPIFilterInput, orderBy: [LeadOpptyKPIOrderByInput!], includeDeleted: Boolean)
Returns the records that match the filter, paged with limit and offset.
[LeadOpptyKPIEntity!]!
QUERYgetByCriteria(filter: LeadOpptyKPIFilterInput, orderBy: [LeadOpptyKPIOrderByInput!], includeDeleted: Boolean, before: String, after: String, first: Int, last: Int)
Returns the records that match the filter as a cursor-paginated connection.
LeadOpptyKPIEntityConnection
QUERYgetChangedFieldsSinceRevision(id: UUID!, revision: Int!)
Returns the ids of the fields of a record that changed after the given revision. Returns an empty list for entities without change tracking.
[UUID!]!

Mutations

KindMutationDoesReturns
MUTATIONcreateLeadOpptyKpi(input: CreateLeadOpptyKPIInput!, validationLevel: [ValidationLevel!])Create one recordCreateLeadOpptyKPIPayload
MUTATIONupdateLeadOpptyKpi(input: UpdateLeadOpptyKPIInput!, validationLevel: [ValidationLevel!], sessionIdToUpdate: String)Update fieldsUpdateLeadOpptyKPIPayload
MUTATIONbulkUpdateLeadOpptyKpi(input: [CreateOrUpdateLeadOpptyKPIInput!]!, deleteInput: [DeleteLeadOpptyKPIInput!], validationLevel: [ValidationLevel!], rollbackMethod: RollbackMethod, match: MatchingInput)Create or update many; per-item resultsBulkUpdateLeadOpptyKPIPayload
MUTATIONdeleteLeadOpptyKpi(input: DeleteLeadOpptyKPIInput!)Soft-deleteDeleteLeadOpptyKPIPayload

Types

The types this repository uses, each with its fields and their descriptions. Types several repositories share, such as PageInfo and the filter fields, are in the types index.

LeadOpptyKPIEntity object 18 fields: isDeleteProtected, id, isDeleted, …

KPI event of a lead or opportunity (e.g. created, qualified, won, lost or moved to another step), used in activity reporting.

FieldTypeDescription
isDeleteProtectedBoolean!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.
idID!Unique identifier of entity.
isDeletedBooleanSpecifies if the entity is considered deleted.
modifiedDateTimeLast modification time.
createdDateTimeCreation time.
clientClientEntityUser who triggered the KPI event (e.g. created the lead, qualified it, won or lost the opportunity, moved the record).
leadLeadEntityLead this KPI event relates to. Set when leadOpptyId resolves to a Lead; otherwise empty.
opptyOpportunityEntityOpportunity this KPI event relates to. Set when leadOpptyId resolves to an Opportunity; otherwise empty.
ownerClientEntityLead/opportunity owner at the time the KPI event occurred.
unitSalesUnitEntitySales unit the triggering user belonged to at the time of the event.
applicationIdIDApplication context in which the KPI event was triggered (e.g. browser, automation, third-party integration).
clientIdIDId of the user who triggered the event.
kpiLeadOpptyKpiEnum!KPI metric this event represents: CreateLeads, CreateOppty, QualifyLead, WinOppty, LoseLead, LoseOppty, LastMove or LastModified.
leadOpptyIdID!Id of the lead or opportunity the KPI event relates to.
ownerIdIDId of the lead/opportunity owner at the time of the event.
unitIdID!Id of the sales unit.
revisionIntRevision when entity was lastly changed.
instancePermissions[EntityPermsEnum!]! (1 args)Permissions the current user has on this record, out of the requested ones.
LeadOpptyKPIEntityConnection object pageInfo: PageInfo!, edges: [LeadOpptyKPIEntityEdge]!, totalCount: Int

Paginated list of LeadOpptyKPI records.

FieldTypeDescription
pageInfoPageInfo!Pagination data for this connection.
edges[LeadOpptyKPIEntityEdge]!Contains the nodes in this connection.
totalCountIntTotal number of items in the connection.
LeadOpptyKPIEntityEdge object node: LeadOpptyKPIEntity, cursor: String!

A Relay edge containing a LeadOpptyKPIEntity and its cursor.

FieldTypeDescription
nodeLeadOpptyKPIEntityThe item at the end of the edge
cursorString!A cursor for use in pagination
LeadOpptyKpiEnumFilterInput input eq: [LeadOpptyKpiEnum!], NOT: LeadOpptyKpiEnumFilterInput

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

Input fieldTypeDescription
eq[LeadOpptyKpiEnum!]Matches any of the listed values.
NOTLeadOpptyKpiEnumFilterInputMatches values that do not meet this condition.
LeadOpptyKPIFilterInput input AND, OR, NOT, globalSearchQuery, one condition per field

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

Input fieldTypeDescription
OR[LeadOpptyKPIFilterInput!]Matches records that meet at least one of the listed filters.
AND[LeadOpptyKPIFilterInput!]Matches records that meet all of the listed filters.
NOTLeadOpptyKPIFilterInputMatches records that do not meet this filter.
globalSearchQueryStringSearch term matched against the fields that the global search covers for this entity.
idEntityFilterStringFieldUnique identifier of entity.
isDeletedBooleanSpecifies if the entity is considered deleted.
modifiedEntityFilterDateTimeFieldLast modification time.
createdEntityFilterDateTimeFieldCreation time.
applicationIdEntityFilterStringFieldApplication context in which the KPI event was triggered (e.g. browser, automation, third-party integration).
clientIdEntityFilterStringFieldId of the user who triggered the event.
kpiLeadOpptyKpiEnumFilterInputKPI metric this event represents: CreateLeads, CreateOppty, QualifyLead, WinOppty, LoseLead, LoseOppty, LastMove or LastModified.
leadOpptyIdEntityFilterStringFieldId of the lead or opportunity the KPI event relates to.
ownerIdEntityFilterStringFieldId of the lead/opportunity owner at the time of the event.
unitIdEntityFilterStringFieldId of the sales unit.
revisionEntityFilterNumberFieldRevision when entity was lastly changed.
clientClientFilterInputUser who triggered the KPI event (e.g. created the lead, qualified it, won or lost the opportunity, moved the record). Matches records where a related record meets these conditions.
leadLeadFilterInputLead this KPI event relates to. Set when leadOpptyId resolves to a Lead; otherwise empty. Matches records where a related record meets these conditions.
opptyOpportunityFilterInputOpportunity this KPI event relates to. Set when leadOpptyId resolves to an Opportunity; otherwise empty. Matches records where a related record meets these conditions.
ownerClientFilterInputLead/opportunity owner at the time the KPI event occurred. Matches records where a related record meets these conditions.
unitSalesUnitFilterInputSales unit the triggering user belonged to at the time of the event. Matches records where a related record meets these conditions.
LeadOpptyKPIOrderByInput input Asc or Desc per field

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

Input fieldTypeDescription
idOrderByEnumUnique identifier of entity.
isDeletedOrderByEnumSpecifies if the entity is considered deleted.
modifiedOrderByEnumLast modification time.
createdOrderByEnumCreation time.
client[ClientOrderByNestedInput!]User who triggered the KPI event (e.g. created the lead, qualified it, won or lost the opportunity, moved the record). Sorts by fields of the related record, listed in order of priority.
lead[LeadOrderByNestedInput!]Lead this KPI event relates to. Set when leadOpptyId resolves to a Lead; otherwise empty. Sorts by fields of the related record, listed in order of priority.
oppty[OpportunityOrderByNestedInput!]Opportunity this KPI event relates to. Set when leadOpptyId resolves to an Opportunity; otherwise empty. Sorts by fields of the related record, listed in order of priority.
owner[ClientOrderByNestedInput!]Lead/opportunity owner at the time the KPI event occurred. Sorts by fields of the related record, listed in order of priority.
unit[SalesUnitOrderByNestedInput!]Sales unit the triggering user belonged to at the time of the event. Sorts by fields of the related record, listed in order of priority.
clientIdOrderByEnumId of the user who triggered the event.
leadOpptyIdOrderByEnumId of the lead or opportunity the KPI event relates to.
ownerIdOrderByEnumId of the lead/opportunity owner at the time of the event.
unitIdOrderByEnumId of the sales unit.
revisionOrderByEnumRevision when entity was lastly changed.
CreateLeadOpptyKPIInput input 10 fields: clientMutationId, modified, created, …

Field values of a new LeadOpptyKPI record.

Input fieldTypeDescription
clientMutationIdStringOptional 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).
modifiedDateTimeLast modification time.
createdDateTimeCreation time.
applicationIdIDApplication context in which the KPI event was triggered (e.g. browser, automation, third-party integration).
clientIdIDId of the user who triggered the event.
kpiLeadOpptyKpiEnum!KPI metric this event represents: CreateLeads, CreateOppty, QualifyLead, WinOppty, LoseLead, LoseOppty, LastMove or LastModified.
leadOpptyIdID!Id of the lead or opportunity the KPI event relates to.
ownerIdIDId of the lead/opportunity owner at the time of the event.
unitIdID!Id of the sales unit.
revisionIntRevision when entity was lastly changed.
CreateOrUpdateLeadOpptyKPIInput input 11 fields: clientMutationId, id, modified, …

Field values of a LeadOpptyKPI record to create, or to update when its id is set.

Input fieldTypeDescription
clientMutationIdStringOptional 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).
idIDUnique identifier of entity.
modifiedDateTimeLast modification time.
createdDateTimeCreation time.
applicationIdIDApplication context in which the KPI event was triggered (e.g. browser, automation, third-party integration).
clientIdIDId of the user who triggered the event.
kpiLeadOpptyKpiEnumKPI metric this event represents: CreateLeads, CreateOppty, QualifyLead, WinOppty, LoseLead, LoseOppty, LastMove or LastModified.
leadOpptyIdIDId of the lead or opportunity the KPI event relates to.
ownerIdIDId of the lead/opportunity owner at the time of the event.
unitIdIDId of the sales unit.
revisionIntRevision when entity was lastly changed.
DeleteLeadOpptyKPIInput input clientMutationId: String, id: ID!, leadOpptyId: ID

Id of the LeadOpptyKPI record to delete.

Input fieldTypeDescription
clientMutationIdStringOptional 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).
idID!Unique identifier of entity.
leadOpptyIdIDId of the lead or opportunity the KPI event relates to.
UpdateLeadOpptyKPIInput input 11 fields: clientMutationId, id, modified, …

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

Input fieldTypeDescription
clientMutationIdStringOptional 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).
idID!Unique identifier of entity.
modifiedDateTimeLast modification time.
createdDateTimeCreation time.
applicationIdIDApplication context in which the KPI event was triggered (e.g. browser, automation, third-party integration).
clientIdIDId of the user who triggered the event.
kpiLeadOpptyKpiEnumKPI metric this event represents: CreateLeads, CreateOppty, QualifyLead, WinOppty, LoseLead, LoseOppty, LastMove or LastModified.
leadOpptyIdIDId of the lead or opportunity the KPI event relates to.
ownerIdIDId of the lead/opportunity owner at the time of the event.
unitIdIDId of the sales unit.
revisionIntRevision when entity was lastly changed.
BulkUpdateLeadOpptyKPIPayload object result: BulkUpdateResults!

Result of the bulkUpdateLeadOpptyKpi mutation.

FieldTypeDescription
resultBulkUpdateResults!Ids of the created, updated and deleted records, and the items that failed.
CreateLeadOpptyKPIPayload object leadOpptyKpi: LeadOpptyKPIEntity, clientMutationId: String

Result of the createLeadOpptyKpi mutation.

FieldTypeDescription
leadOpptyKpiLeadOpptyKPIEntityThe created record.
clientMutationIdStringOptional 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).
DeleteLeadOpptyKPIPayload object leadOpptyKpi: LeadOpptyKPIEntity, clientMutationId: String

Result of the deleteLeadOpptyKpi mutation.

FieldTypeDescription
leadOpptyKpiLeadOpptyKPIEntityThe deleted record.
clientMutationIdStringOptional 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).
UpdateLeadOpptyKPIPayload object leadOpptyKpi: LeadOpptyKPIEntity, clientMutationId: String

Result of the updateLeadOpptyKpi mutation.

FieldTypeDescription
leadOpptyKpiLeadOpptyKPIEntityThe updated record.
clientMutationIdStringOptional 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).
LeadOpptyKpiEnum enum CreateLeads, CreateOppty, QualifyLead, WinOppty, LoseLead, LoseOppty, LastMove, LastModified

Kind of lead or opportunity event recorded as a KPI entry; each record keeps at most one entry per kind, dated when the event last happened.

ValueDescription
CreateLeadsThe lead was created.
CreateOpptyThe opportunity was created directly, not qualified from a lead.
QualifyLeadThe lead was qualified into an opportunity.
WinOpptyThe opportunity was won.
LoseLeadThe lead was lost.
LoseOpptyThe opportunity was lost.
LastMoveThe record entered its current pipeline step (set on create and on every step change).
LastModifiedThe record was last modified.