Queries and mutations for managing Reviews in the platform.
Queries
Query Reviews
| Arguments | |
|---|---|
whereString | |
sortArray of String | |
limitInt | |
offsetInt | |
Get Review
| Arguments | |
|---|---|
idString | Queries with specified ID |
keyString | Queries with specified key |
Mutations
Create Review
Update Review
| Arguments | |
|---|---|
versionLong | |
actionsArray of ReviewUpdateAction | |
idString | Queries with specified ID |
keyString | Queries with specified key |
Delete Review
Output types
Review
keyString | User-defined unique identifier of the Review. |
uniquenessValueString | Must be unique among Reviews. For example, if this value is set to Customer id + Product id, only one Review per Customer and per Product is allowed. |
locale | Language in which the content of the Review is written. |
authorNameString | Name of the author. |
titleString | Title of the Review. |
textString | Content of the Review. |
targetRef | Identifies the target of the Review. Can be a Product or a Channel, specified as ProductReference or ChannelReference, respectively. |
target | Identifies the target of the Review. Can be a Product or a Channel, specified as ProductReference or ChannelReference, respectively. |
ratingInt | Rating of the Product or Channel. |
stateRef | State of the Review. Used for approval processes, see Review approval process for details. |
state | State of the Review. Used for approval processes, see Review approval process for details. |
includedInStatisticsBoolean | Indicates if this Review is taken into account in the ratings statistics of the target.
A Review is per default used in the statistics, unless the Review is in a state that does not have the role ReviewIncludedInStatistics.
If the role of a State is modified after the calculation of this field, the calculation is not updated. |
customerRef | Customer who created the Review. |
customer | Customer who created the Review. |
custom | Custom Fields of the Review. |
idString | Unique identifier of the Review. |
versionLong | Current version of the Review. |
createdAt | Date and time (UTC) the Review was initially created. |
lastModifiedAt | Date and time (UTC) the Review was last updated. |
createdBy | IDs and references that created the Review. |
lastModifiedBy | IDs and references that last modified the Review. |
ReviewTarget
idString |
ReviewQueryResult
Input types
ReviewDraft
title, text or rating should be set.keyString | User-defined unique identifier for the Review. |
uniquenessValueString | If set, this value must be unique among Reviews.
For example, if you want to have only one Review per Customer and per Product, you can set the value to Customer id + Product id. |
locale | Language in which the content of the Review is written. |
authorNameString | Name of the author. |
titleString | Title of the Review. |
textString | Content of the Review. |
target | Identifies the target of the Review. Can be a Product or a Channel, specified as ProductResourceIdentifier or ChannelResourceIdentifier, respectively. |
state | State of the Review. Used for approval processes, see Review approval process for details. |
ratingInt | Rating of the targeted Product or Channel.
This rating can represent the number of stars, a percentage, or a like (+1)/dislike (-1).
A rating is used in the ratings statistics of the targeted object, unless the Review is in a State that does not have the role ReviewIncludedInStatistics. |
customer | Customer who created the Review. |
custom | Custom Fields for the Review. |
TargetReferenceInput
typeIdString | |
idString | |
keyString |
ReviewUpdateAction
setAuthorName | |
setCustomField | |
setCustomType | |
setCustomer | |
setKey | |
setLocale | |
setRating | |
setTarget | |
setText | |
setTitle | |
transitionState |
Update actions
Set Custom Field
nameString | Name of the Custom Field. |
valueString | If value is absent or null, this field will be removed if it exists.
Removing a field that does not exist returns an InvalidOperation error.
If value is provided, it is set for the field defined by name. |
Set Custom Type
fieldsArray of CustomFieldInput | |
type | |
typeKeyString | |
typeIdString |
Set Customer
customer | Value to set. If omitted, any existing value is removed. |
Set Key
keyString | Value to set. If omitted, any existing value is removed. |
Set Locale
locale | Value to set. If omitted, any existing value is removed. |
Set Rating
ratingInt | Value to set. If omitted, any existing value is removed. |
Set Target
target | Value to set, specified as ProductResourceIdentifier or ChannelResourceIdentifier, respectively. |
TargetReferenceInput
typeIdString | |
idString | |
keyString |
Set Text
textString | Value to set. If omitted, any existing value is removed. |
Set Title
titleString | Value to set. If omitted, any existing value is removed. |
Transition State
state | Value to set. If there is no State yet, the new State must be an initial State. If the existing State has transitions set, there must be a direct transition to the new State. If transitions is not set, no validation is performed. If the new State does not have the role ReviewIncludedInStatistics, the Review is not taken into account in the ratings statistics of the target. |
forceBoolean | Switch validations on or off. Default:false |