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

# entities.emailSequence

Read email sequence records with the emailSequence repository, and change them with the email sequence mutations. Same records as the REST EmailSequences entity.

REST: [EmailSequences](https://developers.coevera.com/reference/rest/email-sequences.md).

## Queries

- `getById(entityId: ID!): EmailSequenceEntity` Returns the record with the given id, or null when there is none. Deleted records are returned as well.
- `getByIds(entityIds: [ID!]!): [EmailSequenceEntity!]!` 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: EmailSequenceFilterInput, orderBy: [EmailSequenceOrderByInput!], includeDeleted: Boolean): [EmailSequenceEntity!]!` Returns the records that match the filter, paged with limit and offset.
- `getByCriteria(filter: EmailSequenceFilterInput, orderBy: [EmailSequenceOrderByInput!], includeDeleted: Boolean, before: String, after: String, first: Int, last: Int): EmailSequenceEntityConnection` 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.
- `getByEmailSequenceCriteria(listingOptions: EmailSequenceTabDataGridViewOptionsParams!, filter: EmailSequenceFilterInput, orderBy: [EmailSequenceOrderByInput!], before: String, after: String, first: Int, last: Int): EmailSequenceEntityConnection` Returns a page of email sequences filtered by owner, enabled state and status, in addition to the regular filter.
- `getEmailSequencesForUnenroll(bulkFilter: BulkOperationInput!): [EmailSequenceEntity!]!` Returns the email sequences in which any of the selected records is currently enrolled, so they can be offered for unenrollment.

## Mutations

- `createEmailSequence(input: CreateEmailSequenceInput!, validationLevel: [ValidationLevel!]): CreateEmailSequencePayload` Create one record.
- `updateEmailSequence(input: UpdateEmailSequenceInput!, validationLevel: [ValidationLevel!], sessionIdToUpdate: String): UpdateEmailSequencePayload` Update fields.
- `bulkUpdateEmailSequence(input: [CreateOrUpdateEmailSequenceInput!]!, deleteInput: [DeleteEmailSequenceInput!], validationLevel: [ValidationLevel!], rollbackMethod: RollbackMethod, match: MatchingInput): BulkUpdateEmailSequencePayload` Create or update many; per-item results.
- `deleteEmailSequence(input: DeleteEmailSequenceInput!): DeleteEmailSequencePayload` Soft-delete.

## Types

### EmailSequenceEntity (object)

Automated series of emails sent step by step to the records enrolled in it, with rules for when to send and when to stop.

- `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.
- `owner: ClientEntity` User who owns this email sequence.
- `deactivationReason: EmailSequenceDeactivationReasonEnum` Reason the sequence is currently disabled (e.g. Manual stop, system suspension). Read-only.
- `description: String` Free-form description of the sequence.
- `isEnabled: Boolean` Master switch for the sequence. Read-only on this surface — change it via the enable / disable mutations.
- `lastSchemaChange: DateTime` Timestamp of the most recent change to settings. Read-only.
- `lastStatusChange: DateTime` Timestamp of the most recent change to isEnabled. Read-only.
- `name: String!` Display name of the email sequence.
- `ownerId: ID!` Id of the email sequence owner.
- `settings: EmailSequenceSchema` JSON schema describing the sequence trigger, nodes (steps) and global actions (e.g. on-reply, on-bounce, on-unsubscribe). This payload conforms to the `EmailSequenceSchema` JSON Schema: GET /api/v100/rest/schemas/EmailSequenceSchema.json on your region's API host
- `type: ProcessTypeEnum!` Process category of the sequence (e.g. EmailSequence vs other process types).
- `activityLogs: EmailSequenceActivityLogEntityConnection (7 args)` Run history of the sequence — one log per scheduled execution.
- `documents: [CloudObjectRelationEntity!]` Attachments and other documents linked to this sequence.
- `enrolled: EmailSequenceEnrolledEntityConnection (7 args)` Enrolment records (recipients currently or previously running through the sequence).
- `status: ProcessStatusEnum` Effective status of the sequence (e.g. Scheduled, Running, Expired, Error). Read-only; derived from the active-from / active-to settings and the most recent activity log status.
- `lastEmailSequenceRun: DateTime` Timestamp the sequence last produced a run (delivered or attempted a step).
- `clickRate: Float` Fraction of delivered emails (0–1) where at least one tracked link was clicked.
- `bounceRate: Float` Fraction of sent emails (0–1) that bounced (the recipient mailserver rejected them).
- `openRate: Float` Fraction of delivered emails (0–1) that recorded at least one open event.
- `replyRate: Float` Fraction of delivered emails (0–1) where the recipient replied.
- `unsubscribeRate: Float` Fraction of delivered emails (0–1) where the recipient unsubscribed.
- `createdCount: Int!` Total number of emails produced (queued) by the sequence across all steps.
- `sentCount: Int!` Total number of emails actually delivered by the sequence across all steps.
- `enrollCount: Int!` Number of records (Accounts/Contacts/Leads/Opportunities) currently enrolled in this sequence.
- `solutions: SolutionEntityConnection (4 args)` Solutions whose canvas contains this record. Deleted solutions are not included.
- `triggerEntityName: EntityNameEnum` Entity name whose records trigger automatic enrollment into this sequence (e.g. "Lead", "Contact"). Empty when the sequence is manually enrolled only.
- `triggerFieldId: UUID` Id of the field on the trigger entity whose value change drives enrollment (e.g. a step field on a Lead). Empty when no field-based trigger is configured.
- `stepCount: Int` Number of steps configured in the sequence.
- `instancePermissions: [EntityPermsEnum!]! (1 args)` Permissions the current user has on this record, out of the requested ones.
- `stats: EmailSequenceStats! (1 args)` Statistics of the sequence for the selected period: enrollments, sent emails, opens, clicks, replies and records created by its steps.

### EmailSequenceEntityConnection (object)

Paginated list of EmailSequence records.

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

### EmailSequenceEntityEdge (object)

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

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

### EmailSequenceDeactivationReasonEnumFilterInput (input)

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

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

### EmailSequenceFilterInput (input)

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

- `OR: [EmailSequenceFilterInput!]` Matches records that meet at least one of the listed filters.
- `AND: [EmailSequenceFilterInput!]` Matches records that meet all of the listed filters.
- `NOT: EmailSequenceFilterInput` 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.
- `deactivationReason: EmailSequenceDeactivationReasonEnumFilterInput` Reason the sequence is currently disabled (e.g. Manual stop, system suspension). Read-only.
- `description: EntityFilterStringField` Free-form description of the sequence.
- `isEnabled: Boolean` Master switch for the sequence. Read-only on this surface — change it via the enable / disable mutations.
- `lastSchemaChange: EntityFilterDateTimeField` Timestamp of the most recent change to settings. Read-only.
- `lastStatusChange: EntityFilterDateTimeField` Timestamp of the most recent change to isEnabled. Read-only.
- `name: EntityFilterStringField` Display name of the email sequence.
- `ownerId: EntityFilterStringField` Id of the email sequence owner.
- `type: ProcessTypeEnumFilterInput` Process category of the sequence (e.g. EmailSequence vs other process types).
- `status: ProcessStatusEnum` Effective status of the sequence (e.g. Scheduled, Running, Expired, Error). Read-only; derived from the active-from / active-to settings and the most recent activity log status.
- `lastEmailSequenceRun: DateTime` Timestamp the sequence last produced a run (delivered or attempted a step).
- `clickRate: Float` Fraction of delivered emails (0–1) where at least one tracked link was clicked.
- `bounceRate: Float` Fraction of sent emails (0–1) that bounced (the recipient mailserver rejected them).
- `openRate: Float` Fraction of delivered emails (0–1) that recorded at least one open event.
- `replyRate: Float` Fraction of delivered emails (0–1) where the recipient replied.
- `unsubscribeRate: Float` Fraction of delivered emails (0–1) where the recipient unsubscribed.
- `createdCount: Int` Total number of emails produced (queued) by the sequence across all steps.
- `sentCount: Int` Total number of emails actually delivered by the sequence across all steps.
- `enrollCount: Int` Number of records (Accounts/Contacts/Leads/Opportunities) currently enrolled in this sequence.
- `triggerEntityName: EntityNameEnum` Entity name whose records trigger automatic enrollment into this sequence (e.g. "Lead", "Contact"). Empty when the sequence is manually enrolled only.
- `triggerFieldId: UUID` Id of the field on the trigger entity whose value change drives enrollment (e.g. a step field on a Lead). Empty when no field-based trigger is configured.
- `stepCount: Int` Number of steps configured in the sequence.
- `owner: ClientFilterInput` User who owns this email sequence. Matches records where a related record meets these conditions.
- `activityLogs: EmailSequenceActivityLogFilterInput` Run history of the sequence — one log per scheduled execution. Matches records where a related record meets these conditions.
- `documents: CloudObjectRelationFilterInput` Attachments and other documents linked to this sequence. Matches records where a related record meets these conditions.
- `enrolled: EmailSequenceEnrolledFilterInput` Enrolment records (recipients currently or previously running through the sequence). Matches records where a related record meets these conditions.

### EmailSequenceOrderByInput (input)

Sorting of EmailSequence 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.
- `owner: [ClientOrderByNestedInput!]` User who owns this email sequence. Sorts by fields of the related record, listed in order of priority.
- `deactivationReason: OrderByEnum` Reason the sequence is currently disabled (e.g. Manual stop, system suspension). Read-only.
- `description: OrderByEnum` Free-form description of the sequence.
- `isEnabled: OrderByEnum` Master switch for the sequence. Read-only on this surface — change it via the enable / disable mutations.
- `lastSchemaChange: OrderByEnum` Timestamp of the most recent change to settings. Read-only.
- `lastStatusChange: OrderByEnum` Timestamp of the most recent change to isEnabled. Read-only.
- `name: OrderByEnum` Display name of the email sequence.
- `ownerId: OrderByEnum` Id of the email sequence owner.
- `type: OrderByEnum` Process category of the sequence (e.g. EmailSequence vs other process types).
- `status: OrderByEnum` Effective status of the sequence (e.g. Scheduled, Running, Expired, Error). Read-only; derived from the active-from / active-to settings and the most recent activity log status.
- `lastEmailSequenceRun: OrderByEnum` Timestamp the sequence last produced a run (delivered or attempted a step).
- `clickRate: OrderByEnum` Fraction of delivered emails (0–1) where at least one tracked link was clicked.
- `bounceRate: OrderByEnum` Fraction of sent emails (0–1) that bounced (the recipient mailserver rejected them).
- `openRate: OrderByEnum` Fraction of delivered emails (0–1) that recorded at least one open event.
- `replyRate: OrderByEnum` Fraction of delivered emails (0–1) where the recipient replied.
- `unsubscribeRate: OrderByEnum` Fraction of delivered emails (0–1) where the recipient unsubscribed.
- `createdCount: OrderByEnum` Total number of emails produced (queued) by the sequence across all steps.
- `sentCount: OrderByEnum` Total number of emails actually delivered by the sequence across all steps.
- `enrollCount: OrderByEnum` Number of records (Accounts/Contacts/Leads/Opportunities) currently enrolled in this sequence.
- `solutions: OrderByEnum` Names of the solutions whose canvas contains this sequence, in name order. Empty when the sequence is on no solution canvas.
- `triggerEntityName: OrderByEnum` Entity name whose records trigger automatic enrollment into this sequence (e.g. "Lead", "Contact"). Empty when the sequence is manually enrolled only.
- `triggerFieldId: OrderByEnum` Id of the field on the trigger entity whose value change drives enrollment (e.g. a step field on a Lead). Empty when no field-based trigger is configured.
- `stepCount: OrderByEnum` Number of steps configured in the sequence.

### CreateEmailSequenceInput (input)

Field values of a new EmailSequence 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.
- `description: String` Free-form description of the sequence.
- `name: String!` Display name of the email sequence.
- `ownerId: ID!` Id of the email sequence owner.
- `settings: EmailSequenceSchemaJSONString` JSON schema describing the sequence trigger, nodes (steps) and global actions (e.g. on-reply, on-bounce, on-unsubscribe). This payload conforms to the `EmailSequenceSchema` JSON Schema: GET /api/v100/rest/schemas/EmailSequenceSchema.json on your region's API host
- `type: ProcessTypeEnum!` Process category of the sequence (e.g. EmailSequence vs other process types).
- `documents: [CreateCloudObjectRelationNoBackrefInput!]` Attachments and other documents linked to this sequence.

### CreateOrUpdateEmailSequenceInput (input)

Field values of an EmailSequence 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.
- `description: String` Free-form description of the sequence.
- `name: String` Display name of the email sequence.
- `ownerId: ID` Id of the email sequence owner.
- `settings: EmailSequenceSchemaJSONString` JSON schema describing the sequence trigger, nodes (steps) and global actions (e.g. on-reply, on-bounce, on-unsubscribe). This payload conforms to the `EmailSequenceSchema` JSON Schema: GET /api/v100/rest/schemas/EmailSequenceSchema.json on your region's API host
- `type: ProcessTypeEnum` Process category of the sequence (e.g. EmailSequence vs other process types).
- `documents: [CreateCloudObjectRelationNoBackrefInput!]` Attachments and other documents linked to this sequence.

### DeleteEmailSequenceInput (input)

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

### DisplayColumnParams (input)

Column requested from a record list: the field and the form in which its value is returned.

- `fieldId: ID!` Id of the field shown in the column.
- `displayOption: DisplayOption!` Form in which the column value is returned, for example as a readable name or as the raw stored value.

### EmailSequenceTabDataGridViewOptionsParams (input)

Options that narrow a list of email sequences by owner, active state, status and tags.

- `filterByOwnerId: [ID!]` Ids of the owners whose records are listed; null or an empty list turns the owner filter off.
- `showActive: Boolean!` When true, the list includes active records. When both showActive and showInactive are false, the list is not filtered by state.
- `showInactive: Boolean!` When true, the list includes inactive records; see showActive.
- `filterByStatus: [ProcessStatusEnum!]` Statuses to include, such as Ok, Warning or Error; null or an empty list turns the status filter off. Ignored when both showActive and showInactive are false.
- `filterByTagIds: [ID!]` Ids of tags; only records with at least one of them are listed. Null or an empty list turns the tag filter off. Only processes can be tagged, so for approval processes and email sequences any tag id returns an empty list.

### GridHighlightChangesParams (input)

Settings for highlighting recent changes in a record grid: the look-back period, the columns watched and whether only changed records are listed.

- `period: HighlightPeriodEnum!` Look-back window in which changes are highlighted; with Custom, customPeriodValue gives the number of days.
- `columns: [UUID!]` Ids of the displayed fields whose changes are highlighted. Null highlights all displayed fields; an empty list turns highlighting off.
- `showOnlyRecordsWithChanges: Boolean!` When true, only records with a highlighted change are listed.
- `customPeriodValue: Int` Number of days to look back when period is Custom.
- `isEnabled: Boolean` When true, changes are highlighted. Defaults to false, which turns highlighting off.

### UpdateEmailSequenceInput (input)

Id of an EmailSequence 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.
- `description: String` Free-form description of the sequence.
- `name: String` Display name of the email sequence.
- `ownerId: ID` Id of the email sequence owner.
- `settings: EmailSequenceSchemaJSONString` JSON schema describing the sequence trigger, nodes (steps) and global actions (e.g. on-reply, on-bounce, on-unsubscribe). This payload conforms to the `EmailSequenceSchema` JSON Schema: GET /api/v100/rest/schemas/EmailSequenceSchema.json on your region's API host
- `type: ProcessTypeEnum` Process category of the sequence (e.g. EmailSequence vs other process types).
- `documents: [CreateCloudObjectRelationNoBackrefInput!]` Attachments and other documents linked to this sequence.

### BulkUpdateEmailSequencePayload (object)

Result of the bulkUpdateEmailSequence mutation.

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

### CreateEmailSequencePayload (object)

Result of the createEmailSequence mutation.

- `emailSequence: EmailSequenceEntity` 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).

### DeleteEmailSequencePayload (object)

Result of the deleteEmailSequence mutation.

- `emailSequence: EmailSequenceEntity` 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).

### UpdateEmailSequencePayload (object)

Result of the updateEmailSequence mutation.

- `emailSequence: EmailSequenceEntity` 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).

### ChangeLogAccountClassValue (object)

Value of an account class field before or after a change.

- `accountClassValue: AccountClassEnum!` Account class the field held before or after the change.

### ChangeLogAttendeeEmailsValue (object)

Value of an appointment attendee email field as recorded in a change log entry.

- `emails: [String]!` Email addresses of the attendees in the field value.

### ChangeLogBooleanValue (object)

Value of a true/false field before or after a change.

- `booleanValue: Boolean!` True/false value of the field.

### ChangeLogDatetimeValue (object)

Value of a date and time field before or after a change.

- `datetimeValue: DateTime!` Date and time value of the field, in the requesting user's time zone.

### ChangeLogDateValue (object)

Value of a date field before or after a change.

- `dateValue: Date!` Date the field held before or after the change, without a time part.

### ChangeLogDropdownValue (object)

Option selected in a dropdown or checkbox field value recorded in a change.

- `id: ID!` Id of the selected option.
- `label: String!` Current name of the selected option.

### ChangeLogEntityListValue (object)

Records referenced by a field that links several records, such as linked records or watchers, before or after a change.

- `values: [ChangeLogEntityListValueItem!]!` Records referenced by the field value, such as the related records of a lookup, linked-records, products or watchers field.

### ChangeLogEntityListValueItem (object)

Record referenced by a field value recorded in a change.

- `id: ID!` Id of the referenced record.
- `label: String!` Current name of the referenced record.
- `entityName: EntityNameEnum!` Type of the referenced record; CustomEntity for a custom entity record.
- `entityApiName: String` API name of the custom entity when entityName is CustomEntity; null otherwise.

### ChangeLogFloatValue (object)

Value of a decimal-number field before or after a change.

- `floatValue: Float!` Decimal value of the field.

### ChangeLogForeignCurrencyValue (object)

Amount of a foreign-currency field before or after a change, in its own currency and in the base currency of the space.

- `baseValue: Float!` Amount converted to the base currency of the space.
- `valueForeign: Float!` Amount in the currency given by currencyId.
- `symbol: String!` Symbol of the currency given by currencyId.
- `currencyId: ID!` Id of the currency the amount was entered in.

### ChangeLogGenderValue (object)

Value of a gender field before or after a change.

- `genderValue: GenderEnum!` Gender the field held before or after the change.

### ChangeLogGeoLocationValue (object)

Coordinates of a geographic location field before or after a change.

- `formatted: String!` Location written as degrees, minutes and seconds.
- `lat: Float!` Latitude in decimal degrees.
- `lng: Float!` Longitude in decimal degrees.

### ChangeLogIntValue (object)

Value of a whole-number field before or after a change.

- `intValue: Int!` Whole-number value of the field.

### ChangeLogLabelFlagValue (object)

Label flags (priority, hot, stalled) of a record before or after a change.

- `flagValue: Int!` Flags of the field value as a bit mask: Priority = 1, Hot = 2, Stalled = 4.

### ChangeLogLeadStatusValue (object)

Status of a lead before or after a change.

- `leadStatusValue: LeadStatusEnum!` Lead status the field held before or after the change.

### ChangeLogMeetingValue (object)

Online meeting of an appointment before or after a change.

- `joinUrl: String!` Link participants use to join the online meeting.
- `type: AppointmentMeetingTypeEnum!` Online meeting service hosting the meeting.

### ChangeLogMultiCheckboxValue (object)

Options selected in a multi-select checkbox field before or after a change.

- `values: [ChangeLogDropdownValue!]!` Options selected in the field value.

### ChangeLogOpptyStatusValue (object)

Status of an opportunity before or after a change.

- `opptyStatusValue: OpptyStatusEnum!` Opportunity status the field held before or after the change.

### ChangeLogPriorityValue (object)

Value of a priority field before or after a change.

- `priorityValue: PriorityEnum!` Priority the field held before or after the change.

### ChangeLogQuoteStatusValue (object)

Status of a quote before or after a change.

- `quoteStatusValue: QuoteStatusEnum!` Quote status the field held before or after the change.

### ChangeLogShareModeValue (object)

Sharing mode of a record before or after a change.

- `shareModeValue: ShareModeEnum!` Sharing mode the field held before or after the change.

### ChangeLogStringValue (object)

Value of a text field before or after a change.

- `stringValue: String!` Text value of the field.

### ChangeLogTagsValue (object)

Tags of a tags field before or after a change.

- `values: [ChangeLogTagsValueItem!]!` Tags in the field value.

### ChangeLogTagsValueItem (object)

Tag in a tags field value recorded in a change.

- `id: ID!` Id of the tag.
- `label: String!` Current name of the tag.
- `color: Int!` Display color of the tag, encoded as a 24-bit RGB integer.

### ChangeLogTaskStatusValue (object)

Status of a task before or after a change.

- `taskStatusValue: TaskStatusEnum!` Task status the field held before or after the change.

### ChangeLogUuidValue (object)

Record referenced by a single-record field before or after a change.

- `id: ID!` Id of the referenced record.
- `label: String!` Current name of the referenced record.

### ChangeLogValueObject (union)

Value of a field before or after a change; the variant matches the kind of field, such as text, number, date, option, record reference or currency amount.

ChangeLogStringValue | ChangeLogIntValue | ChangeLogFloatValue | ChangeLogBooleanValue | ChangeLogDateValue | ChangeLogDatetimeValue | ChangeLogDropdownValue | ChangeLogForeignCurrencyValue | ChangeLogMultiCheckboxValue | ChangeLogEntityListValue | ChangeLogUuidValue | ChangeLogGenderValue | ChangeLogLabelFlagValue | ChangeLogPriorityValue | ChangeLogAccountClassValue | ChangeLogShareModeValue | ChangeLogTaskStatusValue | ChangeLogLeadStatusValue | ChangeLogOpptyStatusValue | ChangeLogMeetingValue | ChangeLogTagsValue | ChangeLogAttendeeEmailsValue | ChangeLogQuoteStatusValue | ChangeLogGeoLocationValue

### DataGridChange (object)

Most recent change of a field value in a record grid within the highlight period: the old and new value, when it changed, by whom and through which application.

- `newValue: ChangeLogValueObject` Value of the field after its most recent change in the highlight period.
- `oldValue: ChangeLogValueObject` Value of the field before that change.
- `applicationId: UUID!` Id of the application through which the change was made.
- `created: DateTime!` Date and time of the change.
- `userId: Int` Numeric account id of the user who made the change; it differs from the user id used on space records.

### DataGridViewItem (object)

Row of a record grid: the record id and the values of the requested columns.

- `id: ID!` Id of the record shown in the row.
- `data: [FieldDataContainer!]!` Values of the row, one per requested display column.

### DisplayOption (enum)

Form in which a field value is returned, for example as a readable name or as the raw stored value.

- `Natural` Readable display value; for references, the name of the related record.
- `AsIs` Raw stored value, such as the ID of a related record.
- `AsPicture` URL of the related record's picture.
- `AsNumeric` Numeric value suitable for calculations.
- `Mixed` Object containing the value in several display forms, keyed by display option.
- `AsEntityType` Record type of the related record.
- `Custom` A specific field of the related record, such as a currency code, instead of its default display value; chosen by the server.
- `CompactView` Text of the related record's compact view.
- `RollupRawData` Structured raw data of complex fields (for example pipeline, days in step or social profiles); same as Natural for other fields.

### EmailSequenceCountStats (interface)

Email counts of an email sequence: how many of its emails were sent, opened, clicked, replied to or used to unsubscribe.

- `openCount: Int!` Number of sent emails that were opened at least once.
- `clickCount: Int!` Number of sent emails in which at least one link was clicked.
- `replyCount: Int!` Number of sent emails that received a reply.
- `unsubscribeCount: Int!` Number of sent emails through which the recipient unsubscribed.
- `sentCount: Int!` Number of emails sent.

### EmailSequenceCreateRecordNode (object)

Email sequence step that creates a record, such as a task, for the enrolled record.

- `id: UUID!` Unique identifier of this step within the sequence.
- `condition: EmailSequenceNodeCondition!` Condition that decides whether this step runs or the enrollment ends.
- `dayOffset: Int!` Number of days to wait before this step runs, counted from the previous step (or from enrollment for the first step).
- `entity: ProcessEntityTemplate` Template describing the record to create when this step runs, including the field values to set.
- `entityType: EntityNameEnum!` Type of record created by this step. Currently only Task is supported.

### EmailSequenceDeactivationReasonEnum (enum)

Why an email sequence is currently disabled.

- `NoReason` The sequence is enabled.
- `Manual` A user disabled the sequence.
- `TooManyErrors` The sequence was suspended automatically after repeated failed runs.
- `DisabledFeature` The sequence was suspended because the feature is no longer available in the space.

### EmailSequenceFilter (object)

Field conditions an email sequence checks against an enrolled record.

- `filterMainBox: MainFilterBox!` Primary group of field conditions evaluated against the record.
- `filterSiblingBoxes: [FilterBox!]!` Additional condition groups combined with the main group to form the complete filter.
- `operator: FilterGroupOperator!` Logical operator (AND or OR) that joins the condition groups when no explicit formula is given.
- `formula: String` Optional boolean expression referencing the condition groups by number to combine them in a custom way.

### EmailSequenceGlobalActionsSettings (object)

Sequence-wide reactions of an email sequence to replies, unsubscribes and custom conditions, such as ending the enrollment or sending an email.

- `onReply: Boolean!` When true, the sequence reacts when a recipient replies to one of its emails.
- `onReplyUnenroll: Boolean!` When true, a recipient who replies is removed from the sequence.
- `onReplySendEmail: Boolean!` When true, an email is sent in response to a reply.
- `onReplyEmail: EmailSequenceNodeEmail` Email sent in response to a reply.
- `onReplyCreateEntity: Boolean!` When true, a record is created in response to a reply.
- `onReplyEntity: ProcessEntityTemplate` Template for the record created in response to a reply.
- `onUnsubscribe: Boolean!` When true, the sequence reacts when a recipient unsubscribes, removing them from the sequence.
- `onUnsubscribeCreateEntity: Boolean!` When true, a record is created when a recipient unsubscribes.
- `onUnsubscribeEntity: ProcessEntityTemplate` Template for the record created when a recipient unsubscribes.
- `onCondition: Boolean!` When true, the sequence evaluates the custom condition filter and acts when it matches.
- `onConditionFilter: EmailSequenceFilter!` Field-based filter that defines the custom condition checked against the enrolled record.
- `onConditionUnenroll: Boolean!` When true, a record matching the custom condition is removed from the sequence.
- `onConditionSendEmail: Boolean!` When true, an email is sent when the custom condition matches.
- `onConditionEmail: EmailSequenceNodeEmail` Email sent when the custom condition matches.
- `onConditionCreateEntity: Boolean!` When true, a record is created when the custom condition matches.
- `onConditionEntity: ProcessEntityTemplate` Template for the record created when the custom condition matches.
- `onBounce: Boolean!` When true, the sequence reacts when one of its emails bounces.
- `onBounceUnenroll: Boolean!` When true, a recipient whose email bounces is removed from the sequence.
- `onBounceUnsubscribe: Boolean!` When true, a recipient whose email bounces is also marked as unsubscribed.

### EmailSequenceNode (interface)

Step of an email sequence: sends an email or creates a record a set number of days after the previous step, when its condition holds.

- `id: UUID!` Unique identifier of this step within the sequence.
- `condition: EmailSequenceNodeCondition!` Condition that decides whether this step runs or the enrollment ends.
- `dayOffset: Int!` Number of days to wait before this step runs, counted from the previous step (or from enrollment for the first step).

### EmailSequenceNodeCondition (object)

Condition a step of an email sequence checks before it runs, such as no reply to the previous email; when it fails, the enrollment ends.

- `action: EmailSequenceNodeConditionActionEnum!` Condition that must hold for the step to run. Always runs unconditionally; NotOpen, NoClick, and NoReply check whether the previous email was opened, clicked, or replied to; TaskCompleted, TaskNotCompleted, and TaskNotUpdated check the previous task; Custom evaluates the filter.
- `filter: EmailSequenceFilter!` Field-based filter evaluated against the record when the action is Custom.

### EmailSequenceNodeConditionActionEnum (enum)

Condition a sequence step checks against the previous step before it runs; when it fails, the recipient leaves the sequence.

- `Always` The step always runs; required for the first step.
- `NotOpen` Runs only if the previous email was not opened.
- `NoClick` Runs only if no link in the previous email was clicked.
- `NoReply` Runs only if the previous email was not replied to.
- `TaskNotUpdated` Runs only if the task created by the previous step has not been modified.
- `TaskNotCompleted` Runs only if the task created by the previous step is not completed.
- `TaskCompleted` Runs only if the task created by the previous step is completed.
- `Custom` Runs only if the previous step's email or task matches the custom filter.

### EmailSequencePeriodStats (object)

Statistics of an email sequence for one period of its timeline.

- `openCount: Int!` Number of sent emails that were opened at least once.
- `clickCount: Int!` Number of sent emails in which at least one link was clicked.
- `replyCount: Int!` Number of sent emails that received a reply.
- `unsubscribeCount: Int!` Number of sent emails through which the recipient unsubscribed.
- `sentCount: Int!` Number of emails sent.
- `createCount: Int!` Number of tasks, leads and text messages created in the period.
- `enrollCount: Int!` Number of records enrolled in the period.
- `date: Date!` Date of the first activity in the period.

### EmailSequenceSchema (object)

Definition of an email sequence: the records it enrolls, the steps it runs and its sending settings.

- `trigger: EmailSequenceTrigger!` Defines which record type and email field enroll into the sequence.
- `nodes: [EmailSequenceNode!]!` Ordered steps of the sequence, each sending an email or creating a record subject to its condition and day offset.
- `settings: EmailSequenceSettings!` Scheduling window, time zone, global actions, and lifecycle options for the sequence.

### EmailSequenceSendEmailNode (object)

Email sequence step that sends an email.

- `id: UUID!` Unique identifier of this step within the sequence.
- `condition: EmailSequenceNodeCondition!` Condition that decides whether this step runs or the enrollment ends.
- `dayOffset: Int!` Number of days to wait before this step runs, counted from the previous step (or from enrollment for the first step).
- `email: EmailSequenceNodeEmail!` Email message this step sends, including recipients, content, and sender.

### EmailSequenceSettings (object)

Sending window, time zone, active period and sequence-wide reactions of an email sequence.

- `globalActions: EmailSequenceGlobalActionsSettings!` Sequence-wide reactions to recipient replies, unsubscribes, bounces, and custom conditions.
- `timezone: String!` IANA time-zone name (for example Europe/Bratislava) in which the sending window and active dates are interpreted.
- `dayOfWeek: [Int!]!` Weekdays on which emails may be sent, given as numbers 1 (Monday) through 7 (Sunday).
- `fromTimeOfDay: Int!` Start of the daily sending window, expressed as minutes after midnight (0-1440).
- `toTimeOfDay: Int!` End of the daily sending window, expressed as minutes after midnight (0-1440); must be greater than fromTimeOfDay.
- `everyEmailStartsConversation: Boolean!` When true, each email starts its own conversation thread; when false, all emails of one enrollment share a single thread.
- `triggerProcess: Boolean` When true, the sequence starts the process given by triggerProcessId for records it creates.
- `triggerProcessId: UUID` Identifier of the process to start when triggerProcess is enabled.
- `activeFrom: Date` Date from which the sequence is allowed to send; earlier scheduling waits until this date.
- `activeTo: Date` Date after which the sequence stops sending.
- `autoUnenrollWhenExpired: Boolean` When true, records still enrolled after activeTo passes are automatically removed from the sequence.

### EmailSequenceStats (object)

Statistics of an email sequence for a period: enrollments, sent emails with their opens, clicks and replies, and the records it created.

- `openCount: Int!` Number of sent emails that were opened at least once.
- `clickCount: Int!` Number of sent emails in which at least one link was clicked.
- `replyCount: Int!` Number of sent emails that received a reply.
- `unsubscribeCount: Int!` Number of sent emails through which the recipient unsubscribed.
- `sentCount: Int!` Number of emails sent.
- `createTaskCount: Int!` Number of tasks created by the sequence steps.
- `createLeadCount: Int!` Number of leads created by the sequence steps.
- `createTextCount: Int!` Number of text messages sent by the sequence steps.
- `createTaskRecipientsCount: Int!` Number of enrolled records for which the sequence created at least one task.
- `createLeadRecipientsCount: Int!` Number of enrolled records for which the sequence created at least one lead.
- `createTextRecipientsCount: Int!` Number of enrolled records the sequence sent at least one text message to.
- `currentEnrollCount: Int!` Number of enrollments that are still running.
- `unenrollCount: Int!` Number of enrollments that ended because the record was unenrolled.
- `sentRecipientsCount: Int!` Number of enrolled records the sequence sent at least one email to.
- `notOpenRecipientsCount: Int!` Number of enrolled records that were sent emails but opened none of them.
- `openRecipientsCount: Int!` Number of enrolled records that opened at least one email.
- `clickRecipientsCount: Int!` Number of enrolled records that clicked a link in an email.
- `replyRecipientsCount: Int!` Number of enrolled records that replied to at least one email.
- `bounceRecipientsCount: Int!` Number of enrolled records with at least one bounced email.
- `notOpenCount: Int!` Number of sent emails that were not opened.
- `enrollCount: Int!` Number of enrollments.
- `bounceCount: Int!` Number of sent emails that bounced.
- `steps: [EmailSequenceStepStats!]!` Statistics of each step, in step order. They count only activity since the step statistics were last reset.
- `recipients: GenericDrilldownDataGridViewItems (10 args)` Records behind one of the counts, chosen by `type`, as a list view. Empty for a sequence without settings.
- `createdTasks: GenericDrilldownDataGridViewItems! (9 args)` Tasks created by the sequence, as a list view.
- `createdLeads: GenericDrilldownDataGridViewItems! (9 args)` Leads created by the sequence, as a list view.
- `timeline: [EmailSequencePeriodStats!]! (1 args)` Statistics over time, one item per period with activity, oldest first.

### EmailSequenceStatsPeriodEnum (enum)

Time window for email sequence statistics.

- `All` The whole history of the sequence.
- `Last7Days` The last 7 days.
- `Last30Days` The last 30 days.
- `Last90Days` The last 90 days.
- `LastYear` The last 12 months.

### EmailSequenceStatsRecipientTypeEnum (enum)

Group of email sequence recipients to list in the sequence statistics drill-down.

- `Enroll` All records ever enrolled in the sequence.
- `CurrentEnroll` Records that are still running through the sequence.
- `Unenroll` Records that were unenrolled before the sequence finished.
- `Unsubscribe` Recipients who unsubscribed through a sequence email.
- `Sent` Recipients who were sent at least one sequence email.
- `Open` Recipients who opened a sequence email.
- `NotOpen` Recipients who were sent a sequence email but opened none.
- `Click` Recipients who clicked a link in a sequence email.
- `Reply` Recipients who replied to a sequence email.
- `Bounce` Recipients whose sequence email bounced.
- `CreateTask` Recipients for whom a sequence step created a task.
- `CreateLead` Recipients for whom a sequence step created a lead.
- `CreateText` Recipients for whom a sequence step created a text message.

### EmailSequenceStepStats (object)

Statistics of one step of an email sequence.

- `openCount: Int!` Number of sent emails that were opened at least once.
- `clickCount: Int!` Number of sent emails in which at least one link was clicked.
- `replyCount: Int!` Number of sent emails that received a reply.
- `unsubscribeCount: Int!` Number of sent emails through which the recipient unsubscribed.
- `sentCount: Int!` Number of emails sent.
- `step: EmailSequenceNode!` Sequence step these statistics belong to.
- `emailTemplate: EmailTemplateEntity` Email template the step sends; empty when the step sends no email from a template.
- `conversion: Int` Share, in percent, of this step's emails and created records that the next step followed up on. Empty for the last step.
- `createCount: Int!` Number of tasks, leads and text messages the step created.
- `bounceCount: Int!` Number of emails sent by the step that bounced.

### EmailSequenceTimelinePeriodEnum (enum)

Time bucket used to group email sequence statistics in the timeline.

- `Daily` One data point per day.
- `Weekly` One data point per week.
- `Monthly` One data point per month.
- `Quarterly` One data point per quarter.
- `Yearly` One data point per year.

### EmailSequenceTrigger (object)

Record type an email sequence enrolls and the email field whose address its emails are sent to.

- `entityType: EntityNameEnum!` Type of record that enrolls into the sequence when the trigger fires, such as Contact, Account, Lead, Opportunity, or Project.
- `fieldId: ID!` Identifier of the email field on the trigger record whose address the sequence sends to.
- `entityApiName: String` API name of the trigger record type when it is a custom entity.
- `relationLookupFieldId: ID` Identifier of a relation field used to resolve the email recipient from a related record rather than the trigger record itself.

### FieldDataContainer (object)

Value of one field in a row of a data grid view.

- `value: JSONString` Value of the field in the form given by displayOption.
- `fieldId: ID!` Id of the field the value belongs to.
- `displayOption: DisplayOption!` Form in which the value is returned.
- `change: DataGridChange` Most recent change of the value when the view highlights changes; null otherwise.

### GenericDrilldownDataGridViewItems (object)

Scrollable list of the records behind a chart, grid or statistic, as rows with the requested columns, plus sums and averages of the numeric columns.

- `total: Int!` Total number of results in the view
- `sessionId: String!` Session that identifies consistent snapshot of the view data used for scrolling
- `items: [DataGridViewItem!]!` Rows of the requested page, one per record, with the values of the requested columns.
- `sumItem: [FieldDataContainer!]!` Sum of each numeric column over all listed records, one value per field.
- `averageItem: [FieldDataContainer!]!` Average of each numeric column over all listed records, one value per field; empty values count as zero.

### HighlightPeriodEnum (enum)

Look-back window used to highlight records or values that changed recently.

- `Last7Days` Changes in the last 7 days.
- `Last14Days` Changes in the last 14 days.
- `Last30Days` Changes in the last 30 days.
- `Last3Months` Changes in the last 3 months.
- `Last6Months` Changes in the last 6 months.
- `LastYear` Changes in the last 12 months.
- `Custom` Changes in the last number of days set by customPeriodValue.

### ListingViewInterface (interface)

Scrollable list of records, with the total number of results.

- `total: Int!` Total number of results in the view

### SnapshotIndexedDataInterface (interface)

Rows of a scrollable view, addressed by their position within a consistent snapshot of the data.

- `sessionId: String!` Session that identifies consistent snapshot of the view data used for scrolling
- `total: Int!` Total number of results in the view
- `items: [ViewItemInterface!]!` Row items of scrollable view indexed by number

### ViewItemInterface (interface)

Row of a scrollable record list, identified by the record id.

- `id: ID!` Id of the record shown in the row.

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