The following article continues delving into the Magento 2 backend. For this once, we focus on the Action Logs section situated under Admin -> System, which contains three screens: Report, Archive, and Bulk Actions. Below, you will find the possibilities the subsections provide. Besides, we shed light on more straightforward import and export processes related to these sections and other Magento 2 entities. Note that action logs are only available in Magento 2 Commerce.
Table of contents
Action Logs Explained
The primary purpose of the Action Logs feature is to make your e-commerce website more secure. The tool records admin actions so that you can always see what measures they take when logged into the Magento 2 backend. Note that additional safety can be achieved when you combine action logs with admin permissions. This compound dramatically enhances the durability of your admin section.
Most records in the log show the action itself, the performer’s name, action’s success, and object’s ID the work was applied to. Besides, you can find such information as an IP address and date.
Note that Magento turns on the logging of all admin actions by default. However, you can disable control over some store elements. Select (enable recording) or clear a checkbox per an action type.
How to Configure Admin Actions for Logging
You can choose what actions to log under Stores -> Settings -> Configuration. Find the Advanced block in the left panel and choose Admin. Here, you can find the Admin Actions Logging section. Expand it and enable/disable logging for particular actions. Don’t forget to save changes when complete.
Magento 2 Action Logs Report
The Action Logs Report page displays a detailed record of all enabled admin actions. As we’ve just mentioned, the log detail includes admin info, such as the IP address and name, and related time stamped changes.
Bear in mind that you can rearrange the selection of data in the grid with reports using the options in each column. Magento 2 doesn’t constrain you when it comes to the number of applied filters. You can either use one or as much as necessary. Another opportunity is related to data export: you can transfer all action logs from Magento 2 as CSV or XML files. The full list of parameters displayed in the Action Logs Report grid contains the following information:
- Time – when the action occurred;
- Action Group – the action type according to actions enabled in settings;
- Action – the action logged;
- IP Address – the IP address of the performer’s machine;
- Username – the admin’s (performer’s) login ID;
- Result – the action’s success or failure;
- Full Action Name – the backend action name;
- Details – the backend action category;
- Full Details – all logged details of the action.
The grid with this information is available under System -> Actions Logs -> Report.
You can use the last column to view the full details of each grid record. Click the View link and the system will transfer you to a new screen:
As for filters, they are available in each column. Defined the options and hit the Search button on the left above the grid. Thus, you will narrow down the selection of the actions displayed. Click Reset Filter to return to the full list.
When it comes to action logs export, specify a format in Export to and click Export. Magento 2 will generate the file and save it to your browser’s folder for downloads.
Magento 2 Archive
All CSV log files are stored on the server in the Admin Actions archive. In your backend, the corresponding screen is situated under System -> Actions Logs –> Archive.
As a store owner, you can set a period for log entries to be stored and the frequency of activations. Under Stores -> Settings -> Configuration, expand the Advanced tab in the left panel and choose System. Proceed to the Admin Actions Log Archiving section. Here, you can set the day coount to keep the log entries in the database (Log Entry Lifetime, Days). Note that after this period, they are removed. Besides, the section lets you choose Log Archiving Frequency: Daily, Weekly, or Monthly. Don’t forget to save your work when complete.
Each archived file is named following its current date. The system uses ISO format: yyyyMMddHH
Also, enable a cron job. Otherwise, the feature won’t work.
Magento 2 Bulk Actions Log
You can find the details of asynchronous mass operations that run in the background on The Bulk Actions Log screen. For instance, information about assigning custom prices to multiple products in a shared catalog is stored there.
The grid displays action ID, start time, description, and status for each record. You can get more details upon clicking the Details link in the Action column.
The corresponding configuration section is available under Stores -> Settings -> Configuration -> Advanced -> System -> Bulk Actions. Here, you can set the number of days that bulk actions are saved in a log (Days Saved in Log). Don’t forget to save changes.
How to Import/Export Magento 2 Entities
While Magento 2 lets you export action logs, you cannot automate this procedure. Furthermore, the platform supports a scarce selection of entities and a lean set of data transfer features. However, you can efficiently address the existing issues and get over the default restrictions with a third-party import/export extension. If you want to effortlessly move entities between Magento 2 and various external services, such as ERP, CRM, PIM, and accounting systems, you’ve come to the right place.
Meet the Improved Import & Export extension for Magento 2. Although it doesn’t work with action logs (the default platform’s functionality is enough to manage them), the plugin dramatically extends opportunities related to the integration with all possible external systems. It provides a selection of pre-configured add-ons that help you integrate with an external system in a matter of a few clicks: WooCommerce Migration Add-on, NetSuite Integration Add-on, MS Dynamics Integration Add-on, Banggood Dropshipping Add-on, and others.
The following module’s features are presented in any add-on. Besides, you can use them as a part of the extension to create any integration.
Automated Data Transfers
Although this feature is partly represented in Commerce, it is absent in Open Source. The Improved Import & Export extension provides the ability to automate data transfers following two different approaches. Firstly, it is possible to rely on cron-based schedules, as Commerce merchants do. Select a predefined interval or specify any custom timespan suitable to your needs and requirements:
In addition to schedules, the Improved Import and Export module offers a system of triggers. As a store administrator, you get the ability to create rules to initiate data synchronization. When the conditions are met, the connected transfers are launched.
Another extension’s key perk is its selection of mapping features. You cannot integrate Magento 2 with external systems directly since they use different standards regarding data. Therefore, it is necessary to edit provided data files before importing them to your e-commerce website. However, the mapping functionality of Improved Import & Export offers an intuitive way of addressing numerous headaches in this field. The following features make your daily duties much less stressful:
- Presets. Our plugin provides a set of predefined schemes designed to map attributes automatically. Choose a preset, and our extension will do all the work for you, connecting the two systems;
- Manual Matching. A similar effect is achieved when you map attributes right in the Magento 2 backend;
- Attribute Values Mapping. Attribute values are also a subject of matching in the admin;
- Attribute Values Editing. Besides, it is possible to edit attribute values in bulk;
- Filters. With our elaborate system of filters, you can choose attributes and values to narrow down the selection of data you want to export;
- Category Mapping. The plugin lets you import products right to the categories that already exist in your catalog or create new ones on the go;
- Attributes On The Fly. Missing data will no longer discontinue an import process. You can recreate the lacking attributes and values with little to no effort.
Below, you can see how to use presets:
Extended Connectivity Options
As you can see, Magento 2 provides the ability to transfer CSV/XML files. As for the Improved Import & Export module, it extends this list: you can freely import/export data via CSV, XML, ODS, JSON, and Excel. Thus, we avoid the necessity to convert all formats to CSV to enable import to your website. Note that several archive types are supported as well.
Besides, Improved Import & Export works with various sources of data. Use both local and remote servers as a point of transfer. Alternatively, you can leverage cloud storage. For complex connections, the plugin lets you leverage APIs. Direct file URL downloads are possible too. And you can rely on Google Sheet import illustrated below:
For any further information about our extension and the opportunities it provides, follow this link: