# AI Smart Import

The AI Smart Import feature simplifies the process of uploading and integrating test data, allowing you to import information related to brands, categories, catalogs, products, prices, product media, availability, tax and product category assignment. Leveraging AI capabilities, it automatically maps the data from uploaded files to the data structure used in the Emporix system.

{% hint style="warning" %}
AI Smart Import is designed for importing sample data or test data. It is not intended for large-scale production data imports. Large-scale data imports should be handled during project implementation as part of the initial setup.
{% endhint %}

<figure><img src="https://1530167654-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8GgoeZEZYjZrpjOU6w52%2Fuploads%2Fgit-blob-bc09584d77e86f6cc7b026f693ed898dac235184%2Fai_import.png?alt=media" alt=""><figcaption><p>AI Smart Import</p></figcaption></figure>

You can upload data in both `JSON` and `CSV` formats, with JSON serving as the source object format. Our **Generate Mapping** functionality activates the AI to transform and align all object data from the file format to the schemas required by Emporix, ensuring a seamless and accurate data import process. The feature also supports mixins for enhanced flexibility.

{% hint style="danger" %}
If you want to use sample data import, you should do so before configuring your tenant. This is because sample data requires a basic tenant configuration, including the **main** site, **en** language, and a **standard** tax class. This configuration is applied automatically during the sample data upload, so if you configure your tenant first, your settings may be overwritten during the data upload.
{% endhint %}

## Use case examples

### Overall sample data upload

As a customer, you want to explore sample data for your tenant configuration to see how your own data could be organized in the Management Dashboard.

{% stepper %}
{% step %}
**Start AI Smart Import**

Go to the **AI Smart Import** and choose **Sample data import**. This action adds sample data to your tenant for brands, categories, catalogs, products, prices, product media, availability, tax and product category assignment.
{% endstep %}

{% step %}
**Review sample data**

Check the respective nodes in your Management Dashboard and view the sample data that was uploaded.

{% hint style="warning" %}
When the sample data upload is finished, you see the **Last import date** column updated. Mapping is not applied as it relates to single data uploads and no import logs are kept. You can view the results of the sample data upload by going to relevant nodes in Management Dashboard.
{% endhint %}
{% endstep %}
{% endstepper %}

### Single data uploads

As a customer, you want to upload only the categories data to the Management Dashboard.

{% stepper %}
{% step %}
**Choose data to import**

In the **AI Smart Import**, you can see different objects that can be imported. To import categories data, choose the **Go to** arrow and open the **Categories** import view.

<figure><img src="https://1530167654-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8GgoeZEZYjZrpjOU6w52%2Fuploads%2Fgit-blob-a438c81838725a635e631cb7bb67fcfcca802784%2Fai_category.png?alt=media" alt="Data to Import"><figcaption><p>Data to Import</p></figcaption></figure>
{% endstep %}

{% step %}
**Upload data from a file**

Choose **Upload file** and select your file containing the categories data you want to import. Check the examples of the files that can be uploaded for the AI:

{% tabs %}
{% tab title="CSV format" %}
{% file src="<https://1530167654-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8GgoeZEZYjZrpjOU6w52%2Fuploads%2Fgit-blob-dc7b9c0e528d3d2db1ebc824c9765f65970299f6%2FAISmartImportCategories.csv?alt=media>" %}
{% endtab %}

{% tab title="JSON format" %}
{% file src="<https://1530167654-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8GgoeZEZYjZrpjOU6w52%2Fuploads%2Fgit-blob-34bbdc65c3aae496677498849ba92dcd9157c9e5%2FAISmartImportCategories.json?alt=media>" %}
{% endtab %}
{% endtabs %}
{% endstep %}

{% step %}
**Review source objects**

When you upload the file, all the objects from the file are visible as the **Source Objects**. In this case the file held object data for 9 categories. Using the arrows in the **Source Object** field you can switch between different object categories.

<figure><img src="https://1530167654-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8GgoeZEZYjZrpjOU6w52%2Fuploads%2Fgit-blob-1c132aa684df641fc6b6b20e85ff87f8633160d2%2Fai_category_upload.png?alt=media" alt="Category Upload" width="362"><figcaption><p>Category Upload</p></figcaption></figure>
{% endstep %}

{% step %}
**Match objects**

Choose **Generate Mapping**, this starts the transformation of the objects to match the object data schema used at Emporix.
{% endstep %}

{% step %}
**Review transformations**

In the **Transformations** field you can check which fields were changed.

For example: `supercategoryId` from the file data was transformed to `parentId` to match object schemas. You can check the transformations for all the uploaded categories. You can review the generated object mapping.

<figure><img src="https://1530167654-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8GgoeZEZYjZrpjOU6w52%2Fuploads%2Fgit-blob-05db933e5acc5b271c71562e859c220c418d09cd%2Fai_categories_mapping.png?alt=media" alt="Category Mapping"><figcaption><p>Category Mapping</p></figcaption></figure>
{% endstep %}

{% step %}
**Save the mappings**

To keep your object mapping choose **Save**. If you don't want to import the categories now, you can get back to the configuration at a later point and finish the process with the current mapping saved.

{% hint style="info" %}
When you get back later to the mapping, the source object, the transformed object data and the logs are no longer visible, but the mapping is still valid.
{% endhint %}
{% endstep %}

{% step %}
**Import data**

To import the categories as they are mapped, choose **Import file**. This creates the categories structure in the Emporix system.
{% endstep %}

{% step %}
**Review logs**

When the process is complete, you can also check the logs in the **Import Logs** tab.
{% endstep %}
{% endstepper %}

## Files samples to upload

With the AI import, you can upload data separately for products, catalogs, brands, categories, prices and availability. See the files in the table for the correct upload file format with mapping examples:

### Import type: products with media

{% tabs %}
{% tab title="CSV format" %}
{% file src="<https://1530167654-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8GgoeZEZYjZrpjOU6w52%2Fuploads%2Fgit-blob-5eb069ff3addd365cdacf1deef270768b73b6ff7%2FAISmartImportProduct.csv?alt=media>" %}
{% endtab %}

{% tab title="JSON format" %}
{% file src="<https://1530167654-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8GgoeZEZYjZrpjOU6w52%2Fuploads%2Fgit-blob-d9bc0494e8d81e240a3e7cb5904251ca7131440a%2FAISmartImportProduct.json?alt=media>" %}
{% endtab %}

{% tab title="Mapping" %}
{% file src="<https://1530167654-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8GgoeZEZYjZrpjOU6w52%2Fuploads%2Fgit-blob-8c2544c658e26bb0dd13fd698a0a3a028af39b40%2Fproduct.mapping?alt=media>" %}
{% endtab %}
{% endtabs %}

### Import type: catalogs

{% tabs %}
{% tab title="CSV format" %}
{% file src="<https://1530167654-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8GgoeZEZYjZrpjOU6w52%2Fuploads%2Fgit-blob-9cb6b838be4d2090cc8583f8af3f3a6de64bf461%2FAISmartImportCatalog.csv?alt=media>" %}
{% endtab %}

{% tab title="JSON format" %}
{% file src="<https://1530167654-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8GgoeZEZYjZrpjOU6w52%2Fuploads%2Fgit-blob-bc629210ffd93c9dabcb5d6e59465bbc460d5090%2FAISmartImportCatalog.json?alt=media>" %}
{% endtab %}

{% tab title="Mapping" %}
{% file src="<https://1530167654-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8GgoeZEZYjZrpjOU6w52%2Fuploads%2Fgit-blob-a0e7d92e2657102e0d3ec0b283b592d4096e3a43%2Fcatalog.mapping?alt=media>" %}
{% endtab %}
{% endtabs %}

### Import type: brands

{% tabs %}
{% tab title="CSV format" %}
{% file src="<https://1530167654-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8GgoeZEZYjZrpjOU6w52%2Fuploads%2Fgit-blob-236f2e48812ba7ce8e278e2cfd7606fa38290f3a%2FAISmartImportBrands.csv?alt=media>" %}
{% endtab %}

{% tab title="JSON format" %}
{% file src="<https://1530167654-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8GgoeZEZYjZrpjOU6w52%2Fuploads%2Fgit-blob-fea5767b30c751ff776d7ad56d30226288a88f45%2FAISmartImportBrands.json?alt=media>" %}
{% endtab %}

{% tab title="Mapping" %}
{% file src="<https://1530167654-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8GgoeZEZYjZrpjOU6w52%2Fuploads%2Fgit-blob-572295881c934e70cae1d2ea956b8c7341ca201d%2Fbrands.mapping?alt=media>" %}
{% endtab %}
{% endtabs %}

### Import type: categories

{% tabs %}
{% tab title="CSV format" %}
{% file src="<https://1530167654-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8GgoeZEZYjZrpjOU6w52%2Fuploads%2Fgit-blob-dc7b9c0e528d3d2db1ebc824c9765f65970299f6%2FAISmartImportCategories.csv?alt=media>" %}
{% endtab %}

{% tab title="JSON format" %}
{% file src="<https://1530167654-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8GgoeZEZYjZrpjOU6w52%2Fuploads%2Fgit-blob-34bbdc65c3aae496677498849ba92dcd9157c9e5%2FAISmartImportCategories.json?alt=media>" %}
{% endtab %}

{% tab title="Mapping" %}
{% file src="<https://1530167654-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8GgoeZEZYjZrpjOU6w52%2Fuploads%2Fgit-blob-6faf5504be0b647dd767f5dbd4e334e0a28005ac%2Fcategories.mapping?alt=media>" %}
{% endtab %}
{% endtabs %}

### Import type: prices

{% tabs %}
{% tab title="CSV format" %}
{% file src="<https://1530167654-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8GgoeZEZYjZrpjOU6w52%2Fuploads%2Fgit-blob-386eca326101b87cc05b0937087662307d684e1d%2FAISmartImportPrice.csv?alt=media>" %}
{% endtab %}

{% tab title="JSON format" %}
{% file src="<https://1530167654-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8GgoeZEZYjZrpjOU6w52%2Fuploads%2Fgit-blob-2170567a7c462470e5b3db284822ae4017f0b7b2%2FAISmartImportPrice.json?alt=media>" %}
{% endtab %}

{% tab title="Mapping" %}
{% file src="<https://1530167654-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8GgoeZEZYjZrpjOU6w52%2Fuploads%2Fgit-blob-5b4848cfcd5a8624e772a1d091e942413e16e92d%2Fprice.mapping?alt=media>" %}
{% endtab %}
{% endtabs %}

### Import type: availability

{% tabs %}
{% tab title="CSV format" %}
{% file src="<https://1530167654-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8GgoeZEZYjZrpjOU6w52%2Fuploads%2Fgit-blob-00496fbb6daebe0b4b357f2bb222a09b5c093a7d%2FAISmartImportAvailability.csv?alt=media>" %}
{% endtab %}

{% tab title="JSON format" %}
{% file src="<https://1530167654-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8GgoeZEZYjZrpjOU6w52%2Fuploads%2Fgit-blob-947d15305aba055ebd1d3fc99790b14284ea435d%2FAISmartImportAvailability.json?alt=media>" %}
{% endtab %}

{% tab title="Mapping" %}
{% file src="<https://1530167654-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8GgoeZEZYjZrpjOU6w52%2Fuploads%2Fgit-blob-31bbc367c90c0dcaf246225cdfff32f1f031b862%2Favailability.mapping?alt=media>" %}
{% endtab %}
{% endtabs %}

## Troubleshooting

If an error occurs during the import process, you can prompt the AI to correct the mapping, with up to five attempts allowed. If the issue persists, select **Generate Mapping** again to restart the mapping process.

To adjust object parameters, you can ask the AI to make specific changes using prompts such as:

* `Map the code field to the ID field.`
* `Add the FR language to every product if it's missing.`
* `Correct the mapping for the Snacks category.`

This allows for precise customization and ensures accurate data handling.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.emporix.io/agentic-commerce-intelligence/ai-in-emporix/ai-intro/ai-import.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
