Surveys

Survey definitions, responses, reminders, and lifecycle.

Last updated

Queries

survey query

Retrieve survey data from the Viio GraphQL API.

survey(id: ID!): Survey

Returns: Survey

Arguments for survey

NameDescription
id (ID!)

surveys query

Retrieve surveys data from the Viio GraphQL API.

surveys(first: Int, after: String, last: Int, before: String, where: SurveyFilterInput, order: [SurveySortInput!]): SurveysConnection

Returns: SurveysConnection

Arguments for surveys

NameDescription
where (SurveyFilterInput)
order ([SurveySortInput!])
first (Int)Returns the first n elements from the list.
after (String)Returns elements after the specified cursor.
last (Int)Returns the last n elements from the list.
before (String)Returns elements before the specified cursor.

Mutations

createSurvey mutation

Run the createSurvey mutation through the Viio GraphQL API.

createSurvey(input: CreateSurveyInput!): CreateSurveyPayload!

Returns: CreateSurveyPayload!

Arguments for createSurvey

NameDescription
input (CreateSurveyInput!)

removeSurveys mutation

Run the removeSurveys mutation through the Viio GraphQL API.

removeSurveys(where: SurveyFilterInput): RemoveSurveysPayload!

Returns: RemoveSurveysPayload!

Arguments for removeSurveys

NameDescription
where (SurveyFilterInput)

sendSurveyReminder mutation

Run the sendSurveyReminder mutation through the Viio GraphQL API.

sendSurveyReminder(input: SendSurveyReminderInput!): SendSurveyReminderPayload!

Returns: SendSurveyReminderPayload!

Arguments for sendSurveyReminder

NameDescription
input (SendSurveyReminderInput!)

sendTestSurvey mutation

Run the sendTestSurvey mutation through the Viio GraphQL API.

sendTestSurvey(input: SendTestSurveyInput!): SendTestSurveyPayload!

Returns: SendTestSurveyPayload!

Arguments for sendTestSurvey

NameDescription
input (SendTestSurveyInput!)

Objects

CreateSurveyPayload object

Fields returned by the CreateSurveyPayload object type.

NameDescription
survey (CreatedSurvey)
errors ([CreateSurveyError!])

FailedToCreateSurveyError object

Fields returned by the FailedToCreateSurveyError object type.

NameDescription
message (String!)

FailedToRemoveSurveysError object

Fields returned by the FailedToRemoveSurveysError object type.

NameDescription
message (String!)

InProgressSurveyReminderStatus object

Fields returned by the InProgressSurveyReminderStatus object type.

NameDescription
initiatedAt (DateTime)

ProductSurveyScope object

Fields returned by the ProductSurveyScope object type.

NameDescription
productId (ID!)
vendorId (ID)
vendorName (String)
product (Product)
vendor (Vendor)

RemoveSurveysPayload object

Fields returned by the RemoveSurveysPayload object type.

NameDescription
removedCount (Int)
errors ([RemoveSurveyError!])

SendSurveyError object

Fields returned by the SendSurveyError object type.

NameDescription
message (String!)

SendSurveyReminderPayload object

Fields returned by the SendSurveyReminderPayload object type.

NameDescription
survey (CreatedSurvey)
errors ([SurveyReminderError!])

SendTestSurveyPayload object

Fields returned by the SendTestSurveyPayload object type.

NameDescription
ok (Boolean!)
errors ([SendTestSurveyError!])

SentSurveyReminderStatus object

Fields returned by the SentSurveyReminderStatus object type.

NameDescription
recipientsCount (Int!)

Survey object

Fields returned by the Survey object type.

NameDescription
id (ID!)
createdAt (DateTime!)
createdByUserId (ID!)
status (SurveyStatus!)
sentAt (DateTime)
channels ([SurveyChannel!]!)
title (String!)
context (SurveyContext!)
scope (SurveyScope!)
messages (SurveyMessages!)
recipientsSelection (SurveyRecipientsSelection!)
reminders ([SurveyReminder!]!)
questions ([SurveyQuestion!])
completion (SurveyCompletion!)
responses (SurveyResponsesConnection)
createdBy (User)

SurveyApplicationUserRecipientsSelection object

Which of the product's users the survey goes to.

NameDescription
applicationUserIds ([ID!])Only these application users.
groupIds ([ID!])Only application users in these employee groups.
dataSources ([DiscoverySourceName!])Only application users seen in these sources.

SurveyChannel object

Fields returned by the SurveyChannel object type.

NameDescription
type (SurveyChannelType!)

SurveyCompletion object

Fields returned by the SurveyCompletion object type.

NameDescription
recipients (Int!)
responses (Int!)
rate (Float!)

SurveyEmployeeRecipientsSelection object

Which employees the survey goes to.

NameDescription
employeeIds ([ID!])Only these employees.
groupIds ([ID!])Only employees in these groups.

SurveyMessages object

Fields returned by the SurveyMessages object type.

NameDescription
introduction (String!)

SurveyNotFoundError object

Fields returned by the SurveyNotFoundError object type.

NameDescription
message (String!)

SurveyRecipientsSelection object

Who the survey goes to.

NameDescription
employees (SurveyEmployeeRecipientsSelection)The employees included.
applicationUsers (SurveyApplicationUserRecipientsSelection)The application users included.
emails ([String!])The email addresses included.

SurveyReminder object

Fields returned by the SurveyReminder object type.

NameDescription
id (ID!)
type (SurveyReminderType!)
createdAt (DateTime!)
status (SurveyReminderStatus!)

SurveyReminderAlreadyInProgressError object

Fields returned by the SurveyReminderAlreadyInProgressError object type.

NameDescription
message (String!)

SurveyReminderNoRecipientsError object

Fields returned by the SurveyReminderNoRecipientsError object type.

NameDescription
message (String!)

SurveyResponse object

Fields returned by the SurveyResponse object type.

NameDescription
id (ID!)
recipient (SurveyResponseRecipient!)
createdAt (DateTime!)
completedAt (DateTime)
answers ([SurveyAnswer!]!)

SurveyResponseRecipient object

Fields returned by the SurveyResponseRecipient object type.

NameDescription
email (String!)
employeeId (ID)
firstName (String)
lastName (String)

SurveyResponsesConnection object

A connection to a list of items.

NameDescription
pageInfo (PageInfo!)Information to aid in pagination.
edges ([SurveyResponsesEdge!])A list of edges.
nodes ([SurveyResponse!])A flattened list of the nodes.
totalCount (Int!)Identifies the total count of items in the connection.

SurveyResponsesEdge object

An edge in a connection.

NameDescription
cursor (String!)A cursor for use in pagination.
node (SurveyResponse!)The item at the end of the edge.

SurveysConnection object

A connection to a list of items.

NameDescription
pageInfo (PageInfo!)Information to aid in pagination.
edges ([SurveysEdge!])A list of edges.
nodes ([Survey!])A flattened list of the nodes.
totalCount (Int!)Identifies the total count of items in the connection.

SurveysEdge object

An edge in a connection.

NameDescription
cursor (String!)A cursor for use in pagination.
node (Survey!)The item at the end of the edge.

VendorSurveyScope object

Fields returned by the VendorSurveyScope object type.

NameDescription
vendorId (ID!)
vendorName (String)
vendor (Vendor)

Input Types

ComparableEmployeeOperationFilterInput input

Matches any of the given IDs.

NameDescription
in ([ID!]!)The IDs to match.

ComparableUserOperationFilterInput input

Matches any of the given IDs.

NameDescription
in ([ID!]!)The IDs to match.

CreateSurveyDefinitionInput input

A survey to create.

NameDescription
title (String!)The survey's name.
context (SurveyContext!)Whether one response is collected per license or per person.
scope (SurveyScopeInput!)The product or vendor the survey is about.
channels ([SurveyChannelInput!]!)Where the survey is delivered.
messages (SurveyMessagesInput!)The texts recipients see.
questions ([SurveyQuestionInput!]!)The questions to ask, in order.
recipients (SurveyRecipientsInput!)Who receives the survey.

CreateSurveyInput input

What to create.

NameDescription
survey (CreateSurveyDefinitionInput)The survey to create.

DataSourceFilterInput input

Matches any of the given sources.

NameDescription
in ([DiscoverySourceName!]!)The sources to match.

ListComparableEmployeeOperationFilterInput input

Matches when at least one entry matches.

NameDescription
some (ComparableEmployeeOperationFilterInput!)The condition to match.

ListComparableUserOperationFilterInput input

Matches when at least one entry matches.

NameDescription
some (ComparableUserOperationFilterInput!)The condition to match.

SendSurveyReminderInput input

Input fields accepted by SendSurveyReminderInput.

NameDescription
surveyId (ID!)

SendTestRecipientEmailInput input

Input fields accepted by SendTestRecipientEmailInput.

NameDescription
email (String!)
firstName (String)
lastName (String)

SendTestRecipientInput input

Input fields accepted by SendTestRecipientInput.

NameDescription
slack (SendTestRecipientSlackInput)
email (SendTestRecipientEmailInput)
teams (SendTestRecipientTeamsInput)Sends the test survey to Microsoft Teams.

SendTestRecipientSlackInput input

Input fields accepted by SendTestRecipientSlackInput.

NameDescription
sourceId (String!)
tenant (String!)

SendTestRecipientTeamsInput input

Microsoft Teams recipient details for a test survey.

NameDescription
sourceId (String!)Microsoft Entra object ID of the recipient.
tenant (String!)Microsoft Entra tenant ID of the recipient.
firstName (String)First name displayed in the survey card greeting.

SendTestSurveyDefinitionInput input

Input fields accepted by SendTestSurveyDefinitionInput.

NameDescription
recipient (SendTestRecipientInput!)
title (String!)
context (SurveyContext!)
scope (SurveyScopeInput!)
messages (SurveyMessagesInput!)
questions ([SurveyQuestionInput!]!)

SendTestSurveyInput input

Input fields accepted by SendTestSurveyInput.

NameDescription
survey (SendTestSurveyDefinitionInput)

SurveyAnswerFilterInput input

Input fields accepted by SurveyAnswerFilterInput.

NameDescription
questionKey (String!)
yesNo (BooleanOperationFilterInput)
rating (IntOperationFilterInput)
text (StringOperationFilterInput)
selectedOption (StringOperationFilterInput)
otherText (StringOperationFilterInput)
answered (Boolean)

SurveyApplicationUsersInput input

Which of the product's users to pick.

NameDescription
id (ComparableUserOperationFilterInput)Only these application users.
groupIds (ListComparableUserOperationFilterInput)Only application users in these employee groups.
dataSource (DataSourceFilterInput)Only application users seen in these sources.

SurveyChannelInput input

Input fields accepted by SurveyChannelInput.

NameDescription
type (SurveyChannelType!)

SurveyConditionGroupInput input

Input fields accepted by SurveyConditionGroupInput.

SurveyConditionRuleInput input

Input fields accepted by SurveyConditionRuleInput.

SurveyEmployeesInput input

Which employees to pick.

NameDescription
id (ComparableEmployeeOperationFilterInput)Only these employees.
groupIds (ListComparableEmployeeOperationFilterInput)Only employees in these groups.

SurveyFilterInput input

Input fields accepted by SurveyFilterInput.

NameDescription
and ([SurveyFilterInput!])Matches when every one of the given filter expressions matches (logical AND).
or ([SurveyFilterInput!])Matches when at least one of the given filter expressions matches (logical OR).
id (ComparableIdTypeOperationFilterInput)
title (StringOperationFilterInput)
status (SurveyStatusOperationFilterInput)
createdAt (DateTimeOperationFilterInput)
productId (ComparableIdTypeOperationFilterInput)
vendorId (ComparableIdTypeOperationFilterInput)
vendorName (StringOperationFilterInput)

SurveyLongTextQuestionInput input

Input fields accepted by SurveyLongTextQuestionInput.

NameDescription
key (String!)
title (String!)
description (String)
required (Boolean!)
conditions (SurveyConditionGroupInput)

SurveyMessagesInput input

Input fields accepted by SurveyMessagesInput.

NameDescription
introduction (String!)

SurveyQuestionInput input

Input fields accepted by SurveyQuestionInput.

SurveyRadioGroupOptionConditionRuleInput input

Input fields accepted by SurveyRadioGroupOptionConditionRuleInput.

NameDescription
operator (SurveyRadioGroupConditionOperator!)
optionKey (String!)
questionKey (String!)

SurveyRadioGroupOptionInput input

Input fields accepted by SurveyRadioGroupOptionInput.

NameDescription
key (String!)
value (String!)

SurveyRadioGroupOtherConditionRuleInput input

Input fields accepted by SurveyRadioGroupOtherConditionRuleInput.

NameDescription
operator (SurveyRadioGroupConditionOperator!)
questionKey (String!)

SurveyRadioGroupQuestionInput input

Input fields accepted by SurveyRadioGroupQuestionInput.

NameDescription
options ([SurveyRadioGroupOptionInput!]!)
allowOther (Boolean!)
key (String!)
title (String!)
description (String)
required (Boolean!)
conditions (SurveyConditionGroupInput)

SurveyRatingBetweenConditionRuleInput input

Input fields accepted by SurveyRatingBetweenConditionRuleInput.

NameDescription
operator (SurveyRatingConditionOperator!)
from (Int!)
to (Int!)
questionKey (String!)

SurveyRatingQuestionInput input

Input fields accepted by SurveyRatingQuestionInput.

NameDescription
scale (Int!)
key (String!)
title (String!)
description (String)
required (Boolean!)
conditions (SurveyConditionGroupInput)

SurveyRatingValueConditionRuleInput input

Input fields accepted by SurveyRatingValueConditionRuleInput.

NameDescription
operator (SurveyRatingConditionOperator!)
value (Int!)
questionKey (String!)

SurveyRecipientsInput input

Who a survey goes to.

NameDescription
employees (SurveyEmployeesInput)Employees to include.
applicationUsers (SurveyApplicationUsersInput)People who use the survey's product.
emails ([String!])Email addresses to include, employee or not.

SurveyResponseFilterInput input

Input fields accepted by SurveyResponseFilterInput.

NameDescription
and ([SurveyResponseFilterInput!])Matches when every one of the given filter expressions matches (logical AND).
or ([SurveyResponseFilterInput!])Matches when at least one of the given filter expressions matches (logical OR).
recipient (SurveyResponseRecipientFilterInput)
completedAt (DateTimeOperationFilterInput)
createdAt (DateTimeOperationFilterInput)
answers ([SurveyAnswerFilterInput!])Filter responses by their answers. Entries combine as AND.

SurveyResponseRecipientFilterInput input

Input fields accepted by SurveyResponseRecipientFilterInput.

NameDescription
and ([SurveyResponseRecipientFilterInput!])Matches when every one of the given filter expressions matches (logical AND).
or ([SurveyResponseRecipientFilterInput!])Matches when at least one of the given filter expressions matches (logical OR).
email (StringOperationFilterInput)
firstName (StringOperationFilterInput)
lastName (StringOperationFilterInput)

SurveyResponseRecipientSortInput input

Input fields accepted by SurveyResponseRecipientSortInput.

NameDescription
email (SortEnumType)
firstName (SortEnumType)
lastName (SortEnumType)

SurveyResponseSortInput input

Input fields accepted by SurveyResponseSortInput.

NameDescription
recipient (SurveyResponseRecipientSortInput)
completedAt (SortEnumType)
createdAt (SortEnumType)

SurveyScopeInput input

Input fields accepted by SurveyScopeInput.

NameDescription
productId (ID)
vendorId (ID)

SurveyShortTextQuestionInput input

Input fields accepted by SurveyShortTextQuestionInput.

NameDescription
key (String!)
title (String!)
description (String)
required (Boolean!)
conditions (SurveyConditionGroupInput)

SurveySortInput input

Input fields accepted by SurveySortInput.

NameDescription
id (SortEnumType)
createdAt (SortEnumType)

SurveyStatusOperationFilterInput input

Input fields accepted by SurveyStatusOperationFilterInput.

NameDescription
eq (SurveyStatus)Matches when the field value is exactly equal to the given value.
neq (SurveyStatus)Matches when the field value is not equal to the given value.
in ([SurveyStatus!])Matches when the field value is one of the values in the given list.
nin ([SurveyStatus!])Matches when the field value is none of the values in the given list.

SurveyYesNoConditionRuleInput input

Input fields accepted by SurveyYesNoConditionRuleInput.

NameDescription
expectedValue (Boolean!)
questionKey (String!)

SurveyYesNoQuestionInput input

Input fields accepted by SurveyYesNoQuestionInput.

NameDescription
yesLabel (String!)
noLabel (String!)
key (String!)
title (String!)
description (String)
required (Boolean!)
conditions (SurveyConditionGroupInput)

Interfaces

SurveyAnswer interface

Fields defined by the SurveyAnswer interface.

NameDescription
questionKey (String!)
displayValue (String!)

SurveyQuestion interface

Fields defined by the SurveyQuestion interface.

NameDescription
key (String!)
title (String!)
description (String)
required (Boolean!)

Unions

CreatedSurvey union

Possible object types returned by the CreatedSurvey union.

Possible types: Survey

CreateSurveyError union

Possible object types returned by the CreateSurveyError union.

Possible types: FailedToCreateSurveyError

RemoveSurveyError union

Possible object types returned by the RemoveSurveyError union.

Possible types: FailedToRemoveSurveysError

SendTestSurveyError union

Possible object types returned by the SendTestSurveyError union.

Possible types: SendSurveyError

SurveyReminderError union

Possible object types returned by the SurveyReminderError union.

Possible types: SurveyNotFoundError, SurveyReminderAlreadyInProgressError, SurveyReminderNoRecipientsError

SurveyReminderStatus union

Possible object types returned by the SurveyReminderStatus union.

Possible types: SentSurveyReminderStatus, InProgressSurveyReminderStatus

SurveyScope union

Possible object types returned by the SurveyScope union.

Possible types: ProductSurveyScope, VendorSurveyScope

Enums

SurveyChannelType enum

Accepted values for the SurveyChannelType enum.

ValueDescription
SLACK
EMAIL
TEAMS

SurveyConditionGroupOperator enum

Accepted values for the SurveyConditionGroupOperator enum.

ValueDescription
AND
OR

SurveyContext enum

Accepted values for the SurveyContext enum.

ValueDescription
LICENSE
USER

SurveyRadioGroupConditionOperator enum

Accepted values for the SurveyRadioGroupConditionOperator enum.

ValueDescription
EQUALS
NOT_EQUALS

SurveyRatingConditionOperator enum

Accepted values for the SurveyRatingConditionOperator enum.

ValueDescription
EQUALS
NOT_EQUALS
GREATER_THAN
LESS_THAN
BETWEEN

SurveyReminderType enum

Accepted values for the SurveyReminderType enum.

ValueDescription
MANUAL

SurveyStatus enum

Accepted values for the SurveyStatus enum.

ValueDescription
CREATED
IN_PROGRESS
SENT