Queries and mutations for managing Reviews in the platform.

Queries

Query Reviews

QUERYreviews
Arguments
where​
String​
sort​
Array of String​
limit​
Int​
offset​
Int​

Get Review

QUERYreview
Arguments
id​
String​

Queries with specified ID

key​
String​

Queries with specified key

Output:Review

Mutations

Create Review

MUTATIONcreateReview
Arguments
draft​
Output:Review

Update Review

MUTATIONupdateReview
Arguments
version​
Long​
actions​
Array of ReviewUpdateAction​
id​
String​

Queries with specified ID

key​
String​

Queries with specified key

Output:Review

Delete Review

MUTATIONdeleteReview
Arguments
version​
Long​
personalDataErasure​
Boolean​
Default: false​
id​
String​

Queries with specified ID

key​
String​

Queries with specified key

Output:Review

Output types

Review

key​
String​

User-defined unique identifier of the Review.

uniquenessValue​
String​
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.

authorName​
String​

Name of the author.

title​
String​

Title of the Review.

text​
String​

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.
rating​
Int​

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.
includedInStatistics​
Boolean​
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.

id​
String​

Unique identifier of the Review.

version​
Long​

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

id​
String​

ReviewQueryResult

offset​
Int​
count​
Int​
total​
Long​
exists​
Boolean​
results​
Array of Review​

Input types

ReviewDraft

When creating a new Review, at least one of title, text or rating should be set.
key​
String​

User-defined unique identifier for the Review.

uniquenessValue​
String​
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.

authorName​
String​

Name of the author.

title​
String​

Title of the Review.

text​
String​

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 of the Review. Used for approval processes, see Review approval process for details.
rating​
Int​
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 who created the Review.

custom​

Custom Fields for the Review.

TargetReferenceInput

typeId​
String​
id​
String​
key​
String​

ReviewUpdateAction

setAuthorName​
setCustomField​
setCustomType​
setCustomer​
setKey​
setLocale​
setRating​
setTarget​
setText​
setTitle​
transitionState​

Update actions

Set Author Name

authorName​
String​

Value to set. If omitted, any existing value is removed.

Set Custom Field

name​
String​
Name of the Custom Field.
value​
String​
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

fields​
Array of CustomFieldInput​
typeKey​
String​
typeId​
String​

Set Customer

Value to set. If omitted, any existing value is removed.

Set Key

key​
String​

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

This update action produces the ReviewRatingSet Message.
rating​
Int​

Value to set. If omitted, any existing value is removed.

Set Target

target​
Value to set, specified as ProductResourceIdentifier or ChannelResourceIdentifier, respectively.

TargetReferenceInput

typeId​
String​
id​
String​
key​
String​

Set Text

text​
String​

Value to set. If omitted, any existing value is removed.

Set Title

title​
String​

Value to set. If omitted, any existing value is removed.

Transition State

Transition to a new State. This update action produces the Review State Transition Message.
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.
force​
Boolean​

Switch validations on or off.

Default: false​