Channel
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
}
}
}
}
}
interface Channel {
color: String!
conversationCount(
state: [ConversationState!]
): Int!
createdAt: DateTime!
customFields(
after: String
before: String
first: Int
last: Int
): CustomFieldConnection!
errors: [ChannelErrorTypeUnion!]!
folders(
after: String
before: String
filter: FolderFilter
first: Int
last: Int
orderBy: FolderOrder
): FolderConnection
id: ID!
name: String!
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
restriction: Restriction!
senderName: String
state: ChannelState!
tags(
after: String
before: String
filter: TagFilter
first: Int
last: Int
orderBy: TagOrder
): TagConnection
type: ChannelType!
updatedAt: DateTime!
}
Fields
Channel.color ● String! non-null scalar common
The color of the channel.
Channel.conversationCount ● Int! non-null scalar common
The count of conversations in the channel.
Channel.conversationCount.state●[ConversationState!]list enum commonFilter by state.
Channel.createdAt ● DateTime! non-null scalar common
The date and time that the object was created.
Channel.customFields ● CustomFieldConnection! non-null object common
The custom fields belonging to the custom field category.
Channel.customFields.after●Stringscalar commonReturns the elements in the list that come after the specified cursor.
Channel.customFields.before ● String scalar common
Returns the elements in the list that come before the specified cursor.
Channel.customFields.first ● Int scalar common
Returns the first n elements from the list.
Channel.customFields.last ● Int scalar common
Returns the last n elements from the list.
Channel.errors ● [ChannelErrorTypeUnion!]! non-null union common
Represents errors that occurred during channel integration setup.
Channel.folders ● FolderConnection object common
Lists all folders that are accessible to the authenticated agent. Each folder can be associated with one or more mailboxes.
Channel.folders.after●Stringscalar commonReturns the elements in the list that come after the specified cursor.
Channel.folders.before ● String scalar common
Returns the elements in the list that come before the specified cursor.
Channel.folders.filter ● FolderFilter input common
The fields by which to filter the results.
Channel.folders.first ● Int scalar common
Returns the first n elements from the list.
Channel.folders.last ● Int scalar common
Returns the last n elements from the list.
Channel.folders.orderBy ● FolderOrder input common
The field and direction by which to order the results.
Channel.id ● ID! non-null scalar common
Channel.name ● String! non-null scalar common
The name of the channel.
Channel.permittedAgents ● AgentConnection! non-null object common
The agents permitted to access this channel.
Channel.permittedAgents.after●Stringscalar commonReturns the elements in the list that come after the specified cursor.
Channel.permittedAgents.agentIds ● [ID!] list scalar common
Agents that needs to be included
Channel.permittedAgents.before ● String scalar common
Returns the elements in the list that come before the specified cursor.
Channel.permittedAgents.first ● Int scalar common
Returns the first n elements from the list.
Channel.permittedAgents.last ● Int scalar common
Returns the last n elements from the list.
Channel.pinnedSearches ● PinnedSearchConnection object common
Lists all folders that are accessible to the authenticated agent. Each folder can be associated with one or more mailboxes.
Channel.pinnedSearches.after●Stringscalar commonReturns the elements in the list that come after the specified cursor.
Channel.pinnedSearches.before ● String scalar common
Returns the elements in the list that come before the specified cursor.
Channel.pinnedSearches.filter ● PinnedSearchFilter input common
The fields by which to filter the results.
Channel.pinnedSearches.first ● Int scalar common
Returns the first n elements from the list.
Channel.pinnedSearches.last ● Int scalar common
Returns the last n elements from the list.
Channel.pinnedSearches.orderBy ● PinnedSearchOrder input common
The field and direction by which to order the results.
Channel.restriction ● Restriction! non-null object common
The agents or teams that are allowed to access this channel.
Channel.senderName ● String scalar common
Customers see this name in the From field when they view conversations sent from this channel.
Channel.state ● ChannelState! non-null enum common
The state of the channel.
Channel.tags ● TagConnection object common
Lists all tags.
Channel.tags.after●Stringscalar commonReturns the elements in the list that come after the specified cursor.
Channel.tags.before ● String scalar common
Returns the elements in the list that come before the specified cursor.
Channel.tags.filter ● TagFilter input common
The fields by which to filter the results.
Channel.tags.first ● Int scalar common
Returns the first n elements from the list.
Channel.tags.last ● Int scalar common
Returns the last n elements from the list.
Channel.tags.orderBy ● TagOrder input common
The field and direction by which to order the results.
Channel.type ● ChannelType! non-null enum common
The communication type of the channel.
Channel.updatedAt ● DateTime! non-null scalar common
The date and time that the object was last updated.
Member of
ChannelChanged object ● ChannelConnection object ● ChannelEdge object ● ChannelIntegration object ● Conversation interface ● DisconnectMutationPayload object ● EmailConversation object ● EmailMessage object ● FacebookConversation object ● FacebookMessage object ● Folder object ● ForwardedMessage object ● Message interface ● Note object ● Reply object ● SummaryMessage object ● TwitterConversation object ● TwitterMessage object ● WidgetConversation object ● WidgetMessage object
Implemented by
DemoEmailChannel object ● EmailChannel object