Teams

Teams and store configuration.

Queries

appointmentEventUserConflicts

For each user, returns the existing events that would conflict if they were assigned an appointment in the given window. Reads from the Postgres source-of-truth so callers always see post-mutation freshness. Time-off conflicts are normalized to blocked.

Arguments

  • endTime (DateTime!) — Exclusive end of the conflict window
  • excludeAppointmentEventId (ID) — An appointment event to omit from consideration, e.g. the appointment currently being edited
  • startTime (DateTime!) — Inclusive start of the conflict window
  • userIds ([ID!]!) — The users whose schedules should be checked

Returns: [AppointmentEventUserConflict!]! — A scheduling conflict a user would have if assigned an appointment in the given window

searchTeams

🚧

Deprecated: Use Query.teams instead

Lists Teams

Arguments

  • accessibleToUserId (ID) — The User ID to filter results by access
  • after (String) — A cursor to search after (only include first & after or last & before)
  • before (String) — A cursor to search before (only include first & after or last & before)
  • byStatus (TeamStatusFilter) — The status of the Team to filter results by
  • first (Int) — The number of results to fetch when searching forward (only include first & after or last & before)
  • last (Int) — The number of results to fetch when searching backward (only include first & after or last & before)
  • search (String) — A search query to filter results
  • sortBy (SortTeamsBy) — The sort key
  • sortDir (SortDirection) — The sort direction
  • teamMemberIds ([ID!]) — The User IDs to filter results by membership

Returns: TeamConnection! — A connection to a list of items.

searchUserProfiles

Searches UserProfiles

Arguments

  • after (String) — A cursor to search after (only include first & after or last & before)
  • before (String) — A cursor to search before (only include first & after or last & before)
  • filters ([SearchFilterInput!]) — A set of filters to apply
  • first (Int) — The number of results to fetch when searching forward (only include first & after or last & before)
  • last (Int) — The number of results to fetch when searching backward (only include first & after or last & before)
  • search (String) — A search query to filter results
  • sortBy (SortUserProfilesBy) — The sort key
  • sortDir (SortDirection) — The sort direction

Returns: UserProfileConnection! — A connection to a list of items.

searchUsers

🚧

Deprecated: Use Query.users instead

Lists Users

Arguments

  • after (String) — A cursor to search after (only include first & after or last & before)
  • before (String) — A cursor to search before (only include first & after or last & before)
  • byAvailability (UserAvailabilityFilter) — The availability to filter results
  • byStatus (UserStatusFilter) — The status to filters results
  • first (Int) — The number of results to fetch when searching forward (only include first & after or last & before)
  • hasProfilePicture (Boolean) — Whether to include only users with profile pictures
  • last (Int) — The number of results to fetch when searching backward (only include first & after or last & before)
  • memberOfTeamIds ([ID!]) — A Team ID to filter results by
  • search (String) — A search query to filter results
  • sortBy (SortUsersBy) — The sort key
  • sortDir (SortDirection) — The sort direction
  • type (UserType) — The type to filters results

Returns: UserConnection! — A connection to a list of items.

team

A single Team by ID

Arguments

  • id (ID!) — The unique identifier of the Team

Returns: Team — A physical store or virtual team.

teamMembersByIds

A list of TeamMembers by Team IDs and/or User IDs

Arguments

  • teamIds ([ID!]) — The IDs of the Teams
  • userIds ([ID!]) — The IDs of the Users

Returns: [TeamMember!]! — A member of a Team

teams

Lists Teams

Arguments

  • accessibleToUserId (ID) — The User ID to filter results by access
  • after (String) — A cursor to search after (only include first & after or last & before)
  • before (String) — A cursor to search before (only include first & after or last & before)
  • byStatus (TeamStatusFilter) — The status of the Team to filter results by
  • first (Int) — The number of results to fetch when searching forward (only include first & after or last & before)
  • last (Int) — The number of results to fetch when searching backward (only include first & after or last & before)
  • search (String) — A search query to filter results
  • sortBy (SortTeamsBy) — The sort key
  • sortDir (SortDirection) — The sort direction
  • teamMemberIds ([ID!]) — The User IDs to filter results by membership

Returns: TeamConnection! — A connection to a list of items.

teamsByIds

A list of Teams by IDs

Arguments

  • ids ([ID!]!) — The IDs of the Teams

Returns: [Team]! — A physical store or virtual team.

teamsByIntegratedLocationId

A single Team by the ID of its associated IntegratedLocation

Arguments

  • integratedLocationId (ID!) — The ID of the IntegratedLocation
  • type (TeamLocationType!) — The type of the TeamLocation

Returns: [Team!]! — A physical store or virtual team.

user

A single User by ID or username

Arguments

  • id (ID) — The unique identifier of the User
  • username (String) — The username of the User

Returns: User — A person or bot that can access Endear

userByConnectedUserProfile

A single User by the ID of its connected UserProfile

Arguments

  • userProfileId (ID!)

Returns: User — A person or bot that can access Endear

users

Lists Users

Arguments

  • after (String) — A cursor to search after (only include first & after or last & before)
  • before (String) — A cursor to search before (only include first & after or last & before)
  • byAvailability (UserAvailabilityFilter) — The availability to filter results
  • byStatus (UserStatusFilter) — The status to filters results
  • first (Int) — The number of results to fetch when searching forward (only include first & after or last & before)
  • hasProfilePicture (Boolean) — Whether to include only users with profile pictures
  • last (Int) — The number of results to fetch when searching backward (only include first & after or last & before)
  • memberOfTeamIds ([ID!]) — A Team ID to filter results by
  • search (String) — A search query to filter results
  • sortBy (SortUsersBy) — The sort key
  • sortDir (SortDirection) — The sort direction
  • type (UserType) — The type to filters results

Returns: UserConnection! — A connection to a list of items.

usersByIds

A list of Users by IDs

Arguments

  • ids ([ID!]!) — The IDs of the Users

Returns: [User]! — A person or bot that can access Endear

Mutations

assignUsersToCustomer

Assigns Users to a Customer

Arguments

  • assigneeIds ([ID!]!) — The IDs of the Users to assign to the Customer
  • assignerId (ID) — The ID of the User who is assigning the Users
  • id (ID!) — The ID the Customer
  • notifyAssignees (Boolean) — Whether to notify the assignees
  • skipIfCustomerAlreadyAssigned (Boolean) — Whether to skip assigning Users if they the Customer is already assigned

Returns: AssignUsersToCustomerPayload!

assignUsersToTask

Assigns Users to a Task

Arguments

  • assigneeIds ([ID!]!) — The IDs of the Users to assign to the Task
  • assignerId (ID!) — The ID of the User who is assigning the Users
  • id (ID!) — The ID the Task
  • notifyAssignees (Boolean) — Whether to notify the Users that they have been assigned

Returns: AssignUsersToTaskPayload!

bulkUpsertExternalUsers

Upserts one or more ExternalUsers by ID

Arguments

Returns: OperationStatus!

connectUserProfilesToUser

Associate a list of UserProfiles to a User

Arguments

  • editorId (ID!) — The ID of the User who is making the request
  • id (ID!) — The unique identifier of the User
  • userProfileIds ([ID!]!) — The unique identifiers of the UserProfiles to associate to the User

Returns: ConnectUserProfilesToUserPayload!

unassignUsersFromCustomer

Unassigns Users from a Customer

Arguments

  • assigneeIds ([ID!]!) — The IDs of the Users to unassign from the Customer
  • assignerId (ID!) — The ID of the User who is unassigning the Users
  • id (ID!) — The ID the Customer

Returns: UnassignUsersFromCustomerPayload!

unassignUsersFromTask

Unassigns Users from a Task

Arguments

  • assigneeIds ([ID!]!) — The IDs of the Users to unassign from the Task
  • assignerId (ID!) — The ID of the User who is unassigning the Users
  • id (ID!) — The ID the Task

Returns: UnassignUsersFromTaskPayload!

updateUserStatus

Update the status of a User

Arguments

  • editorId (ID!) — The ID of the User performing the update
  • id (ID!) — The unique identifier of the User
  • status (UserStatus!) — The new status of the User

Returns: UpdateUserStatusPayload!

updateUserV2

Updates a User

Arguments

  • editorId (ID!) — The ID of the User updating the User
  • firstName (String) — The User's first or given name
  • id (ID!) — The unique identifier of the User
  • lastName (String) — The User's last or family name
  • profilePictureUrl (URL) — The User's profile picture
  • username (String) — The User's username

Returns: UpdateUserV2Payload!

Objects

AppointmentEventUserConflict

A scheduling conflict a user would have if assigned an appointment in the given window

Fields

AssignUsersToCustomerError

Fields

AssignUsersToCustomerFailure

Fields

AssignUsersToCustomerSuccess

Fields

AssignUsersToTaskError

Fields

AssignUsersToTaskFailure

Fields

AssignUsersToTaskSuccess

Fields

ConnectUserProfilesToUserError

Fields

ConnectUserProfilesToUserFailure

Fields

ConnectUserProfilesToUserSuccess

Fields

Team

A physical store or virtual team.

Fields

  • address (String!) — The associated address for the Team
  • attribution_excluded_at (DateTime) — The date the Team was excluded from message attribution
  • created_at (DateTime!) — The date the Team was created
  • currency (String) — The currency used by the Team — 🚧 Deprecated: Use display_currency instead
  • deleted_at (DateTime) — When the Team was deleted
  • display_currency (Currency) — The display currency used by the Team
  • has_access (Boolean!) — Whether the provided User ID has access to the Team
  • id (ID!) — The unique identifier of the Team
  • is_member (Boolean!) — Whether the provided User ID is a member of the Team
  • members (UserConnection!) — The Users that are assigned to the Team
  • name (String!) — The user-facing name of the Team
  • status (TeamStatus!) — The status of the Team
  • type (TeamType) — The type of team
  • updated_at (DateTime!) — The date the Team was last updated

TeamConnection

A connection to a list of items.

Fields

  • edges ([TeamEdge]) — A list of edges.
  • pageInfo (PageInfo!) — Information to aid in pagination.

TeamEdge

An edge in a connection.

Fields

  • cursor (String!) — A cursor for use in pagination
  • node (Team) — The item at the end of the edge

TeamMember

A member of a Team

Fields

  • team (Team) — The Team that the TeamMember is associated with
  • user (User) — The User that the TeamMember is associated with

UnassignUsersFromCustomerError

Fields

UnassignUsersFromCustomerFailure

Fields

UnassignUsersFromCustomerSuccess

Fields

UnassignUsersFromTaskError

Fields

UnassignUsersFromTaskFailure

Fields

UnassignUsersFromTaskSuccess

Fields

UpdateUserStatusError

Fields

UpdateUserStatusFailure

Fields

UpdateUserStatusSuccess

Fields

UpdateUserV2Error

Fields

UpdateUserV2Failure

Fields

UpdateUserV2Success

Fields

User

A person or bot that can access Endear

Fields

  • attribution_excluded_at (DateTime) — The date the User was excluded from attribution
  • connected_user_profiles ([UserProfile!]!) — The UserProfiles that the User is connected to
  • created_at (DateTime!) — The date the User was created
  • display_name (String!) — The display name of the User
  • email_address (EmailAddress) — The email address of the User
  • first_name (String) — The first name of the User
  • full_name (String) — The full name of the User
  • handle (String) — The identifying handle of the User
  • has_name (Boolean!) — Whether the User has a name
  • id (ID!) — The unique identifier of the User
  • initials (String!) — The initials of the UserAccount
  • is_available (Boolean!) — Whether the User is available
  • is_member (Boolean!) — Whether the User is a member of the provided Team ID
  • last_name (String) — The last name of the User
  • last_sign_in_at (DateTime) — The date the User last signed in
  • limits (UserLimits!) — The UserLimits for this User
  • most_recently_signed_into_team (Team) — The Team that the User most recently signed into
  • phone_number (PhoneNumber) — The phone number of the User
  • profile_picture_url (URL) — The URL to an image of the profile picture for a User
  • status (UserStatus!) — The status of the User
  • teams (TeamConnection!) — The Teams that the User is assigned to
  • type (UserType!) — The type of the User
  • updated_at (DateTime!) — The date the User was last updated
  • username (String) — The username of the User

UserConnection

A connection to a list of items.

Fields

  • edges ([UserEdge]) — A list of edges.
  • pageInfo (PageInfo!) — Information to aid in pagination.

UserEdge

An edge in a connection.

Fields

  • cursor (String!) — A cursor for use in pagination
  • node (User) — The item at the end of the edge

UserLimits

Fields

  • limit_sms_drafts_by (LimitSmsDraftsBy!) — The unit of measure for SMS drafts
  • max_email_recipients_per_draft (NonNegativeInt!) — The maximum number of email recipients per draft
  • max_sms_characters_per_draft (NonNegativeInt!) — The maximum number of characters per SMS draft
  • max_sms_recipients_per_draft (NonNegativeInt!) — The maximum number of SMS recipients per draft
  • max_sms_segments_per_draft (NonNegativeInt!) — The maximum number of segments per SMS draft
  • type (UserType!) — The type of user

UserProfile

A person or bot that can access Endear

Fields

  • created_at (DateTime!) — The date the UserProfile was created
  • deleted_at (DateTime) — The date the UserProfile was deleted
  • display_name (String!) — The display name of the UserProfile
  • email_address (String) — The email address of the UserProfile
  • external_id (ID!) — The unique identifier of the UserProfile
  • id (ID!) — The unique identifier of the UserProfile
  • integration (Integration!) — The integration that the UserProfile belongs to
  • phone_number (String) — The phone number of the UserProfile
  • updated_at (DateTime!) — The date the UserProfile was last updated
  • user (User) — The User that the UserProfile belongs to

UserProfileConnection

A connection to a list of items.

Fields

UserProfileEdge

An edge in a connection.

Fields

  • cursor (String!) — A cursor for use in pagination
  • node (UserProfile) — The item at the end of the edge

Unions

AssignUsersToCustomerPayload

Possible types

AssignUsersToTaskPayload

Possible types

ConnectUserProfilesToUserPayload

Possible types

UnassignUsersFromCustomerPayload

Possible types

UnassignUsersFromTaskPayload

Possible types

UpdateUserStatusPayload

Possible types

UpdateUserV2Payload

Possible types

Input Objects

ExternalUserInput

An ExternalUser to be added/updated

Fields

  • created_at (DateTime) — The date the ExternalUser was created
  • deleted_at (DateTime) — The date the ExternalUser was deleted
  • email_address (EmailAddress) — The email address of the ExternalUser
  • first_name (String) — The first name of the ExternalUser
  • id (ID!) — The unique identifier of the ExternalUser
  • last_name (String) — The last name of the ExternalUser
  • phone_number (PhoneNumber) — The phone number of the ExternalUser
  • updated_at (DateTime) — The date the ExternalUser was last updated

Enums

AssignUsersToCustomerErrorCode

Values

  • ASSIGNEES_NOT_FOUND — One or more assignees were not found
  • ASSIGNER_NOT_FOUND — The assigner was not found
  • CONCURRENCY_ERROR — The customer has been updated since this request was initiated
  • CUSTOMER_ALREADY_ASSIGNED — The customer is already assigned
  • CUSTOMER_DELETED — The customer is deleted
  • CUSTOMER_NOT_FOUND — The customer was not found
  • MUST_PROVIDE_AT_LEAST_ONE_ASSIGNEE — At least one assignee must be provided

AssignUsersToTaskErrorCode

Values

  • ASSIGNEES_NOT_FOUND — One or more assignees were not found
  • ASSIGNER_NOT_FOUND — The assigner was not found
  • CANNOT_ASSIGN_TO_DELETED_TASK — Cannot assign users to a deleted task
  • FORBIDDEN — You do not have permission to perform this action
  • MUST_PROVIDE_AT_LEAST_ONE_ASSIGNEE — At least one assignee must be provided
  • TASK_LINKED_TO_V2_CANNOT_BE_MODIFIED — This task is linked to a TaskV2 and cannot be modified directly
  • TASK_NOT_FOUND — The task was not found

ConnectUserProfilesToUserErrorCode

Values

  • EDITOR_NOT_FOUND — The editor was not found
  • FORBIDDEN — You do not have permission to perform this action
  • MUST_PROVIDE_AT_LEAST_ONE_USER_PROFILE — You must provide at least one user profile
  • USER_NOT_FOUND — The user was not found
  • USER_PROFILE_NOT_FOUND — The user profile was not found

SortTeamsBy

The available keys to sort Teams

Values

  • CREATED_AT
  • NAME
  • UPDATED_AT

SortUserProfilesBy

The available keys to sort UserProfiles

Values

  • CREATED_AT
  • DISPLAY_NAME
  • UPDATED_AT

SortUsersBy

The available keys to sort Users

Values

  • CREATED_AT
  • LAST_SIGN_IN_AT
  • UPDATED_AT

TeamLocationType

The type of the TeamLocation

Values

  • ECOMM
  • POS

TeamStatus

The status of the Team

Values

  • ACTIVE
  • DELETED

TeamStatusFilter

The status of the Team to filter results by

Values

  • ACTIVE
  • ALL
  • DELETED

TeamType

The type of team

Values

  • CONCESSIONS
  • DIGITAL
  • PHYSICAL_LOCATION
  • WHOLESALE

UnassignUsersFromCustomerErrorCode

Values

  • ASSIGNEES_NOT_FOUND — One or more assignees were not found
  • ASSIGNER_NOT_FOUND — The assigner was not found
  • CONCURRENCY_ERROR — The customer has been updated since this request was initiated
  • CUSTOMER_DELETED — The customer is deleted
  • CUSTOMER_NOT_FOUND — The customer was not found
  • MUST_PROVIDE_AT_LEAST_ONE_ASSIGNEE — At least one assignee must be provided

UnassignUsersFromTaskErrorCode

Values

  • ASSIGNEES_NOT_FOUND — One or more assignees were not found
  • ASSIGNER_NOT_FOUND — The assigner was not found
  • CANNOT_UNASSIGN_FROM_DELETED_TASK — Cannot unassign users from a deleted task
  • FORBIDDEN — You do not have permission to perform this action
  • MUST_PROVIDE_AT_LEAST_ONE_ASSIGNEE — At least one assignee must be provided
  • TASK_LINKED_TO_V2_CANNOT_BE_MODIFIED — This task is linked to a TaskV2 and cannot be modified directly
  • TASK_NOT_FOUND — The task was not found

UpdateUserStatusErrorCode

Values

  • CONCURRENCY_ERROR — The user has been updated since this request was initiated
  • FORBIDDEN — You do not have permission to perform this action
  • USER_NOT_FOUND — The user was not found

UpdateUserV2ErrorCode

Values

  • CONTACT_METHOD_NOT_FOUND — The contact method was not found
  • EDITOR_NOT_FOUND — The editor was not found
  • FIRST_NAME_TOO_LONG — The first name is too long
  • FIRST_NAME_TOO_SHORT — The first name cannot be empty
  • INVALID_FIRST_NAME — The first name is invalid
  • INVALID_LAST_NAME — The last name is invalid
  • LAST_NAME_TOO_LONG — The last name is too long
  • LAST_NAME_TOO_SHORT — The last name cannot be empty
  • USERNAME_ALREADY_EXISTS — There is already an account with this username
  • USERNAME_INVALID — This username is invalid
  • USER_NOT_FOUND — The user was not found

UserAvailabilityFilter

The availability of the User to filter results by

Values

  • ALL
  • AVAILABLE
  • UNAVAILABLE

UserStatus

The status of the User

Values

  • ACTIVE
  • DISABLED

UserStatusFilter

The status of the User to filter results by

Values

  • ACTIVE
  • ALL
  • DISABLED

UserType

The type of the User

Values

  • ADMIN
  • MANAGER
  • USER