Skip to main content

Folder

A folder contains a set of conditions that allow for smart filtering of conversations.

For example, to show only your active conversations, you can create a folder called "Mine" which contains these two conditions:

  1. "Assigned agent" is "Current User".
  2. "Status" is "Opened".

By default, folders apply to, and are visible across, all of your channels. However, you can configure them to be only visible to selected channels, agents, or teams.

To fetch all folders and their conditions:

query Folders {
folders {
nodes {
agents {
nodes {
id
email
}
pageInfo {
hasNextPage
}
}
conditions(
orderBy: { field: CREATED_AT, direction: DESC }
) {
nodes {
id
param
operator
value
}
pageInfo {
hasNextPage
}
}
conversationCount
createdAt
default
description
displayCountWhenInactive
hideIfZeroConversations
id
locked
matchType
name
position
state
teams {
nodes {
id
name
}
pageInfo {
hasNextPage
}
}
updatedAt
}
}
}

To find associated conversations in a folder, use the QueryRoot conversations with a filter argument:

conversations(filter: { folderId: "fol_1234567" }) { ...

By default folders are sorted by their user-defined row order. To sort by name instead:

query Folders {
folders( orderBy: { field: NAME, direction: ASC } ) {
nodes {
id
}
}
}

To find conversations in a folder for a specific channel:

query Folders {
folders {
nodes {
id
conversations ( channel: "ch_12345678" ) {
nodes {
... on Conversation {
id
number
}
}
pageInfo {
hasNextPage
}
}
}
}
}
type Folder implements Node, Timestamped {
agents(
after: String
before: String
filter: AgentFilter
first: Int
last: Int
orderBy: AgentOrder
): AgentConnection
channel: Channel!
channelRestriction: ChannelRestrictionType!
channels(
after: String
before: String
filter: ChannelFilter
first: Int
last: Int
orderBy: ChannelOrder
): ChannelConnection!
conditions(
after: String
before: String
first: Int
id: ID
last: Int
orderBy: ConditionOrder
): ConditionConnection
conversationCount: Int!
createdAt: DateTime!
default: Boolean!
description: String
displayCountWhenInactive: Boolean!
hideIfZeroConversations: Boolean!
id: ID!
locked: Boolean!
matchType: FolderMatchTypes!
name: String!
position: Int!
restriction: Restriction!
state: FolderState!
teams(
after: String
before: String
first: Int
last: Int
orderBy: TeamOrder
): TeamConnection
type: FolderType!
updatedAt: DateTime!
}

Fields​

Folder.agents ● AgentConnection object common​

Lists the agents that can see the folder. An empty lists implies only certain teams have visibility (see the teams field).

Folder.agents.after ● String scalar common​

Returns the elements in the list that come after the specified cursor.

Folder.agents.before ● String scalar common​

Returns the elements in the list that come before the specified cursor.

Folder.agents.filter ● AgentFilter input common​

The fields by which to filter the results.

Folder.agents.first ● Int scalar common​

Returns the first n elements from the list.

Folder.agents.last ● Int scalar common​

Returns the last n elements from the list.

Folder.agents.orderBy ● AgentOrder input common​

The field and direction by which to order the results.

Folder.channel ● Channel! non-null interface common​

The channel that this folder is in (in the current context).

Folder.channelRestriction ● ChannelRestrictionType! non-null enum common​

The currently applied channel restrictions.

Folder.channels ● ChannelConnection! non-null object common​

Lists all channels.

Folder.channels.after ● String scalar common​

Returns the elements in the list that come after the specified cursor.

Folder.channels.before ● String scalar common​

Returns the elements in the list that come before the specified cursor.

Folder.channels.filter ● ChannelFilter input common​

The fields by which to filter the results.

Folder.channels.first ● Int scalar common​

Returns the first n elements from the list.

Folder.channels.last ● Int scalar common​

Returns the last n elements from the list.

Folder.channels.orderBy ● ChannelOrder input common​

The field and direction by which to order the results.

Folder.conditions ● ConditionConnection object common​

Lists the conditions that the folder uses to filter conversations.

Folder.conditions.after ● String scalar common​

Returns the elements in the list that come after the specified cursor.

Folder.conditions.before ● String scalar common​

Returns the elements in the list that come before the specified cursor.

Folder.conditions.first ● Int scalar common​

Returns the first n elements from the list.

Folder.conditions.id ● ID scalar common​

The ID of the specific condition to get.

Folder.conditions.last ● Int scalar common​

Returns the last n elements from the list.

Folder.conditions.orderBy ● ConditionOrder input common​

The field and direction by which to order the results.

Folder.conversationCount ● Int! non-null scalar common​

The number of conversations that are in this folder (in the current context)

Folder.createdAt ● DateTime! non-null scalar common​

The date and time that the object was created.

Folder.default ● Boolean! non-null scalar common​

True if the folder is automatically created by Groove; false otherwise.

Folder.description ● String scalar common​

A description of the folder.

Folder.displayCountWhenInactive ● Boolean! non-null scalar common​

True if counts in the side navigation are visible when the folder is inactive; false otherwise.

Folder.hideIfZeroConversations ● Boolean! non-null scalar common​

True if folder in the side navigation is hidden when there is zero conversations; false otherwise.

Folder.id ● ID! non-null scalar common​

Folder.locked ● Boolean! non-null scalar common​

True if the folder is protected; false otherwise.

Folder.matchType ● FolderMatchTypes! non-null enum common​

The match type of the folder conditions.

Folder.name ● String! non-null scalar common​

The name of the folder.

Folder.position ● Int! non-null scalar common​

The position that the folder should appear in when listed.

Folder.restriction ● Restriction! non-null object common​

The agents or teams that are allowed to access this folder.

Folder.state ● FolderState! non-null enum common​

The state of the folder.

Folder.teams ● TeamConnection object common​

Lists the teams that can see the folder. An empty lists implies only certain agents have visibility (see the agents field).

Folder.teams.after ● String scalar common​

Returns the elements in the list that come after the specified cursor.

Folder.teams.before ● String scalar common​

Returns the elements in the list that come before the specified cursor.

Folder.teams.first ● Int scalar common​

Returns the first n elements from the list.

Folder.teams.last ● Int scalar common​

Returns the last n elements from the list.

Folder.teams.orderBy ● TeamOrder input common​

The field and direction by which to order the results.

Folder.type ● FolderType! non-null enum common​

The type of the folder

Folder.updatedAt ● DateTime! non-null scalar common​

The date and time that the object was last updated.

Interfaces​

Node interface common​

An object with an ID.

Timestamped interface common​

An object with timestamp fields for when it was created and last updated.

Member of​

FolderConnection object ● FolderCreatePayload object ● FolderEdge object ● FolderUpdatePayload object