Use this method when your data contains over 100 products and the inventory varies by location. Use categories when you are managing brands or product categories by location. Also, if you have fewer than 100 products consider using our category system to create a product finder to avoid the overhead of importing relational data.

In product finders, the database consists of locations and products, where a given location may have a unique list of products.  This is a many-to-many relationship that requires creating an additional, related table in MetaLocator.  In this tutorial, we will take you through the basics of setting this up.

Importing this type of content involves 3 files.  The unique list of stores, the unique list of products and a store-to-product file that contains a per-store inventory of product IDs.  Examples of these files follow:


Before we import the above files, we must prepare the destination tables into which data will be imported.  The first step is to add a unique identifier called an "External Key" to the master locations table.  This key will uniquely identify the location, commonly a "store number" or "store id".  In the example files above we use "StoreNo", so we will create this field as a new External Key field.  

Next, import store locations using the store_list.csv file using the typical import process.  Click Data > Import, choose "Locations", then "Spreadsheet" and follow the prompts to import the data.  This file contains a short list of 6 locations.

By default, the product table already contains a SKU field which should be used as the product External Key.

Now we can import Products.  We'll use the product_list file which contains a unique list of products.  Click on Products, then Import.

Once successfully imported, your products and locations can be viewed on the Products > All Records screen.

Now that we have our products and our locations imported, we need to establish which products are available at which locations.  This can be done in two ways.  First, you can manually edit each location record and designate which products should be at which location.  To do this, you need to add another a field to your "Locations" table, that will allow you to manually edit the products to each location.  To do this, go to Locations > Fields, then click New in the upper right.  Let's call the field "Products at this Location", and choose Related Table Link as the field type and Products as the Related Table as shown here.

Now, when you edit a location, you will be able to browse Products, and associate them manually with that location.

A new tab will be shown and you will see a control similar to this one:

Attach Products to this location by clicking Add Existing Products at this location.

Importing Product-Location links in Bulk

As an alternative to manually associating products with locations, you can import a linking table.  The linking table would contain only two columns, one to unique identify the product, and the other to identify the location associated with that product.  Each column must be an External Key field, one from each table.  The sample files in this tutorial each already have an External Key column.

Now we can import a linking table spreadsheet that contains only two columns, SKU and StoreNo to create the product-store links in a single import.

Important: The ordering of these file import steps is important.  For example, do not import the linking file before importing the products and locations. If you import a linking file that contains an external key value that is not present in MetaLocator it will be ignored.

We can import that file, and associate products with locations in bulk.

Once your products, locations and linking file are correctly imported, this completes the import process.  You can now build an interface that represents your product finder.

To import the linking file, click Locations, then Import and then Upload a Linking Table.

Proceed to map the columns. The file should only contain two columns, the location table key and the product table key (SKU).

Choose Replace if this represents a complete linking file between all products and locations. Choose Add if this is new, or in addition to existing data.

Your data is now properly imported into MetaLocator and ready to create a product finder with unique product inventory per location.

Did this answer your question?