Data Import

Locate the metadata > changeup_import directory within the distribution. We’re going to have to make a few changes to the data files within.

  1. Rename the metadata > changeup_import > sites > [MERCHANT-SITE-ID] directory to be the ID of the site the cartridge is being installed for.

    1. If the site is assigned to a shared library, open library.xml for editing and in the primary <library> node, add the attribute library-id, making its value the ID of the shared library to import the content assets into.

    2. <library xmlns=“http://www.demandware.com/xml/impex/library/2006-10-31" library-id=“site-lib-id>

  2. Open metadata > changeup_import > inventory-lists > inventory.xml for editing. Modify the list- id value in the <header> node to be the ID of the inventory list the site is assigned to.

    1. <header list-id="MERCHANT-LIST-ID">

  1. Open metadata > changeup_import > catalogs > storefront-catalog > catalog.xml for editing. Modify the catalog-id value in the node to be the ID of the storefront catalog the site is using for categorization.

    1. code <catalog xmlns="http://www.demandware.com/xml/impex/catalog/2006-10-31" catalog-id="MERCHANT-STOREFRONT-CATALOG-ID">

  2. Open metadata > changeup_import > jobs.xml for editing. Modify the site-id value in the context node to be the ID of the site the cartridge is being installed for.

<?xml version="1.0" encoding="UTF-8"?>
<jobs xmlns="http://www.demandware.com/xml/impex/jobs/2015-07-01">
    <job job-id="ChangeUp" priority="0">
        <description>Calls the ChangeUp donation api and flags the order as imported into ChangeUp.</description>
        <parameters/>
        <flow>
            <context site-id="RefArch"/>
            <step step-id="ChangeUpExportOrders" type="ExecuteScriptModule" enforce-restart="false">
                <description/>
                <parameters>
                    <parameter name="ExecuteScriptModule.Module">bm_changeup/cartridge/controllers/ChangeUp.js</parameter>
                    <parameter name="ExecuteScriptModule.FunctionName">SendDonations</parameter>
                    <parameter name="ExecuteScriptModule.Transactional">true</parameter>
                </parameters>
            </step>
        </flow>
  1. Now create a zip file from the changeup_import directory, ensuring the zip file is named changeup_import.zip

  2. On the B2C Commerce instance, you are installing the data on, navigate to Administration > Site Development > Site Import & Export and upload the changeup_import.zip file you created in the last step.

  3. Import the data. Select the changeup_import.zip archive and click the Import button.

Last updated