ShoppingAdvisor - Filtering Items
In ShoppingAdvisor you can filter items out of individual shopping data feeds in two different ways: - Blocking Categories
- Writing a Business Rule to Filter Individual Items
Blocking Categories Blocking Categories will allow you to filter out a set of items that all fall into a given source category. Source categories are defined by the values you send as category data your external data feed or by the values that you have setup in your inventory. The source categories can be found under the Data Mapping and under the Category Mappings section. To block all the items that fall into a particular source category: - Check the box next to the source category on the left hand side.
- Click on the Block/Unblock button at the top of the view listing.
 - Select Block from the drop down list.
- Choose either All Sites or These sites to select the individual sites.
- Click on the "Save and Exit" button at the bottom of the screen.
Writing a Business Rule to Filter Individual Items In this scenario, we will assume that the incoming data feed is using the Model field as a unique identifier for each item in the feed. We will use that value to find the item in the feed and filter it out of the data feed. There are four basic steps to setting up the filter: - Create a Lookup List of the items that will be filtered.
- Write the Business Rule that returns a TRUE or FALSE value.
- Setting the Rule on a Feed Template
- Preview the data feed to see the results
Creating the Lookup List Since we have assumed that the Model field will be used to indenifer the individual items from the data feed, our Lookup List will need to contain these values. Here is a sample of the data we might have in our incoming data feed. These will be the items we want to filter out of the data feeds: | Model | | 8888837416 | | 8888827751 | | 8888837155 | | 8888837150 | These values must appear in the lookup list. To create the Lookup List: - Goto the Data Mapping Tab
- Click on the Lookup Lists link
- Click on the "New Lookup List" Link
- Enter a name for the Lookup List.
- For each line in the list enter the Model number in the Name field and enter the word TRUE in the value field.
 - Click on the "Save and Exit" button.
Writing the Business Rule Now that the lookup list is in place, we will need to write a Business Rule that looks up the values in that list and determines if they are in there and need to be filtered. We will use the ISINLIST function to accomplish this. - Click on the Data Mapping Tab.
- Click on the Business Rules link. This will give a listing of all the current business rules available in the system.
- Click on the New Business Rule link at the top of the listing.
- For the Business Rule Name field, enter in "Filter Items - Shopzilla". We will apply this rule to the Shopzilla Feed Template. Including the name of the feed in the business rule name is always a good idea as it will help you identify the rule that needs to be applied for a given shopping site.
- In the Expression box, enter in the following code:
- ISINLIST( "Exclude Products", $model )
- ISINLIST takes two arugments:
- The name of the list to be used for the lookup. In this example, we called it Exclude Products.
- The key or value to be looked up in the list. In this example, we are going to lookup the Model number in the lookup list. When these values are found in the list, the rule will return TRUE and that will filter out the item from the data feed.
- Click on the "Save and Exit" button.
Setting the Rule on a Feed Template Next you will want to set this rule on the Shopzilla template. - Goto Data Mapping then click on Templates.
- Click on the template you are using for the Shopzilla feed.
- Scroll to the bottom of the template down to the Products To Exclude section.
- Highlight the rule "Filter Items - Shopzilla" in the Available Rules box.
- Click on the Add button. The rule will be added to the Rules Applied box.
- Click on the Save and Exit Button at the bottom of the template.
Previewing the Data Feed Once you have applied this business rule you can preview the feed to ensure that the URL tracking codes have bee added. - Goto the Feeds Tab.
- Select the feed that you want to preview by clicking on the checkbox next to it.
- Click the Preview Button at the top of the list.
- You will be prompted with your e-mail address where the feed link will be sent to.
- Click on the preview button.
 - You will receive an e-mail with a link back to the data feed which you can download to your local system.
- The items that where in the lookup list will not be included in the feed.
- To view the status and see a count of the number of items that were dropped, goto the Feeds tab and then click on Feed History. You will see the latest preview in the list with a count of the items filtered in the Filtered Items column. You can click on the number to see further details about what filters were applied.
Login to give us your comments on this SSC content
|