Skip to main content

Recipient

An object that can receive email replies.

union Recipient = Agent | Contact

Possible types

Agent object common

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
}
}
}

Contact object common

A contact contains the personal information associated with someone you have interacted with using Groove.

They are identified by some unique contact detail such as an email address, a Twitter handle, or a phone number. This depends on how the contact was created.

A contact is often a customer who initated a conversation. It could also be someone who was copied in on a conversation (also called a 'collaborator'). In either case, we do not store this 'role' on the contact—rather, that role is defined by their participation with a particular conversation. This means the same contact could be the customer on one conversation, and a collaborator on another.

Member of

RecipientConnection object ● RecipientEdge object