Announcement: You can find the guides for Commerce 7.5 and later on the new Elastic Path Documentation site. The Developer Center continues to support Commerce 6.13.0 through 7.4.1.Visit new site

CM Import Job

CM Import Job

An import job updates categories, products, inventories, prices, customers, etc from CSV file data. Each column in the CSV file maps to a data field in the Commerce Manager. The element <mappings>, as shown in the example below, defines these mappings.

Note:

When an export is performed, an empty pricing.xml is generated. This file is generated for legacy systems and should not be used.

Sample XML: CM Import Job (csv)


<cmimportjobs>
<cmimportjob guid="IMPORT_JOB_FOR_COUPON_CODE_EMAIL">
    <name>Coupon Codes and Addresses Import</name>
    <csv_file_name>template.csv</csv_file_name>
    <col_delimeter>,</col_delimeter>
    <text_qualifier>&quot;</text_qualifier>
    <data_type_name>Coupon Code And Email</data_type_name>
    <dependent_price_list_guid>null</dependent_price_list_guid>
    <import_type_id>1</import_type_id>
    <max_allow_errors>0</max_allow_errors>
    <mappings>
        <mapping>
            <col_number>1</col_number>
            <import_field_name>couponCode</import_field_name>
        </mapping>
        <mapping>
            <col_number>2</col_number>
            <import_field_name>emailAddress</import_field_name>
        </mapping>
    </mappings>
</cmimportjob>

<cmimportjob guid="59072B87-43EE-BD05-8595-CD2A2BA25229">
    <name>01-SnapItUp</name>
    <csv_file_name>snapitup.csv</csv_file_name>
    <col_delimeter>|</col_delimeter>
    <text_qualifier>&quot;</text_qualifier>
    <data_type_name>Category - SnapItUp</data_type_name>
    <import_type_id>1</import_type_id>
    <max_allow_errors>0</max_allow_errors>
    <catalogue_guid>SNAPITUP</catalogue_guid>
    <mappings>
        <mapping>
            <col_number>5</col_number>
            <import_field_name>parentCategoryCode</import_field_name>
        </mapping>
        <mapping>
            <col_number>7</col_number>
            <import_field_name>storeVisible</import_field_name>
        </mapping>
        <mapping>
            <col_number>2</col_number>
            <import_field_name>displayName(en)</import_field_name>
        </mapping>
        <mapping>
            <col_number>1</col_number>
            <import_field_name>categoryCode</import_field_name>
        </mapping>
        <mapping>
            <col_number>6</col_number>
            <import_field_name>ordering</import_field_name>
        </mapping>
        <mapping>
            <col_number>3</col_number>
            <import_field_name>displayName(fr)</import_field_name>
        </mapping>
        <mapping>
            <col_number>11</col_number>
            <import_field_name>seoDescription(fr)</import_field_name>
        </mapping>
        <mapping>
            <col_number>8</col_number>
            <import_field_name>catDescription(en)</import_field_name>
        </mapping>
        <mapping>
            <col_number>10</col_number>
            <import_field_name>seoDescription(en)</import_field_name>
        </mapping>
        <mapping>
            <col_number>4</col_number>
            <import_field_name>catImage</import_field_name>
        </mapping>
        <mapping>
            <col_number>9</col_number>
            <import_field_name>catDescription(fr)</import_field_name>
        </mapping>
    </mappings>
</cmimportjob>
</cmimportjobs>