Queries and mutations for managing Channels in the platform.
Queries
Query Channels
| Arguments | |
|---|---|
whereString | |
sortArray of String | |
limitInt | |
offsetInt | |
Get Channel
| Arguments | |
|---|---|
idString | Queries with specified ID |
keyString | Queries with specified key |
Mutations
Create Channel
Update Channel
| Arguments | |
|---|---|
idString | Queries with specified ID |
keyString | Queries with specified key |
versionLong | |
actionsArray of ChannelUpdateAction | |
Delete Channel
Output types
Channel
idString | Unique identifier of the Channel. |
versionLong | Current version of the Channel. |
keyString | User-defined unique identifier of the Channel. |
rolesArray of ChannelRole | Roles of the Channel. Can beInventorySupply, ProductDistribution, OrderExport, OrderImport, or Primary |
nameString | Name of the Channel. |
nameAllLocalesArray of LocalizedString | Name of the Channel. |
descriptionString | Description of the Channel. |
descriptionAllLocalesArray of LocalizedString | Description of the Channel. |
address | Address where the Channel is located (for example, if the Channel is a physical store). |
geoLocation | GeoJSON geometry object encoding the geo location of the Channel. |
createdAt | Date and time (UTC) the Channel was initially created. |
lastModifiedAt | Date and time (UTC) the Channel was last updated. |
reviewRatingStatistics | Statistics about the review ratings taken into account for the Channel. |
custom | Custom Fields defined for the Channel. |
createdBy | IDs and references that created the Channel. |
lastModifiedBy | IDs and references that last modified the Channel. |
ChannelRole
InventorySupply- Role tells that this channel can be used to track inventory entries.Channels with this role can be treated as warehouses
ProductDistribution- Role tells that this channel can be used to expose products to a specific distribution channel. It can be used by the cart to select a product price.
OrderExport- Role tells that this channel can be used to track order export activities.
OrderImport- Role tells that this channel can be used to track order import activities.
Primary- This role can be combined with some other roles (e.g. with `InventorySupply`) to represent the fact that this particular channel is the primary/master channel among the channels of the same type.
Geometry
typeString |
ReviewRatingStatistics
averageRatingFloat | Average rating of one target This number is rounded with 5 decimals. |
highestRatingInt | Highest rating of one target |
lowestRatingInt | Lowest rating of one target |
countLong | Number of ratings taken into account |
ratingsDistributionJson | Full distribution of the ratings. The keys are the different ratings and the values are the count of reviews having this rating. Only the used ratings appear in this object. |
Channel Query Result
Input types
ChannelDraft
keyString | User-defined unique identifier for the Channel. If set to an empty value, an InvalidOperation error is returned.
If the value is used by another Channel in the Project, a DuplicateField error is returned. |
rolesArray of ChannelRole | Roles of the Channel. The Channel must have at least one role. If set to an empty array, an InvalidOperation error is returned. Can be InventorySupply, ProductDistribution, OrderExport, OrderImport, or Primary |
nameArray of LocalizedStringItemInputType | Name of the Channel. |
descriptionArray of LocalizedStringItemInputType | Description of the Channel. |
custom | Custom fields defined for the Channel. |
address | Address where the Channel is located. |
geoLocation | GeoJSON geometry object encoding the geo location of the Channel.
Currently, only the Point type is supported. |
ChannelRole
InventorySupply- Role tells that this channel can be used to track inventory entries.Channels with this role can be treated as warehouses
ProductDistribution- Role tells that this channel can be used to expose products to a specific distribution channel. It can be used by the cart to select a product price.
OrderExport- Role tells that this channel can be used to track order export activities.
OrderImport- Role tells that this channel can be used to track order import activities.
Primary- This role can be combined with some other roles (e.g. with `InventorySupply`) to represent the fact that this particular channel is the primary/master channel among the channels of the same type.
GeometryInput
typeString | |
coordinatesArray of Float |
ChannelUpdateAction
addRoles | |
changeDescription | |
changeKey | |
changeName | |
removeRoles | |
setAddress | |
setAddressCustomField | |
setAddressCustomType | |
setCustomField | |
setCustomType | |
setGeoLocation | |
setRoles |
Update actions
Add Roles
rolesArray of ChannelRole | Value to append to the array. If the specified roles are already present, an InvalidOperation error is returned. Can be InventorySupply, ProductDistribution, OrderExport, OrderImport, or Primary |
ChannelRole
InventorySupply- Role tells that this channel can be used to track inventory entries.Channels with this role can be treated as warehouses
ProductDistribution- Role tells that this channel can be used to expose products to a specific distribution channel. It can be used by the cart to select a product price.
OrderExport- Role tells that this channel can be used to track order export activities.
OrderImport- Role tells that this channel can be used to track order import activities.
Primary- This role can be combined with some other roles (e.g. with `InventorySupply`) to represent the fact that this particular channel is the primary/master channel among the channels of the same type.
Change Description
descriptionArray of LocalizedStringItemInputType | New value to set. If set to an empty value, an InvalidOperation error is returned.
If the new value is the same as the current value, an InvalidOperation error is returned. |
Change Key
keyString | New value to set. If set to an empty value, an InvalidOperation error is returned.
If the value is used by another Channel in the Project, a DuplicateField error is returned. |
Change Name
nameArray of LocalizedStringItemInputType | New value to set. If set to an empty value, an InvalidOperation error is returned.
If the new value is the same as the current value, an InvalidOperation error is returned. |
Remove Roles
rolesArray of ChannelRole | Value to remove from the array. If none of the specified roles are already present, an InvalidOperation error is returned.
If all roles from the Channel are removed, an InvalidOperation error is returned. Can be InventorySupply, ProductDistribution, OrderExport, OrderImport, or Primary |
ChannelRole
InventorySupply- Role tells that this channel can be used to track inventory entries.Channels with this role can be treated as warehouses
ProductDistribution- Role tells that this channel can be used to expose products to a specific distribution channel. It can be used by the cart to select a product price.
OrderExport- Role tells that this channel can be used to track order export activities.
OrderImport- Role tells that this channel can be used to track order import activities.
Primary- This role can be combined with some other roles (e.g. with `InventorySupply`) to represent the fact that this particular channel is the primary/master channel among the channels of the same type.
Set Address
address | Value to set. If omitted, any existing value is removed. |
Set Address Custom Field
Channel.address must be set; otherwise, an InvalidInput error is returned.nameString | Name of the Custom Field. |
valueString | Specifies the format of the value of the Custom Field defined by name.
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. |
Set Address Custom Type
fieldsArray of CustomFieldInput | |
type | |
typeKeyString | |
typeIdString |
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 Geo Location
geoLocation | Value to set. |
GeometryInput
typeString | |
coordinatesArray of Float |
Set Roles
rolesArray of ChannelRole | Value to set. If set to an empty array, an InvalidOperation error is returned.
If the new value is the same as the current value, an InvalidOperation error is returned. Can be InventorySupply, ProductDistribution, OrderExport, OrderImport, or Primary |
ChannelRole
InventorySupply- Role tells that this channel can be used to track inventory entries.Channels with this role can be treated as warehouses
ProductDistribution- Role tells that this channel can be used to expose products to a specific distribution channel. It can be used by the cart to select a product price.
OrderExport- Role tells that this channel can be used to track order export activities.
OrderImport- Role tells that this channel can be used to track order import activities.
Primary- This role can be combined with some other roles (e.g. with `InventorySupply`) to represent the fact that this particular channel is the primary/master channel among the channels of the same type.