Query Format
Query Format
A simple query has the following form:
FIND <objectType> WHERE <expression>
where <objectType> is the type of object you want to retrieve. Supported values are:
- Product
- Configuration
- Promotion
- PriceList
- Promotion
- PriceListAssignment
- TaxJurisdiction
- TaxCode
- PaymentGateway
- Warehouse
- Store
- Customer
- CustomerProfileAttribute
- CmUser
- UserRole
- Catalog
- GiftCertificate
- ShippingRegion
- ShippingServiceLevel
- SavedCondition
-
CmImportJob
Note:
The object type must match the exporter type specified in the export configuration file.
<expression> specifies the criteria that determines which objects to retrieve. An expression has the following form:
<field> <operator> <value>
where <field> is the field that contains the values you want to compare. A field represents a common characteristic of the object. For example, if you want to look for products of a specific brand, you would include the BrandCode field in your query. The supported fields are described in Supported Fields further in this appendix. Not all object types have supported fields.
<operator> is the operator you are using to perform the comparison.
The WHERE clause is optional. If omitted, all products are matched.
For example, the following query matches the product whose code is 10030205:
FIND Product WHERE ProductCode = '10030205'
In addition to searching for field values, you can also search for attribute values on products and categories. To search for a value in an attribute, the expression has the following form:
AttributeName{<attribute_name>} <operator> <value>
where <attribute_name> is the name of a product attribute.
For example, the following query matches all products that have the Header / Model attribute set to MX:
FIND Product WHERE AttributeName{Header / Model} = 'MX'
To search for a value in a product SKU attribute, use SkuAttributeName. For example, the following query matches all products that have the Header / Model SKU attribute set to MX:
FIND Product WHERE SkuAttributeName{Header / Model} = 'MX'