Add a step and choose the Salesforce Commerce Cloud connector.
Pick the Search Customer Group action (under Customers (Data API)).
Fill in the fields below, then reference the result from later steps as {{searchCustomerGroup.response.data}}.
Request
Path parameters
organizationIdstringrequired
An identifier for the organization the request is being made by
Query parameters
siteIdstringrequired
The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites.
Request body
Enter the body as JSON in the step's Body field.
limitinteger (int32)
Maximum records to retrieve per request, not to exceed 200.
queryobjectrequired
A set of objects that define criteria used to select records. A query can contain one of the following:
* `MatchAllQuery`
- Matches all documents.
* `TermQuery`
- Matches one or more documents against one or more document fields.
* `TextQuery`
- Matches text against one or more fields.
* `BoolQuery`
- Allows construction of a logical expression of multiple queries.
* `FilteredQuery`
- Allows a filter to be applied to a query.
* `NestedQuery`
- Allows you to query on nested documents.
- _Only supported by some Commerce APIs. For more details, see the endpoint descriptions in the API documentation._
boolQueryobject3 fields
A boolean query allows construction of full logical expression trees that are composed of other queries (usually term queries and text queries). A boolean query has three sets of clauses:
- `must`, which combines as an `AND` operator.
- `should`, which combines as an `OR` operator.
- `must_not`, which combines as a `NOT` operator.
If `must`, `mustNot`, or `should` appear in the same boolean query, they are combined logically using the `AND` operator. For example:
(must-1 AND must-1 AND ...)
AND (should-1 OR should-2 OR ...)
AND NOT (must_not-1 OR must_not-2 OR ...)
filteredQueryobject2 fields
Allows to filter the result of a possibly complex query using a possibly complex filter.
matchAllQueryobject
Matches all documents (namespace and document type). This query comes in handy if you just want to filter a search result or really do not have any constraints.
nestedQueryobject3 fields
Allows you to query nested documents that are part of a larger document. Say, for example, that you have a main product with variations in one big document, and you want to constrain a search to main products that have variations that match multiple constraints.
A `NestedQuery` is only supported by some Commerce APIs. For more details, see the endpoint descriptions in the API documentation.
termQueryobject3 fields
A term query matches one or more values against one or more document fields. A document is considered a hit if one of the values matches exactly with at least one of the given fields. The operator `is` can only take one value, while `one_of` can take multiple values. If multiple fields are specified, they are combined using a logical `OR` operator.
**Limitations:**
* The `greater` and `less` operators are not supported under certain conditions. Both operators are permitted unless the API documentation states otherwise.
* A subset of Commerce APIs handle queries with multiple fields differently. If the query has multiple fields, the query is internally handled as a logical `OR` of `DisjointMaxQueries` (with the dismax matching a value against all fields). The dismax makes sure that a document carrying a single term in multiple fields does not get higher scores than a document matching multiple terms in multiple fields.
textQueryobject2 fields
A text query is used to match some text (for example, a search phrase possibly consisting of multiple terms) against one or more fields. When multiple fields are provided, the phrase conceptually forms a logical `OR` over the fields. In this case, the terms of the phrase basically have to match within the text, that would result in concatenating all given fields.
sortsarray<object>
The list of sort clauses configured for the search request. Sort clauses are optional. See the description of the search endpoint for details on the default sorting behavior that is used when explicit sorts are not passed.
fieldanyrequired
The name of the field to sort on.
sortOrderstring
The sort order to be applied when sorting. When omitted, the default sort order (asc) is used.
One ofascdescDefault "asc"
offsetinteger (int32)
The zero-based index of the first hit/data to include in the result.
Returns 200 with an object. Read it in later steps with {{searchCustomerGroup.response.data.<field>}}.
hitsarray<object>
The sorted array of search hits. Can be empty.
creationDatestring (date-time)
The date the customer group was created.
descriptionstring
Customer Group description.
idstringrequired
Customer Group id.
inDeletionboolean
Boolean to indicate if the customer group is marked for deletion.
lastModifiedstring (date-time)
The date the customer group was last modified.
memberCountinteger (int32)
Number of members in the customer group
ruleobject1 fields
Customer Group Rule
typestring
Customer Group Type.
One ofsystemdynamicstatic
json
{"hits":[{"id":"Big Spenders","creationDate":"9999-12-31T00:00:00.0Z","description":"Customers who spent more than $1000 in last month","inDeletion":false,"lastModified":"9999-12-31T00:00:00.0Z","memberCount":109,"rule":{"description":"Customers who spend more than $1000 in the last month"},"type":"static"}]}