DemoEmailChannel
A channel for email conversations.
To fetch your active mailboxes, you can issue this query:
query Channels {
channels {
nodes {
... on DemoEmailChannel {
color
createdAt
forwardEmailAddress
fromName
id
name
signature
updatedAt
}
}
pageInfo {
hasNextPage
}
}
}
To fetch inactive mailboxes:
query Channels {
channels(filter: { state: UNCONFIRMED }) {
nodes {
... on DemoEmailChannel {
id
name
}
}
}
}
To fetch accessible folders (paginated) for each of your mailboxes:
query Channels {
channels {
nodes {
... on DemoEmailChannel {
id
name
folders {
nodes {
id
name
}
pageInfo {
hasNextPage
}
}
}
}
}
}
To fetch conversations in this mailbox, use the QueryRoot
conversations field with a filter argument e.g.:
query Conversations {
conversations(filter: { channel_id: "ch_12345678" }) {
nodes {
... on Conversation {
id
number
}
}
pageInfo {
hasNextPage
}
}
}
type DemoEmailChannel implements Channel, EmailInterface, Node {
aiDraftsChannels: [EmailChannel!]
aiDraftsKnowledgeBases: [KnowledgeBase!]
aiQualityRating: String
autoBccAddress: String
color: String!
conversationCount(
state: [ConversationState!]
): Int!
createdAt: DateTime!
customFields(
after: String
before: String
first: Int
last: Int
): CustomFieldConnection!
email: String
emailTemplates: [EmailTemplate!]!
errors: [ChannelErrorTypeUnion!]!
folders(
after: String
before: String
filter: FolderFilter
first: Int
last: Int
orderBy: FolderOrder
): FolderConnection
forwardEmailAddress: String!
fromName: String!
id: ID!
incomingEmailServer: IncomingServerTypeUnion
name: String!
outgoingEmailServer: OutgoingServerTypeUnion
permittedAgents(
after: String
agentIds: [ID!]
before: String
first: Int
last: Int
): AgentConnection!
pinnedSearches(
after: String
before: String
filter: PinnedSearchFilter
first: Int
last: Int
orderBy: PinnedSearchOrder
): PinnedSearchConnection
position: Int!
provider: String!
restriction: Restriction!
senderName: String
signature: String
state: ChannelState!
tags(
after: String
before: String
filter: TagFilter
first: Int
last: Int
orderBy: TagOrder
): TagConnection
threadingType: ThreadingType!
type: ChannelType!
updatedAt: DateTime!
useAgentName: Boolean
}
Fields
DemoEmailChannel.aiDraftsChannels ● [EmailChannel!] list object common
List of mailbox IDs used for generating AI drafts.
DemoEmailChannel.aiDraftsKnowledgeBases ● [KnowledgeBase!] list object common
List of knowledge base IDs used for generating AI drafts.
DemoEmailChannel.aiQualityRating ● String scalar common
AI quality rating for the mailbox.
DemoEmailChannel.autoBccAddress ● String scalar common
Auto BCC email address.
DemoEmailChannel.color ● String! non-null scalar common
The color of the mailbox.
DemoEmailChannel.conversationCount ● Int! non-null scalar common
The count of conversations in the channel.
DemoEmailChannel.conversationCount.state●[ConversationState!]list enum commonFilter by state.
DemoEmailChannel.createdAt ● DateTime! non-null scalar common
The date and time that the object was created.
DemoEmailChannel.customFields ● CustomFieldConnection! non-null object common
The custom fields belonging to the custom field category.
DemoEmailChannel.customFields.after●Stringscalar commonReturns the elements in the list that come after the specified cursor.
DemoEmailChannel.customFields.before ● String scalar common
Returns the elements in the list that come before the specified cursor.
DemoEmailChannel.customFields.first ● Int scalar common
Returns the first n elements from the list.
DemoEmailChannel.customFields.last ● Int scalar common
Returns the last n elements from the list.
DemoEmailChannel.email ● String scalar common
The email address associated with the mailbox.
DemoEmailChannel.emailTemplates ● [EmailTemplate!]! non-null object common
Email template used for automated or manual email communication.
DemoEmailChannel.errors ● [ChannelErrorTypeUnion!]! non-null union common
Represents errors that occurred during channel integration setup.
DemoEmailChannel.folders ● FolderConnection object common
Lists all folders that are accessible to the authenticated agent. Each folder can be associated with one or more mailboxes.
DemoEmailChannel.folders.after●Stringscalar commonReturns the elements in the list that come after the specified cursor.
DemoEmailChannel.folders.before ● String scalar common
Returns the elements in the list that come before the specified cursor.
DemoEmailChannel.folders.filter ● FolderFilter input common
The fields by which to filter the results.
DemoEmailChannel.folders.first ● Int scalar common
Returns the first n elements from the list.
DemoEmailChannel.folders.last ● Int scalar common
Returns the last n elements from the list.
DemoEmailChannel.folders.orderBy ● FolderOrder input common
The field and direction by which to order the results.
DemoEmailChannel.forwardEmailAddress ● String! non-null scalar common
The forwarding email address associated with the mailbox.
DemoEmailChannel.fromName ● String! non-null scalar common
The name that replies should be sent from.
DemoEmailChannel.id ● ID! non-null scalar common
DemoEmailChannel.incomingEmailServer ● IncomingServerTypeUnion union common
The custom server used to send out emails.
DemoEmailChannel.name ● String! non-null scalar common
The name of the channel.
DemoEmailChannel.outgoingEmailServer ● OutgoingServerTypeUnion union common
The custom server used to send out emails.
DemoEmailChannel.permittedAgents ● AgentConnection! non-null object common
The agents permitted to access this channel.
DemoEmailChannel.permittedAgents.after●Stringscalar commonReturns the elements in the list that come after the specified cursor.
DemoEmailChannel.permittedAgents.agentIds ● [ID!] list scalar common
Agents that needs to be included
DemoEmailChannel.permittedAgents.before ● String scalar common
Returns the elements in the list that come before the specified cursor.
DemoEmailChannel.permittedAgents.first ● Int scalar common
Returns the first n elements from the list.
DemoEmailChannel.permittedAgents.last ● Int scalar common
Returns the last n elements from the list.
DemoEmailChannel.pinnedSearches ● PinnedSearchConnection object common
Lists all folders that are accessible to the authenticated agent. Each folder can be associated with one or more mailboxes.
DemoEmailChannel.pinnedSearches.after●Stringscalar commonReturns the elements in the list that come after the specified cursor.
DemoEmailChannel.pinnedSearches.before ● String scalar common
Returns the elements in the list that come before the specified cursor.
DemoEmailChannel.pinnedSearches.filter ● PinnedSearchFilter input common
The fields by which to filter the results.
DemoEmailChannel.pinnedSearches.first ● Int scalar common
Returns the first n elements from the list.
DemoEmailChannel.pinnedSearches.last ● Int scalar common
Returns the last n elements from the list.
DemoEmailChannel.pinnedSearches.orderBy ● PinnedSearchOrder input common
The field and direction by which to order the results.
DemoEmailChannel.position ● Int! non-null scalar common
The position that the mailbox should appear at when listed.
DemoEmailChannel.provider ● String! non-null scalar common
The provider.
DemoEmailChannel.restriction ● Restriction! non-null object common
The agents or teams that are allowed to access this channel.
DemoEmailChannel.senderName ● String scalar common
Customers see this name in the From field when they view conversations sent from this channel.
DemoEmailChannel.signature ● String scalar common
The default signature on outgoing messages from the mailbox.
DemoEmailChannel.state ● ChannelState! non-null enum common
The state of the channel.
DemoEmailChannel.tags ● TagConnection object common
Lists all tags.
DemoEmailChannel.tags.after●Stringscalar commonReturns the elements in the list that come after the specified cursor.
DemoEmailChannel.tags.before ● String scalar common
Returns the elements in the list that come before the specified cursor.
DemoEmailChannel.tags.filter ● TagFilter input common
The fields by which to filter the results.
DemoEmailChannel.tags.first ● Int scalar common
Returns the first n elements from the list.
DemoEmailChannel.tags.last ● Int scalar common
Returns the last n elements from the list.
DemoEmailChannel.tags.orderBy ● TagOrder input common
The field and direction by which to order the results.
DemoEmailChannel.threadingType ● ThreadingType! non-null enum common
Whether to use the agent’s name in customer replies.
DemoEmailChannel.type ● ChannelType! non-null enum common
The communication type of the channel.
DemoEmailChannel.updatedAt ● DateTime! non-null scalar common
The date and time that the object was last updated.
DemoEmailChannel.useAgentName ● Boolean scalar common
Whether to use the agent’s name in customer replies.
Interfaces
Channel interface common
A channel is a source of incoming conversations. It dictates how messages in those conversations are sent and received.
For example, an EmailChannel is a channel where messages are sent as
email. To fetch all of them:
query Channels {
channels {
nodes {
... on Channel {
__typename
id
name
conversationCount
}
}
}
}
By default channels are sorted by their user-defined row-order, called their position. To sort by name instead:
query Channels {
channels( orderBy: { field: NAME, direction: ASC } ) {
nodes {
... on EmailChannel {
id
}
}
}
}
To find which agents have permission to view this channel:
query Channels {
channels {
nodes {
id
name
permittedAgents {
totalCount
nodes {
id
}
}
}
}
}
Only find channels where the user is granted access to view it:
query Channels {
channels(filter: { scope: CURRENT_USER }) {
nodes {
id
name
permittedAgents {
totalCount
nodes {
id
}
}
}
}
}
Find all channels the user is allowed to view. Admin users can always view all channels:
query Channels {
channels(filter: { scope: ALL }) {
nodes {
id
name
permittedAgents {
totalCount
nodes {
id
}
}
}
}
}
EmailInterface interface common
Node interface common
An object with an ID.