This pipelet searches for system object instances. The following system object types are supported:
- GiftCertificate
- SourceCodeGroup
- Store
- ProductList
Support for the following system object types is deprecated:
- Order
- Profile
Use the search methods from dw.customer.CustomerMgr
and dw.order.OrderMgr
, respectively for querying these types.
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:
- String
'String'
- Integer
1, 3E4
- Number
1.0, 3.99E5
- Date
yyyy-MM-dd e.g. 2007-05-31 (Default TimeZone = UTC)
- DateTime
yyyy-MM-dd'T'hh:mm:ss+Z e.g. 2007-05-31T00:00+Z (Z TimeZone = UTC) or 2007-05-31T00:00:00
- Boolean
true, false
- Email
'search@demandware.com'
- Set of String
'String'
- Set of Integer
1, 3E4
- Set of Number
1.0, 3.99E5
- Enum of String
'String'
- Enum of Integer
1, 3E4
- Image
- HTML
- Text
- Quantity
- Password
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:
=
Equals - All types; supports NULL value (thumbnail = NULL
)!=
Not equals - All types; supports NULL value (thumbnail != NULL
)<
Less than - Integer, Number and Date types only>
Greater than - Integer, Number and Date types only<=
Less or equals than - Integer, Number and Date types only>=
Greater or equals than - Integer, Number and Date types onlyLIKE
Like - String types and Email only; use if leading or trailing wildcards will be used to support substring search(custom.country LIKE 'US*'
)ILIKE
Caseindependent Like - String types and Email only, use to support case insensitive query (custom.country ILIKE 'usa'
), does also support wildcards for substring matching
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.