The "Export Feeds" module enables the use of export feeds in a user-friendly manner. In general, export feed is a data export template that depends on the user needs and entity data to be exported from the AtroPIM system.
With the help of the "Export Feeds" module, data export from the AtroPIM system is performed in accordance with the export templates that can be further configured and customized, as well as reused at different time intervals.
The "Export Feeds" module significantly extends the functionality of the AtroPIM system, so further description of the module is given in the context of AtroPIM.
After the module installation, a new Export Feeds
configuration group is added to the AtroPIM administration page. Also there is a possibility to add export feeds as a separate navigation menu item on the Administration > User Interface
page:
To create a new export feed click Export Feeds
in the navigation menu and then click the Create Export Feed
button. The common creation pop-up will appear:
Here enter the export feed name, select its type and define its owner. By default, the export feed type is File. In case you need to export the data to the other sources, the corresponding modules installation is required.
To configure the export feed, click on Edit
button:
In-line editing is supported here. So prior to making any changes, you have to click the pencil icon located on the right of each editable field.
Overview panel enables you to define the main feed parameters (name, action, activity etc):
The following settings are available here:
You may also set up your export feed in the Export Data Settings
panel and in the Feed Settings
panel.
When the CSV file format is selected, the following settings are added to be configured via the drop-down lists:
;
, ,
, \t
, |
.When the XML file format is selected, the following settings are added to be configured via the drop-down lists:
If in the xml schema Location is provided, the XML, which is generated by an Export Feed is automatically validated against provided XSD file.
Please, note that by default the XLSX (Excel) file format is set and the Header row
checkbox is activated.
In the Feed Settings
panel you may set up the following values:
.
or ,
should be defined here.Click the Save
button to complete the operation; the new record will be added to the export feeds list. You can configure it right away on the detail view page that opens or return to it later.
Filtering settings for export feeds are the same as for product list view. In the Filter
panel, you can filter the records you want to export. To set a filter, click the Edit
button in the top menu of the Export feed. In the Filter result
panel, you can see all the filtered records.
If you regularly export data with the same feed, you may need to export only those records that have been changed since the last launch of feed. For this purpose, you can use boolean filter “Unexported”.
It will filter out only those records that have a Modified at
date greater than or equal to the date of the last feed run. At the same time, you can change the value of field Last Run
manually in case you made a mistake and want to run the feed with the same records again.
Please note that value of the
Modified at
field is affected by changes to fields and attributes (for the Product entity) by default. In the entity settings in fieldRelations effecting modification date/time
, you can also add relationships that affect the modification date change.
In the CONFIGURATOR
panel, you can select the fields and attributes (for the Product entity) of the entity that you want to export. You can add each field individually by clicking the Сreate "+" button or add all fields with option "Add all missing fields". For the Product entity there is an option "Select attribute(s)" which allows you to select several attributes at once.
Changing the field order to be displayed in the export file is also done here via drag-and-drop:
Use the Delete
button to remove the desired field from the export file.
To add new entity field for export, select the Create
option, the following pop-up will appear:
In the Type field, you can select the type of asset to be exported. The following types are available:
Here select the field from the drop-down list of all fields available in the system for the given entity, modify the Column
value, if needed, and define whether data export should be made by ID, name, code or any other related entity field (for those fields, where this option is available).
If the field you export has more than one value you can select how many of them you will export by using Limit
and Offset
values. Offset
shows from what serial number to start counting (note that the first value has a serial number of 0). Limit
shows how many values to export. For example, Offset 5 Limit
1 will export only one (6th) value.
When used by default these values will select all applicable results.
Exporting attributes is available for the Product entity. To export an attribute, select Attribute
in the field Type
of CONFIGURATOR
or use option Select attribute(s)
to select several attributes at once.
In the creation pop-up that appears select the attribute from the list of the existing attributes and define its channel in the Channel
field. The Column
field is filled in automatically depending on the selected options. Alternatively, you can enter a different Column
name via the keyboard. For multilingual attributes, the CONFIGURATOR
also contains the Language and Fallback language fields.
Both entity field and product attribute records added to the export feed can be edited via the corresponding option of the single record action menu:
Click the Remove
button to delete the corresponding added entity field or product attribute record.
If you want to export values (fields or attributes) that have units in them you can do it in several different ways:
If you want to export values in a specific way and cannot achieve this with standard methods, you will need a script item in the configurator. It significantly expands the standard export capabilities and will allow you to get modified data from any entity. This type is available when the Connector module is installed.
Scrips are based on twig code (for more detailed information regarding twig syntax please go to https://twig.symfony.com/).
Write a script in corresponding field and save configurator item. Below you can see an example of a script that exports in one column Value From for attributes of Range types and Code of List Options for attributes of type List.
{% if record.attributeType == 'rangeInt' or record.attributeType == 'rangeFloat' %} {{ record.valueFrom }} {% elseif record.attributeType == 'extensibleEnum' %} {{ record.valueOptionData.code }}Export feed records can be duplicated and removed whenever needed.
To duplicate the existing export feed record, use the corresponding option from the actions menu on the desired export feed record detail view page:
You will be redirected to the export feed creation page and get all the values of the last chosen export feed record copied in the empty fields of the new feed record to be created.
In order to remove the export feed record, use the corresponding option from the actions menu on the desired export feed record detail view page or from the single record actions menu on the export feeds list view page:
To complete the operation, click the Remove
button in the confirmation message that appears.
The "Export Feeds" module also supports common AtroCore mass actions that can be applied to several selected export feed records, i.e. records with set checkboxes. These actions can be found in the corresponding menu on the export feeds list view page:
To enable export feed creation, editing, usage and deletion by other users, configure the corresponding access rights to the Export feeds
entity for the desired user / team / portal user role on the Administration > Roles > 'Role name'
page:
After the "Export Feeds" module is installed and configured by the administrator, user can work with export feeds in accordance with his role rights that are predefined by the administrator.
When export is started, its details and current status are displayed in the Queue Manager pop-up that appears automatically:
You can cancel the export from the Queue Manager by clicking the Cancel button. After successful export, a notification will appear in the Notifications
panel. You can download the exported file directly from it:
If any errors arrive during export they will also be shown in the Queue Manager.
You can also see last time export feed was executed and status of the last job executed in export page.
When exporting from Assets, Product, Brand or other entities that contain the Asset field, you can export files to a ZIP archive. In this case, the archive will consist of the exported file in chosen format and one or more (depending on the number of fields with assets) folders with exported documents. The folder will have the name of the field from which files are exported.
In order to export assets to an archive, you need to check the checkbox "Export assets to a ZIP archive" in Export feed configurator. The checkbox appears only if selected field contains assets.
The names of the files in the archive correspond to the names of the assets by default. You can change naming using the "File Name Template" field.
To set file names you can use the following variables:
By default, the variable {{fileName}} is specified in the "File Name Template" field. This means that if you don't change anything in it, the file will have the original asset name. If you want to add a sequence number to the file name, the template will look like this:
{{fileName}}_{{currentNumber}}You can also add to the file name the name of object (Product, Brand, etc.) from which the asset is exported. To do this, use the following template:
{{entity}} {{fileName}} {{currentNumber}}Then when exporting from two products that have two assets each, the naming will be as follows:
To add the attribute value to the file name, you can use the findRecord function. As parameters, you need to pass the name of the entity (ProductAttributeValue) and the identifiers of the record (f.e. product Id, attribute Id, channel Id, language). For example:
{% set productId = entity.id %} {% set pav = findRecord('ProductAttributeValue', {'productId' : productId, 'attributeId' : 'h64e5a3eeaf1a728f', 'channelId':'','language':'main'})%} {{pav.value}} {{ fileName }} {{currentNumber}}We have attribute value 67 for Product1 and 4435 for Product2 so the file names will look like this:
Click on Export
button to export the data from your system.
Started export job is added to the Queue Manager, where you can see the current status:
The new record is also added to the "Export Jobs" Panel with the state Pending
. After the export job is successfully completed the state will be automatically changed to Done
.
While the export is running you may cancel it in the right-side menu:
Information about completed export jobs is displayed on the Export Jobs
panel, which is empty on the export feed creation step but gets filled in after the data export is performed via the given export feed.
Results of the data export can be viewed in two ways:
Export Results
in your main navigation. The Export Jobs details contain the following information:
Created by export
filter applied.Updated by export
filter applied.The following States are available:
Exported file can be downloaded, eg to check what exactly was exported, if you click on the file name in your Export Jobs record.
To duplicate the existing export feed record, use the corresponding option from the actions menu on the detail view page of the desired export feed record:
You will be redirected to the export feed creation page and get all the values of the last chosen export feed record copied in the empty fields of the new feed record to be created. After save the mapping rules from the configurator will be copied too.
You can also duplicate an export feed as an import feed by clicking the Duplicate as Import
button. You will be redirected to the import feed creation page and get all the values of the last chosen export feed record copied in the empty fields of the new feed record to be created. After save the mapping rules from the configurator will be copied too.
To delete the export feed record, use the corresponding option from the action’s menu of your export feed.
To copy configuration of the export feed as JSON, use option Copy Configurations
This option is available for all types of export. Thus, you can create a feed via API with the same configuration using the Upsert command.
You can export directly selected data directly from different entities. To do so, go to entity, from which you want to export and select data you want to export. In an example below you can see exporting selected products. To export them, after selecting, press Actions
and select Export
.
There you will see export menu
Select existing export feed related to this entity and press Export
. A new export job will be created. For the purposes of this job all the configuration will be taken from selected export job except filters (only the data you selected will be used).
If you have the Connector module, you can export data to an Excel file with multiple sheets. To do this, select the appropriate checkbox in the data feed settings.
After selecting this checkbox, you will see the Sheets
panel under the Feed settings
. To create a new sheet, click on the "+" button. The following pop-up will appear
Here you can set the name of the sheet, the export feed to which it belongs, the sort order, and the entity from which the export will be performed. For the sheet to be exported, it must be Active. After you save the sheet, it will appear in the corresponding panel of the export feed.
Click on an sheet to configure it. The sheet page contains the same panels as the export feed: Overview, Feed settings, Filter, Filter results and configurator.
All these settings are set separately for each sheet. An excel export feed can have any number of sheets. All of them are exported with a single button to a single file.
If you want to export images, there are three ways to do it:
1) Download URL (shared)
This option will create a link that will allow you to download the file.
2) Download URL
This option works in the same way as the previous one, but requires authorisation to start the download.
3) View URL (shared)
This option allows you to view the image directly in your browser. No authorisation required.