Menu
productProjectionSearch
Full-text + faceted search over product projections — text query, filters, facets, price selection, sorting and limit/offset paging.
Use it in a workflow
- Add a step and choose the Commercetools connector.
- Pick the productProjectionSearch action (under Product).
- Fill in the fields below, then reference the result from later steps as
{{productprojectionsearch.response.data}}.
Query
This is the query the action sends by default. Edit it in the step's Query field to change which fields come back.
query ProductProjectionSearch($projectExpandedProducts: Boolean, $locale: Locale, $text: String, $facets: [SearchFacetInput!], $filters: [SearchFilterInput!], $queryFilters: [SearchFilterInput!], $facetFilters: [SearchFilterInput!], $sorts: [String!], $limit: Int, $offset: Int, $fuzzy: Boolean, $fuzzyLevel: Int, $priceSelector: PriceSelectorInput, $markMatchingVariants: Boolean, $markMatchingVariant: Boolean, $storeProjection: String, $localeProjection: [Locale!], $staged: Boolean) {
productProjectionSearch(
projectExpandedProducts: $projectExpandedProducts
locale: $locale
text: $text
facets: $facets
filters: $filters
queryFilters: $queryFilters
facetFilters: $facetFilters
sorts: $sorts
limit: $limit
offset: $offset
fuzzy: $fuzzy
fuzzyLevel: $fuzzyLevel
priceSelector: $priceSelector
markMatchingVariants: $markMatchingVariants
markMatchingVariant: $markMatchingVariant
storeProjection: $storeProjection
localeProjection: $localeProjection
staged: $staged
) {
offset
count
total
results {
id
key
version
createdAt
lastModifiedAt
productTypeRef {
typeId
id
}
productType {
key
name
description
id
version
createdAt
lastModifiedAt
createdBy
lastModifiedBy
}
nameAllLocales {
locale
value
}
descriptionAllLocales {
locale
value
}
slugAllLocales {
locale
value
}
categoryOrderHints {
categoryId
orderHint
}
categoriesRef {
typeId
id
}
categories {
id
key
version
nameAllLocales
descriptionAllLocales
slugAllLocales
ancestorsRef
ancestors
parentRef
parent
orderHint
externalId
metaTitleAllLocales
metaKeywordsAllLocales
metaDescriptionAllLocales
stagedProductCount
childCount
children
createdAt
lastModifiedAt
assets
custom
createdBy
lastModifiedBy
}
searchKeywords {
locale
searchKeywords
}
metaTitleAllLocales {
locale
value
}
metaKeywordsAllLocales {
locale
value
}
metaDescriptionAllLocales {
locale
value
}
hasStagedChanges
published
masterVariant {
id
key
sku
prices
images
assets
availability
isMatchingVariant
scopedPrice
scopedPriceDiscounted
}
taxCategoryRef {
typeId
id
}
taxCategory {
name
description
rates
key
id
version
createdAt
lastModifiedAt
createdBy
lastModifiedBy
}
stateRef {
typeId
id
}
state {
id
version
key
type
roles
nameAllLocales
descriptionAllLocales
builtIn
transitionsRef
transitions
initial
createdAt
lastModifiedAt
createdBy
lastModifiedBy
}
reviewRatingStatistics {
averageRating
highestRating
lowestRating
count
ratingsDistribution
}
}
facets {
facet
value {
type
}
}
}
}
Variables
Pass these as a JSON object in the step's Variables field.
{
"projectExpandedProducts": false,
"locale": "string",
"text": "string",
"facets": [
{
"model": {
"terms": "string",
"range": "string"
},
"string": "string"
}
],
"filters": [
{
"model": {
"value": "string",
"range": "string",
"missing": "string",
"exists": "string",
"tree": "string"
},
"string": "string"
}
],
"queryFilters": [
{
"model": {
"value": "string",
"range": "string",
"missing": "string",
"exists": "string",
"tree": "string"
},
"string": "string"
}
],
"facetFilters": [
{
"model": {
"value": "string",
"range": "string",
"missing": "string",
"exists": "string",
"tree": "string"
},
"string": "string"
}
],
"sorts": [
"string"
],
"limit": 0,
"offset": 0,
"fuzzy": false,
"fuzzyLevel": 0
}
Response
Read the result with {{productprojectionsearch.response.data.data.productProjectionSearch}}. If the API returns errors, the step fails and they are at {{productprojectionsearch.response.data.errors}}.
Need more? See the Commercetools guide for connection setup and behaviour shared by every action.
Was this page helpful?