Forum

The forum is a free service supported by community members. Please consider opening a support ticket if you need timely help.

PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 04 Jul 2017 05:30 PM by  Steve L
Import Categories, Products, etc for multiple portals to create new records vs "move"?
 2 Replies
Sort:
You are not authorized to post a reply.
Author Messages


New Member


Posts:7
New Member


--
30 Jun 2017 06:26 AM

    I should have made a test and watched closely before continuing on across 30 portals... however, we just realized today that, after exporting the product records, categories, variants, etc from our master portal, when we import those records into the next/new portal, it DOES NOT (?) create new records? instead it just moves/reassigns those products to that different portal?

    SO, when we thought that we were quickly creating 8 new products with 40 variants each across 30 portals, it turns out we were just moving them, one portal at a time, down the list so that in the end, they were only present in the last portal we worked in.

    This was different than the expectation of using the export/import as similar to templates, allowing us to quickly setup portals filled with the same starter products.

    Are we missing something? is there a different way to do that type of bulk/batch create action?

    0


    New Member


    Posts:7
    New Member


    --
    04 Jul 2017 04:39 PM

    OK, I worked out all the details and figured out what was wrong about the first way that we attempted to bulk import products to populate products across multiple portals. Here's my write up in case anyone has issues in the future. Too, this will help anyone who is just doing single-portal bulk imports.

    First Off, here are the main import files that we have been working with. There are more that may apply for a given situation, but these were the only sections/import files that we needed to work with:

    • Category
    • Product
    • ProductCategory
    • ProductVariant

    Begin by exporting these from the first portal that you wish to copy from and use as a template for all the other portals. Export each one of those and you'll have a CSV file for each

    Edit these files so that they become unique and have unique values... that was part of our mistake... I had assumed that if doning an Import process, it would automatically ignore/replace those GUIDs (32 character unique string values for the KEY columns like ProductKey, CategoryKey, etc) with a new, unique GUID. However, it does not. If you simply use the original export files and perform a new Import with them, it will "move" the Category, Product, etc over from the original portal to the new portal (which might come in handy some day if you need to bulk move products from Portal X to Portal Y).

    SO, begin by editing these CSV files, here are some notes to make it easier if you are needing to edit multiple copies of these:

    • You will need to make a set of these 4 files for each Portal... so I named them accordingly so that it's easier to choose the right file when doing the imports on each portal. My example named set would be like this:
      • 4-Category.en-US.csv
      • 4-Product.en-US.csv
      • 4-ProductCategory.en-US.csv
      • 4-ProductVariant.en-US.csv
        and so on, with us changing out the 4- for 5-, 6- etc for all the other portals
    • You'll need to update a few things inside of each of the CSV files specifically for each portal. In preparing for 4 portals of imports, you'd end up with 16 versions of the files
    • Inside the CSV file records, if the first column ("Act" for Action) of your exported CSV had a "u" for Update, change this to an "i" for Insert. One of the files has it blank... you'll need to enter the "i" value for that one.
    • The KEY value DOES NOT have to be a GUID! It must be unique but it does not have to be a GUID specifically. It's super easy to make GUIDs, but less easy to make them in Excel while working with the CSV. Also, copying them and pasting them and keeping things straight can be hard with a number letter GUID string. SO, instead, make it the name of the product with a -4 (dash portal id) at the end... this will keep it unique and make it super easy to Find&Replace within Excel as you setup/edit each of the portal files
    • In the ProductCategory file, there are two sets of columns that will need updating for the KEY values for this cross-reference database table... you'll paste in the CategoryKey that you made earlier, and the ProductKey that you made earlier. The columns of ProductID and CategoryID, fortunately, can be left blank
    • Because I called everything in a formula of "keywording" + "-PortalID" and kept the same product name for the kewording part, then after making the first 4 CSV files, I was able to simply find&replace to swap the -3 for -4 or whatever I was doing in that round.
    • One more edit that is specifically made in only one file, within the ProductVariant CSV file, there is a TaxClassID column. This will need to be updated to the ID number of the Tax Class ID which you set in the RevIndex > Configuration > Taxes section. Simply click on the record to see the ID displayed on the page. Enter that number in the CSV file. This value must be edited to match the TaxClassID for each portal.

    That's it! It took a bunch to type up, but once done, it's easy to copy files and find/replace to make the edits needed and quickly begin bulk creating products across multiple portal stores.

    0


    Veteran Member


    Posts:2956
    Veteran Member


    --
    04 Jul 2017 05:30 PM

    Thank you for sharing. Happy 4th of July :)

    0
    You are not authorized to post a reply.