How to Import JSON Files to Magento 2

Magento 2 JSON Import

By default, Magento 2 provides limited capabilities when it comes to data import. They are enough for satisfying basic demands, but what if a more complex tas must be solved? For instance, you need to import JSON files to Magento 2. Unfortunately, this opportunity is available neither in Magento 2 out-of-the-box nor most third-party extensions. But below, we shed light on how to import JSON to Magento 2.

Perhaps, there is a very complicated solution described on StackExchange that requires multiple third-party services to be used turning the JSON format into CSV, but we know a better way.

Meet the Improved Import & Export Magento 2 extension. This module supports JSON data import allowing you to move all the necessary information to your e-commerce store in the desired format without any headaches.

Improved Import & Export Magento 2 extension fully supports JSON import and export. It means that you can effortlessly move data in this format in both directions: to and from your Magento 2 store

Json file requirements

Of course there are requirements to the Json files supported by the extension. Currently there are two:

  1. separator:comma
  2. array name required

More information about the Json file type can be found here.

As for the workflow, it is the same as with other file types. If you require detailed instructions on how to run the import – read through the Improved Import and Export manual.

You can always refer to the FireBear Studio GuiHub to find the latest sample files for Magento 2 Improved Import and Export extension.

Get sample Magento 2 Json import files

Supported entities

It is also necessary to mention supported entities. Of course, you can run product import to Magento 2 via JSON with the help of the Improved Import & Export Magento 2 extension. The module enables the seamless transfer of product data between your e-commerce store and any third-party platform in a JSON format. And all standard features of the Improved Import & Export Magento 2 plugin are supported, but let’s return to entities.

The second supported entity is Customers. Now, you can use the accessible format to transfer all information about your registered clients from the old website or any third-party system to your e-commerce store. The Improved Import & Export Magento 2 extension provides the extended support for JSON customers data import and export and you can fully leverage it.

The third supported entity is Orders. With the Improved Import & Export Magento 2 extension you can freely import orders to Magento 2 via JSON. Besides, it is possible to run JSON order export. Note that the module freely transfers not only orders but also the related data. Thus, the Improved Import & Export extension allows you to run:

  • Credit memo JSON import,
  • Invoice JSON import,
  • Shipping JSON import,
  • Tracking data JSON import.

The fourth supported entity is Categories. Our module lets you freely move categories to and from Magento 2 via JSON. Now, you don’t need to convert data files to CSV to run category import.

CMS pages are also freely supported in Magento 2 JSON import/export. The same is about coupon codes and attributes. These are all entities, so let’s describe other essential features.

The Magento 2 JSON import and export fully support such features of the Improved Import & Export module as schedules and mapping. It means that you can freely automate the import/export processes eliminating manual data updates and JSON data files modification.

The Improved Import & Export Magento 2 extension fully supports cron so that you can create any custom schedule of updates. Furthermore, it is possible to make two different update plans for JSON import and export processes related to the same integration.

As for mapping, the Improved Import & Export Magento 2 extension allows you to match the default Magento 2 attributes to any custom ones when you run JSON import or export. Thus, there is no need to edit data files on every update modifying the output according to the required standards. The mapping interface is extremely flexible and at the same time admin-friendly. A complicated procedure of attribute matching is now turned into a rapid task that takes not more than a few minutes.

Attribute mapping

Conclusion

To import JSON data to Magento 2, you need to:

  • Install the Improved Import & Export Magento 2 Extension.
  • Configure a new import profile:
    • Choose entity to import;
    • Select JSON as a data format;
    • Create a schedule of updates;
    • Create and apply a mapping scheme, etc.
  • Launch the profile.

To export JSON from Magento 2, you need to implement similar steps creating the corresponding export profile.

Watch the following video to discover more features of the Improved Import & Export Magento 2 extension:

For further information about the module, follow this link:

Download/Buy Improved Import & Export Magento 2 Extension

If you are not familiar with the JSON format, here is a brief description. JavaScript Object Notation is an open-standard file format that has several advantages over other formats. First of all, it uses human-readable text to transmit data. It means that not only Magento 2 can read it – you can also understand what’s written in a JSON product file.  All data objects consist of attribute-value pairs and array data types. Alternatively, other serializable values can be used.

While the format is often utilized for the asynchronous browser-server communication, it also introduces a great way to transfer various data between e-commerce platforms and external systems. JSON represents an excellent replacement for XML in some systems. For instance, below you can see a product.json file generated by Shopify:

And you can freely import such JSON file to Magento 2 with the help of the Improved Import & Export Magento 2 extension. By default, the Magento 2 platform doesn’t provide any tools to do that since JSON is not supported.

Why does Shopify use JSON instead of XML? Because it is a more lightweight format so that data transfers require fewer resources. Thus, the best way to run the migration Shopify to Magento 2 is offered by the Improved Import & Export Magento 2 extension. For any further information about JSON, follow the links below: