Skip to main content

Agent

An agent is a user on Groove that is part of an organization.

To find all active agents, along with the teams they belong to, ordered by name:

query Agents {
agents {
edges {
node {
account {
id
subdomain
}
avatarUrl
createdAt
email
id
name
role
state
subdomain
preferences {
edges {
node {
key
value
}
}
}
teams {
edges {
node {
id
name
}
}
pageInfo {
hasNextPage
}
}
oauthCredentials {
edges {
node {
uid
provider
accessToken
refreshToken
expiresAt
createdAt
updatedAt
}
}
}
username
updatedAt
twoFactorAuthCode {
uri
code
}
}
}
}
}

To query for invited agents:

query Agents {
agents(filter: {state: INVITED}){
edges {
node {
id
name
}
}
}
}

To reverse order the search:

query Agents {
agents( orderBy: { field: NAME, direction: DESC } ) {
edges {
node {
id
name
}
}
}
}

To fetch agents ordered by the most times you assigned them to a conversation:

query Agents {
agents( orderBy: { field: ASSIGNMENT_COUNT, direction: DESC } ) {
nodes {
id
name
}
}
}

To fetch a single agent:

query Node {
node(id: $agentId) {
... on Agent {
id
name
}
}
}
type Agent implements Node, Timestamped {
account: Account!
assignmentCount: Int!
avatarUrl: Url!
conversationCount: Int!
createdAt: DateTime!
defaultNotificationPreferences: [AgentNotificationPreference!]!
email: String!
firstName: String
helplyCopilotAuthGrant: String
helplyIdentifyToken: String
id: ID!
lastName: String
name: String!
notificationPreferences(
after: String
before: String
first: Int
last: Int
): AgentNotificationPreferenceConnection
oauthCredentials(
after: String
before: String
first: Int
last: Int
): OauthCredentialsConnection
preferences(
after: String
before: String
first: Int
last: Int
): AgentPreferenceConnection!
role: AgentRole!
state: AgentState!
status2fa: AgentTwoFactorAuthStatus!
subdomain: String!
teams(
after: String
before: String
filter: TeamFilter
first: Int
last: Int
orderBy: TeamOrder
): TeamConnection
twoFactorAuthCode: TwoFactorAuthCode
updatedAt: DateTime!
username: String
}

Fields​

Agent.account ● Account! non-null object common​

The account the agent belongs to.

Agent.assignmentCount ● Int! non-null scalar common​

The total number of conversations that the agent is assigned to.

Agent.avatarUrl ● Url! non-null scalar common​

A URL pointing to the agent's avatar.

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

The number of conversations that the agent is assigned.

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

The date and time that the object was created.

Agent.defaultNotificationPreferences ● [AgentNotificationPreference!]! non-null object common​

Default agent notification preferences.

Agent.email ● String! non-null scalar common​

The agent's email address.

Agent.firstName ● String scalar common​

The agent's first name.

Agent.helplyCopilotAuthGrant ● String scalar common​

Short-lived JWT for Helply copilot iframe SSO. Only returned for the authenticated agent when the account is entitled and linked to Helply.

Agent.helplyIdentifyToken ● String scalar common​

The agent token for helply.

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

Agent.lastName ● String scalar common​

The agent's last name.

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

The agent's full name.

Agent.notificationPreferences ● AgentNotificationPreferenceConnection object common​

List of agent notification preferences.

Agent.notificationPreferences.after ● String scalar common​

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

Agent.notificationPreferences.before ● String scalar common​

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

Agent.notificationPreferences.first ● Int scalar common​

Returns the first n elements from the list.

Agent.notificationPreferences.last ● Int scalar common​

Returns the last n elements from the list.

Agent.oauthCredentials ● OauthCredentialsConnection object common​

Lists all oauth credentials linked to agent

Agent.oauthCredentials.after ● String scalar common​

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

Agent.oauthCredentials.before ● String scalar common​

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

Agent.oauthCredentials.first ● Int scalar common​

Returns the first n elements from the list.

Agent.oauthCredentials.last ● Int scalar common​

Returns the last n elements from the list.

Agent.preferences ● AgentPreferenceConnection! non-null object common​

Lists all agent preferences.

Agent.preferences.after ● String scalar common​

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

Agent.preferences.before ● String scalar common​

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

Agent.preferences.first ● Int scalar common​

Returns the first n elements from the list.

Agent.preferences.last ● Int scalar common​

Returns the last n elements from the list.

Agent.role ● AgentRole! non-null enum common​

The role of the agent.

Agent.state ● AgentState! non-null enum common​

The state of the agent.

Agent.status2fa ● AgentTwoFactorAuthStatus! non-null enum common​

The agent's 2FA status.

Agent.subdomain ● String! non-null scalar common​

The subdomain of the agent's account.

Agent.teams ● TeamConnection object common​

Lists all teams in the organization.

Agent.teams.after ● String scalar common​

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

Agent.teams.before ● String scalar common​

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

Agent.teams.filter ● TeamFilter input common​

The fields by which to filter the results.

Agent.teams.first ● Int scalar common​

Returns the first n elements from the list.

Agent.teams.last ● Int scalar common​

Returns the last n elements from the list.

Agent.teams.orderBy ● TeamOrder input common​

The field and direction by which to order the results.

Agent.twoFactorAuthCode ● TwoFactorAuthCode object common​

Two factor auth code data.

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

The date and time that the object was last updated.

Agent.username ● String scalar common​

The agent's username.

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.

Returned by​

me query

Member of​

AgentChanged object ● AgentConnection object ● AgentEdge object ● AgentNotificationPreference object ● AgentPreference object ● AgentResetLoginAttemptsPayload object ● Article object ● Assignment object ● Attachment object ● CannedReply object ● Company object ● Contact object ● ConversationAttachment object ● CustomField object ● Draft interface ● Export object ● FacebookDraft object ● FollowerAdded object ● FollowerRemoved object ● JiraServerIntegration object ● KbCategory object ● Mention object ● NoteDraft object ● PinnedSearch object ● Publishable interface ● Rating object ● ReplyDraft object ● Restriction object ● Rule object ● Snooze object ● Snoozed object ● StarredCannedReply object ● Tag object ● TwitterDraft object ● Unsnoozed object ● UserIntegration object

Implemented by​

Actor union ● Author union ● Recipient union