younifyd
Menu

productProjectionsSuggest

Search-as-you-type suggestions for product projections from a partial search term.

Use it in a workflow

  1. Add a step and choose the Commercetools connector.
  2. Pick the productProjectionsSuggest action (under Product).
  3. Fill in the fields below, then reference the result from later steps as {{productprojectionssuggest.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.

graphql
query ProductProjectionsSuggest($searchKeywords: [SearchKeywordArgument!]!, $fuzzy: Boolean, $limit: Int, $staged: Boolean) {
  productProjectionsSuggest(
    searchKeywords: $searchKeywords
    fuzzy: $fuzzy
    limit: $limit
    staged: $staged
  ) {
    searchKeywords {
      locale
      suggestions {
        text
      }
    }
  }
}

Variables

Pass these as a JSON object in the step's Variables field.

searchKeywordsarray<object>required
searchKeywordstringrequired
localestringrequired
fuzzyboolean
limitnumber
stagedboolean
json
{
  "searchKeywords": [
    {
      "searchKeyword": "string",
      "locale": "string"
    }
  ],
  "fuzzy": false,
  "limit": 0,
  "staged": false
}

Response

Read the result with {{productprojectionssuggest.response.data.data.productProjectionsSuggest}}. If the API returns errors, the step fails and they are at {{productprojectionssuggest.response.data.errors}}.

searchKeywordsarray<object>
localeobject
suggestionsobject

Need more? See the Commercetools guide for connection setup and behaviour shared by every action.

productProjectionsSuggest — Commercetools — Documentation