XML Entities

The Ecommerce Search Tool can return XML or HTML search results. Listed below are the XML entities that can be returned and their format. Type single denotes a single value contained within the entity tags. Type repeating denotes an xml entity that contains numerous entries of the italicized portion of the structure.

ENTITY STRUCTURE TYPE DESCRIPTION
<query_time>

<query_time> </query_time>

SINGLE

The time it took to complete the search.

<suggested_spelling>

<suggested_spelling></suggested_spelling>

SINGLE

Suggested spelling of the keywords or blank if there are no suggestions.

<custom_synonyms>

<custom_synonyms>
      <synonym></synonym>
<custom_synonyms>

REPEATING

A list of the custom synonyms that are returned by the search. Create custom synonyms on the Synonyms page.

<pagination>

<pagination>
     <total_products></total_products>
     <product_min></product_min>
     <product_max></product_max>
     <current_page></current_page>
     <total_pages></total_pages>
     <prev_page></prev_page>
     <next_page></next_page>
</pagination>

SINGLE

Product min - the lowest product in the results
Product max - the highest product in the results
(ie: Products shown <min> - <max> of <total>)

Prev Page/Next Page - contains either a 1 or a 0. 1 dictates that there is a page to go back to or on to. 0 dictates that there is no next or previous page. These were added for convenience sake as you could compare the current_page to total_pages.

 

<searched_in_field>

<searched_in_field></searched_in_field>

SINGLE

The name of the field the keyword search was performed on, if any. (ex: Blue in 'color')

<user_search_depth>

<user_search_depth>
     <item>
          <rank></rank>
          <key></key>
          <value></value>
     </item>

</user_search_depth>

REPEATING

A list of refinements that have been done on the search to make the results more specific. The key is the field in your database that it applies to and the value is the value that has been applied to it. The rank is included so that you can list the refinements in the order that they were applied.

When creating your query string you need to add these key/value pairs to the query string in ascending order by rank in order to keep the proper ranking for further searches if that is what you desire.

<currently_sorted_by>

<currently_sorted_by></currently_sorted_by>

SINGLE

The field that the results are currently sorted by.

<sort_bys>

<sort_bys>
          <sort_by></sort_by>
<sort_bys>

REPEATING

A list of the fields the results can be sorted by. This is more of a convenience feature that affects the HTML output but was included here so that it can be utilized more easily. The fields returned are chosen by you on the Search Refinment page by checking off the field in the 'in sort-by drop-down?' column.

<notices> <notices>
     <related_added></related_added>
     <sku_match></sku_match>
     <or_switch></or_switch>
</notices>
SINGLE

A list of notices that may be relevant to your search site. At present only one notice exists but more may be added in the future.

related_added - either 0 or 1. If this flat is set to 1 it means that related products were added to the results to fill out the page.

sku_match - either 0 or 1. If this flag is set to 1 it means that the result(s) returned are the product of doing a SKU (or partial SKU) match.

or_switch - either 0 or 1. If this flag is set to 1 it means your search has switched the ANDs in the keyword statement to ORs. This will always be 0 unless you have enabled the switching of ANDs to ORs using the API.

<merchandizing> <merchandizing>
     <html_code></html_code>
</merchandizing>
SINGLE

A string contained within CDATA relating to your keyword direct hits/merchandizing options.

If you have entered some html code or a rediect link for a keyword direct hits entry and that entry has been matched this will contain the information that you had entered.

<refinables>

<refinables>
     <refinable>
          <name></name>
          <values>
               <value>
                    <name></name>
                    <num></num>
               </value>
          </values>
     <refinable>

</refinables>

REPEATING

A list of the refinables that are available based on the results returned.
Each repeated refinable is a different field you've chosen to allow refinables for. The name is the name of the field in your database such as country.

The value elements repeat inside values for each refinement value returned for that refinable. The name for each value denotes the common property among a number of results, such as country being USA and num denotes the number of results that share that property.

<results>

<results>
     <result>
          <rank></rank>
          [YOUR FIELDS]

          <people_who></people_who>

     </result>

</results>

REPEATING

A list of the results that are returned based on the requested search. Each result is contained in the <result> tags and contains the <rank> element, which denotes it's position in the results returned based on the sorting chosen as well as the values for all the fields in your DB.

If you have 'people who' data in our system, the people_who element for that result will also be returned containing skus that were purchased with that result in an order.

<xml_feed_done>

<xml_feed_done>1</xml_feed_done>

SINGLE

This tag exists at the end of the XML feed. It can be used to confirm that the entire feed was received from the server.