Salesforce B2C Commerce 23.5 > B2C Commerce API > B2C Commerce Pipelets > Search
Pipelet SearchSystemObject

This pipelet searches for system object instances. The following system object types are supported:

Output will be a SearchResult containing all object instances of the specified type that match the explicit SearchExpression OR the search criteria specified in Search*Key/Search*Value pairs. Please note: If search keys are specified by Search*Key parameters, the pipelet executes an ILIKE (case insensitive) query with right-hand wildcard on the values. This specific mode is typically for a "query by example" search in a user interface.

If no search criteria is provided the pipelet returns all object instances of the specified object type. In either case, SearchResultCount contains the number of objects in the SearchResult.

The identifier for an attribute to use in a query condition is always the ID of the attribute as defined in the type definition. For custom defined attributes the prefix custom is required in the search term (e.g. custom.color), while for system attributes no prefix is used (e.g. name).

Supported value types with sample expression values:

The following types of attributes are not queryable:

Note, that some system attributes are not queryable by default regardless of the actual value type code.

The following operators are supported in a condition:

Conditions can be combined using logical expressions 'AND', 'OR' and 'NOT' and nested using parenthesis e.g. gender = {1} AND (age >= {2} OR (NOT profession LIKE {3})).

The pipelet provides a placeholder syntax to dynamically pass objects as search parameters. Each passed object is related to a placeholder in the SearchExpression configuration parameter. The placeholder must be an Integer that is surrounded by braces and relates to one of the input parameter Search*Value, e.g. custom.dtvalue <= {1}.

The sorting order and direction can be specified by SortExpression OR by using the SortBy* / SortBy*Direction pairs. Please note that specifying a localized custom attribute as the sorting attribute is not supported.

Group:
Search
Configuration Properties
CaseSensitive  :  Boolean (Optional)
In case of a key/value based search definition the config value specifies whether a case sensitive or case insensitive LIKE is executed. Default is a case insensitive search.
Permissible Values:
false
true
ObjectType  :  String (Required)
The sytem object type to search for.
Permissible Values:
GiftCertificate
Order
ProductList
Profile
SourceCodeGroup
Store
SearchExpression  :  String (Optional)
The expression defining the search conditions. Samples: "firstName like 'Fred*' AND lastName like 'Incognito*'", "creationDate >= {1}", "email != NULL", "custom.ivalue = 1" The {1} points to an object value specified by dictionary-in parameter Search1Value.
SortExpression  :  String (Optional)
The expression defining the sorting conditions. Samples: "custom.ivalue ASC", "lastName DESC", "custom.ivalue ASC, creationDate DESC"
Input Parameters
Search1Key  :  String (Optional)
The ID identifying the attribute to search for. Samples: "creationDate", "custom.dtvalue"
Search1Value  :  Object (Optional)
The value to search for, an object of type String, Number, Date or Boolean.
Search2Key  :  String (Optional)
The ID identifying the attribute to search for. Samples: "creationDate", "custom.dtvalue"
Search2Value  :  Object (Optional)
The value to search for, an object of type String, Number, Date or Boolean.
Search3Key  :  String (Optional)
The ID identifying the attribute to search for. Samples: "creationDate", "custom.dtvalue"
Search3Value  :  Object (Optional)
The value to search for, an object of type String, Number, Date or Boolean.
Search4Key  :  String (Optional)
The ID identifying the attribute to search for. Samples: "creationDate", "custom.dtvalue"
Search4Value  :  Object (Optional)
The value to search for, an object of type String, Number, Date or Boolean.
Search5Key  :  String (Optional)
The ID identifying the attribute to search for. Samples: "creationDate", "custom.dtvalue"
Search5Value  :  Object (Optional)
The value to search for, an object of type String, Number, Date or Boolean.
SortBy1  :  String (Optional)
The ID identifying a sorting attribute. Samples: "creationDate", "custom.dtvalue"
SortBy1Direction  :  Number (Optional)
Specifies the sorting direction of the related sorting attribute. (1 = ASC, other value = DESC)
SortBy2  :  String (Optional)
The ID identifying a sorting attribute. Samples: "creationDate", "custom.dtvalue"
SortBy2Direction  :  Number (Optional)
Specifies the sorting direction of the related sorting attribute. (1 = ASC, other value = DESC)
SortBy3  :  String (Optional)
The ID identifying a sorting attribute. Samples: "creationDate", "custom.dtvalue"
SortBy3Direction  :  String (Optional)
Specifies the sorting direction of the related sorting attribute. (1 = ASC, other value = DESC)
Output Parameters
SearchResult  :  Iterator  :  (Optional)
The system object instances that match the search criteria.
SearchResultCount  :  Integer  :  (Optional)
The number of system object instances in the SearchResult.
X Privacy Update: We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used. By continuing to use this site you are giving us your consent to do this. Privacy Policy.