GraphQLRepositoriesapproval
entities.approval
Read approval records with the approval repository, and change them with the approval mutations. Same records as the REST Approvals entity.
Queries
Fields of entities { approval { … } }.
| Kind | Field | Returns |
|---|---|---|
| QUERY | getById(entityId: ID!)Returns the record with the given id, or null when there is none. Deleted records are returned as well. | ApprovalEntity |
| QUERY | getByIds(entityIds: [ID!]!)Returns the records with the given ids; ids without a record are left out. Deleted records are returned as well. | [ApprovalEntity!]! |
| QUERY | getAll(limit: Int, offset: Int, filter: ApprovalFilterInput, orderBy: [ApprovalOrderByInput!], includeDeleted: Boolean)Returns the records that match the filter, paged with limit and offset. | [ApprovalEntity!]! |
| QUERY | getByCriteria(filter: ApprovalFilterInput, orderBy: [ApprovalOrderByInput!], includeDeleted: Boolean, before: String, after: String, first: Int, last: Int)Returns the records that match the filter as a cursor-paginated connection. | ApprovalEntityConnection |
| QUERY | getChangedFieldsSinceRevision(id: UUID!, revision: Int!)Returns the ids of the fields of a record that changed after the given revision. Returns an empty list for entities without change tracking. | [UUID!]! |
| QUERY | getDownloadUrl(approvalProcessId: UUID!, name: String!, filter: ApprovalFilterInput, days: Int)Exports the approval log of an approval process to a zipped text file and returns a URL to download it. | String! |
| QUERY | getRecentApprovals(entityId: UUID!, entityName: EntityNameEnum!, limit: Int!)Returns the completed approvals (approved or rejected) of a record, most recently decided first. | [RecentApprovalItem!]! |
Mutations
| Kind | Mutation | Does | Returns |
|---|---|---|---|
| MUTATION | createApproval(input: CreateApprovalInput!, validationLevel: [ValidationLevel!]) | Create one record | CreateApprovalPayload |
| MUTATION | updateApproval(input: UpdateApprovalInput!, validationLevel: [ValidationLevel!], sessionIdToUpdate: String) | Update fields | UpdateApprovalPayload |
| MUTATION | bulkUpdateApproval(input: [CreateOrUpdateApprovalInput!]!, deleteInput: [DeleteApprovalInput!], validationLevel: [ValidationLevel!], rollbackMethod: RollbackMethod, match: MatchingInput) | Create or update many; per-item results | BulkUpdateApprovalPayload |
| MUTATION | deleteApproval(input: DeleteApprovalInput!) | Soft-delete | DeleteApprovalPayload |
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.
ApprovalEntity object 33 fields: isDeleteProtected, id, isDeleted, …
Approval request that an approval process raised for a record, such as a quote or an opportunity, waiting for the decision of its approvers.
| Field | Type | Description |
|---|---|---|
isDeleteProtected | Boolean! | True when the record is protected against deletion because it must always exist in the space. Deleting a record that is not protected can still fail on other checks. Read-only. |
id | ID! | Unique identifier of entity. |
isDeleted | Boolean | Specifies if the entity is considered deleted. |
modified | DateTime | Last modification time. |
created | DateTime | Creation time. |
account | AccountEntity | Account the approval is requested on, when the trigger record is an Account. |
actor | ClientEntity | User who triggered the approval, or empty when triggered automatically. |
application | ApplicationEntity | Application context the approval was triggered in. |
approvalProcess | ApprovalProcessEntity | Approval process this approval was raised from. |
contact | ContactEntity | Contact the approval is requested on, when the trigger record is a Contact. |
lead | LeadEntity | Lead the approval is requested on. Set when leadOpptyId resolves to a Lead. |
oppty | OpportunityEntity | Opportunity the approval is requested on. Set when leadOpptyId resolves to an Opportunity. |
quote | QuoteEntity | Quote the approval is requested on, when the trigger record is a Quote. |
accountId | ID | Id of the linked account. |
actorId | ID | Id of the triggering user. |
applicationId | ID! | Id of the application (e.g. browser, automation, third-party integration) the approval was triggered in. |
approvalProcessId | ID! | Id of the approval process this approval was raised from. |
approvalStatus | ApprovalStatusEnum | Decision state of the approval: Pending while waiting for the approvers, then Approved or Rejected. endTime is set once the decision is made. |
comment | String | Comment the requester attached when raising the approval. |
contactId | ID | Id of the linked contact. |
endTime | DateTime | Timestamp the approval reached a final status (Approved/Rejected/Cancelled). Empty while the approval is still pending. |
leadOpptyId | ID | Id of the linked lead or opportunity, or empty when not linked. |
quoteId | ID | Id of the linked quote. |
settings | JSONString! | Snapshot of the approval process schema at the time the approval was raised. Frozen so subsequent changes to the parent approval process do not affect this run. |
status | ProcessStatusEnum | Result of the approval process run: the most severe status among its activity log lines, Error when a step of the run failed. The decision itself is in approvalStatus. |
revision | Int | Revision when entity was lastly changed. |
approvers | ApprovalApproverEntityConnection (7 args) | Users who must respond to the approval, with their individual responses. |
lines | ApprovalProcessActivityLogLineEntityConnection (7 args) | Activity log lines describing the steps taken on this approval (visible only). |
name | String | Display name of the approval, derived from the underlying record being approved (e.g. the quote name). Empty when the underlying record has been deleted. |
ownerId | UUID | Id of the user who owns the record being approved (the record's owner, not the approver). Empty when the underlying record has been deleted. |
entityType | BaseEntityTypeEnum | Type identifier (e.g. account type, quote type) of the underlying record being approved. Empty when the underlying record has no type or has been deleted. |
startTime | DateTime | Timestamp the approval was raised (alias of created). |
instancePermissions | [EntityPermsEnum!]! (1 args) | Permissions the current user has on this record, out of the requested ones. |
ApprovalEntityConnection object pageInfo: PageInfo!, edges: [ApprovalEntityEdge]!, totalCount: Int
Paginated list of Approval records.
| Field | Type | Description |
|---|---|---|
pageInfo | PageInfo! | Pagination data for this connection. |
edges | [ApprovalEntityEdge]! | Contains the nodes in this connection. |
totalCount | Int | Total number of items in the connection. |
ApprovalEntityEdge object node: ApprovalEntity, cursor: String!
A Relay edge containing a ApprovalEntity and its cursor.
| Field | Type | Description |
|---|---|---|
node | ApprovalEntity | The item at the end of the edge |
cursor | String! | A cursor for use in pagination |
ApprovalFilterInput input AND, OR, NOT, globalSearchQuery, one condition per field
Filter conditions for Approval records. Conditions on different fields are combined with AND; use OR, AND and NOT for other combinations.
| Input field | Type | Description |
|---|---|---|
OR | [ApprovalFilterInput!] | Matches records that meet at least one of the listed filters. |
AND | [ApprovalFilterInput!] | Matches records that meet all of the listed filters. |
NOT | ApprovalFilterInput | 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. |
accountId | EntityFilterStringField | Id of the linked account. |
actorId | EntityFilterStringField | Id of the triggering user. |
applicationId | EntityFilterStringField | Id of the application (e.g. browser, automation, third-party integration) the approval was triggered in. |
approvalProcessId | EntityFilterStringField | Id of the approval process this approval was raised from. |
approvalStatus | ApprovalStatusEnumFilterInput | Decision state of the approval: Pending while waiting for the approvers, then Approved or Rejected. endTime is set once the decision is made. |
comment | EntityFilterStringField | Comment the requester attached when raising the approval. |
contactId | EntityFilterStringField | Id of the linked contact. |
endTime | EntityFilterDateTimeField | Timestamp the approval reached a final status (Approved/Rejected/Cancelled). Empty while the approval is still pending. |
leadOpptyId | EntityFilterStringField | Id of the linked lead or opportunity, or empty when not linked. |
quoteId | EntityFilterStringField | Id of the linked quote. |
status | ProcessStatusEnumFilterInput | Result of the approval process run: the most severe status among its activity log lines, Error when a step of the run failed. The decision itself is in approvalStatus. |
revision | EntityFilterNumberField | Revision when entity was lastly changed. |
name | String | Display name of the approval, derived from the underlying record being approved (e.g. the quote name). Empty when the underlying record has been deleted. |
ownerId | UUID | Id of the user who owns the record being approved (the record's owner, not the approver). Empty when the underlying record has been deleted. |
entityType | BaseEntityTypeEnum | Type identifier (e.g. account type, quote type) of the underlying record being approved. Empty when the underlying record has no type or has been deleted. |
startTime | EntityFilterDateTimeField | Timestamp the approval was raised (alias of created). |
account | AccountFilterInput | Account the approval is requested on, when the trigger record is an Account. Matches records where a related record meets these conditions. |
actor | ClientFilterInput | User who triggered the approval, or empty when triggered automatically. Matches records where a related record meets these conditions. |
application | ApplicationFilterInput | Application context the approval was triggered in. Matches records where a related record meets these conditions. |
approvalProcess | ApprovalProcessFilterInput | Approval process this approval was raised from. Matches records where a related record meets these conditions. |
contact | ContactFilterInput | Contact the approval is requested on, when the trigger record is a Contact. Matches records where a related record meets these conditions. |
lead | LeadFilterInput | Lead the approval is requested on. Set when leadOpptyId resolves to a Lead. Matches records where a related record meets these conditions. |
oppty | OpportunityFilterInput | Opportunity the approval is requested on. Set when leadOpptyId resolves to an Opportunity. Matches records where a related record meets these conditions. |
quote | QuoteFilterInput | Quote the approval is requested on, when the trigger record is a Quote. Matches records where a related record meets these conditions. |
approvers | ApprovalApproverFilterInput | Users who must respond to the approval, with their individual responses. Matches records where a related record meets these conditions. |
lines | ApprovalProcessActivityLogLineFilterInput | Activity log lines describing the steps taken on this approval (visible only). Matches records where a related record meets these conditions. |
ApprovalOrderByInput input Asc or Desc per field
Sorting of Approval records. Set exactly one field in each item; list several items to sort by more fields, in order of priority.
| Input field | Type | Description |
|---|---|---|
id | OrderByEnum | Unique identifier of entity. |
isDeleted | OrderByEnum | Specifies if the entity is considered deleted. |
modified | OrderByEnum | Last modification time. |
created | OrderByEnum | Creation time. |
account | [AccountOrderByNestedInput!] | Account the approval is requested on, when the trigger record is an Account. Sorts by fields of the related record, listed in order of priority. |
actor | [ClientOrderByNestedInput!] | User who triggered the approval, or empty when triggered automatically. Sorts by fields of the related record, listed in order of priority. |
application | [ApplicationOrderByNestedInput!] | Application context the approval was triggered in. Sorts by fields of the related record, listed in order of priority. |
approvalProcess | [ApprovalProcessOrderByNestedInput!] | Approval process this approval was raised from. Sorts by fields of the related record, listed in order of priority. |
contact | [ContactOrderByNestedInput!] | Contact the approval is requested on, when the trigger record is a Contact. Sorts by fields of the related record, listed in order of priority. |
lead | [LeadOrderByNestedInput!] | Lead the approval is requested on. Set when leadOpptyId resolves to a Lead. Sorts by fields of the related record, listed in order of priority. |
oppty | [OpportunityOrderByNestedInput!] | Opportunity the approval is requested on. Set when leadOpptyId resolves to an Opportunity. Sorts by fields of the related record, listed in order of priority. |
quote | [QuoteOrderByNestedInput!] | Quote the approval is requested on, when the trigger record is a Quote. Sorts by fields of the related record, listed in order of priority. |
accountId | OrderByEnum | Id of the linked account. |
actorId | OrderByEnum | Id of the triggering user. |
applicationId | OrderByEnum | Id of the application (e.g. browser, automation, third-party integration) the approval was triggered in. |
approvalProcessId | OrderByEnum | Id of the approval process this approval was raised from. |
approvalStatus | OrderByEnum | Decision state of the approval: Pending while waiting for the approvers, then Approved or Rejected. endTime is set once the decision is made. |
comment | OrderByEnum | Comment the requester attached when raising the approval. |
contactId | OrderByEnum | Id of the linked contact. |
endTime | OrderByEnum | Timestamp the approval reached a final status (Approved/Rejected/Cancelled). Empty while the approval is still pending. |
leadOpptyId | OrderByEnum | Id of the linked lead or opportunity, or empty when not linked. |
quoteId | OrderByEnum | Id of the linked quote. |
status | OrderByEnum | Result of the approval process run: the most severe status among its activity log lines, Error when a step of the run failed. The decision itself is in approvalStatus. |
revision | OrderByEnum | Revision when entity was lastly changed. |
name | OrderByEnum | Display name of the approval, derived from the underlying record being approved (e.g. the quote name). Empty when the underlying record has been deleted. |
ownerId | OrderByEnum | Id of the user who owns the record being approved (the record's owner, not the approver). Empty when the underlying record has been deleted. |
startTime | OrderByEnum | Timestamp the approval was raised (alias of created). |
CreateApprovalApproverNoApprovalBackrefInput input 6 fields: modified, created, clientId, …
Field values of a new ApprovalApprover record, created together with the record it belongs to.
| Input field | Type | Description |
|---|---|---|
modified | DateTime | Last modification time. |
created | DateTime | Creation time. |
clientId | ID! | Id of the assigned user. |
comment | String | Comment the user attached when responding to the approval. |
status | ApprovalStatusEnum | Response of this approver to the approval request: Pending until the user approves or rejects it. |
revision | Int | Revision when entity was lastly changed. |
CreateApprovalInput input 15 fields: clientMutationId, modified, created, …
Field values of a new Approval record.
| Input field | Type | Description |
|---|---|---|
clientMutationId | String | Optional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention). |
modified | DateTime | Last modification time. |
created | DateTime | Creation time. |
accountId | ID | Id of the linked account. |
actorId | ID | Id of the triggering user. |
applicationId | ID! | Id of the application (e.g. browser, automation, third-party integration) the approval was triggered in. |
approvalProcessId | ID! | Id of the approval process this approval was raised from. |
approvalStatus | ApprovalStatusEnum | Decision state of the approval: Pending while waiting for the approvers, then Approved or Rejected. endTime is set once the decision is made. |
comment | String | Comment the requester attached when raising the approval. |
contactId | ID | Id of the linked contact. |
leadOpptyId | ID | Id of the linked lead or opportunity, or empty when not linked. |
quoteId | ID | Id of the linked quote. |
status | ProcessStatusEnum | Result of the approval process run: the most severe status among its activity log lines, Error when a step of the run failed. The decision itself is in approvalStatus. |
revision | Int | Revision when entity was lastly changed. |
approvers | [CreateApprovalApproverNoApprovalBackrefInput!] | Users who must respond to the approval, with their individual responses. |
CreateOrUpdateApprovalInput input 16 fields: clientMutationId, id, modified, …
Field values of an Approval record to create, or to update when its id is set.
| Input field | Type | Description |
|---|---|---|
clientMutationId | String | Optional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention). |
id | ID | Unique identifier of entity. |
modified | DateTime | Last modification time. |
created | DateTime | Creation time. |
accountId | ID | Id of the linked account. |
actorId | ID | Id of the triggering user. |
applicationId | ID | Id of the application (e.g. browser, automation, third-party integration) the approval was triggered in. |
approvalProcessId | ID | Id of the approval process this approval was raised from. |
approvalStatus | ApprovalStatusEnum | Decision state of the approval: Pending while waiting for the approvers, then Approved or Rejected. endTime is set once the decision is made. |
comment | String | Comment the requester attached when raising the approval. |
contactId | ID | Id of the linked contact. |
leadOpptyId | ID | Id of the linked lead or opportunity, or empty when not linked. |
quoteId | ID | Id of the linked quote. |
status | ProcessStatusEnum | Result of the approval process run: the most severe status among its activity log lines, Error when a step of the run failed. The decision itself is in approvalStatus. |
revision | Int | Revision when entity was lastly changed. |
approvers | [CreateApprovalApproverNoApprovalBackrefInput!] | Users who must respond to the approval, with their individual responses. |
DeleteApprovalInput input clientMutationId: String, id: ID!, leadOpptyId: ID
Id of the Approval record to delete.
| Input field | Type | Description |
|---|---|---|
clientMutationId | String | Optional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention). |
id | ID! | Unique identifier of entity. |
leadOpptyId | ID | Id of the linked lead or opportunity, or empty when not linked. |
UpdateApprovalInput input 16 fields: clientMutationId, id, modified, …
Id of an Approval record and the field values to change.
| Input field | Type | Description |
|---|---|---|
clientMutationId | String | Optional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention). |
id | ID! | Unique identifier of entity. |
modified | DateTime | Last modification time. |
created | DateTime | Creation time. |
accountId | ID | Id of the linked account. |
actorId | ID | Id of the triggering user. |
applicationId | ID | Id of the application (e.g. browser, automation, third-party integration) the approval was triggered in. |
approvalProcessId | ID | Id of the approval process this approval was raised from. |
approvalStatus | ApprovalStatusEnum | Decision state of the approval: Pending while waiting for the approvers, then Approved or Rejected. endTime is set once the decision is made. |
comment | String | Comment the requester attached when raising the approval. |
contactId | ID | Id of the linked contact. |
leadOpptyId | ID | Id of the linked lead or opportunity, or empty when not linked. |
quoteId | ID | Id of the linked quote. |
status | ProcessStatusEnum | Result of the approval process run: the most severe status among its activity log lines, Error when a step of the run failed. The decision itself is in approvalStatus. |
revision | Int | Revision when entity was lastly changed. |
approvers | [CreateApprovalApproverNoApprovalBackrefInput!] | Users who must respond to the approval, with their individual responses. |
BulkUpdateApprovalPayload object result: BulkUpdateResults!
Result of the bulkUpdateApproval mutation.
| Field | Type | Description |
|---|---|---|
result | BulkUpdateResults! | Ids of the created, updated and deleted records, and the items that failed. |
CreateApprovalPayload object approval: ApprovalEntity, clientMutationId: String
Result of the createApproval mutation.
| Field | Type | Description |
|---|---|---|
approval | ApprovalEntity | 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). |
DeleteApprovalPayload object approval: ApprovalEntity, clientMutationId: String
Result of the deleteApproval mutation.
| Field | Type | Description |
|---|---|---|
approval | ApprovalEntity | 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). |
UpdateApprovalPayload object approval: ApprovalEntity, clientMutationId: String
Result of the updateApproval mutation.
| Field | Type | Description |
|---|---|---|
approval | ApprovalEntity | 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). |
RecentApprovalItem object 6 fields: id, status, completedDatetime, …
Completed approval of a record, with its outcome and approval process.
| Field | Type | Description |
|---|---|---|
id | UUID! | Id of the approval. |
status | ApprovalStatusEnum! | Outcome of the approval: Approved or Rejected. |
completedDatetime | DateTime! | When the last approver responded. |
approvalProcessId | UUID! | Id of the approval process that raised the approval. |
approvalProcessName | String! | Name of the approval process that raised the approval. |
approvalProcessDescription | String | Free-text description of the approval process; null when it has none. |