The Import module is a legacy solution. You should use Automation with Data Transformations instead.
For more information, see:
Importing product feed to catalogs
Custom import type ensures more freedom as you select an endpoint or more endpoints to which data are sent.
This article describes a use case of importing a product feed to a catalog and for that the custom import type is used. Product feed imported this way allows to use its contents in regular Synerise communication channels.
Requirements
Only for this use case:
- Prepare a sample Google Merchant XML file. It must include a probe of products (few or many more) included in the product feed.
Tip: Products in the product feed can have various groups of attributes. That is why it’s important to choose the full range of attributes in the sample file. Example: If you want to import
<g:sale_price>
attribute to a catalog and only part of the products is assigned to this attribute, then the sample file must contain at least one product with this attribute (<g:sale_price>
). Otherwise it will be missed during the mapping. - Include in a sample file an
item_key
column. In the case of product feeds, the item key is usually an ID of a product (g:id
org:item_group_id
). Remember! The values in the item key column must be consistent with the product ID on the website (og:tags
) and in transactions. - Create a catalog.
Importing feed to catalogs
-
Go to
Settings > Import > New import.
-
Select the Custom import type.
-
If your feed is available under the link, select Pull - SFTP or API method (you can read more about this method here).
-
Enter the name of your import (it’s visible only on the list of imports).
-
In the Access section, choose the
GET
method and in the Endpoint URL field, enter the product feed URL. -
Confirm with the Apply button.
-
In the Schedule section, define the frequency of importing the feed.
Tip: Instruction on scheduling imports is available here. -
Confirm with the Apply button.
-
In the Sample file section, upload an XML sample file.
-
Confirm with the Apply button.
-
To proceed, click Next.
Result: You are directed to the mapping view. -
On the left side of the screen, click Add endpoint.
Result: A dropdown list shows. -
From the dropdown list select the Upload to catalog endpoint.
-
To define columns that will show in the catalog, match the fields from the left side with the attributes. Use Auto mapping option.
A file before mapping Result: All attributes are mapped and the columns in the catalog will have the same names as the attributes.
A file after auto mapping -
You can still make some changes:
- Delete a column from mapping (if you don’t want to include all attributes from the product feed).
- Add a new column
- In the Add field field, enter the name of the column. It must contain
value.
prefix (example:value.new_column
). - Map the newly added field with any attribute by connecting the field and the attribute with a line.
- In the Add field field, enter the name of the column. It must contain
- Add a new attribute
-
Define the item key of a catalog. It means defining a column that will be the key used to refer to a catalog. Map the Item Key from the Required list with the attribute. The column mapped as
itemkey
, (in this example,g:id
) will be mapped with two values, in this case asvalue.g:id
anditemkey
.Note: In the case of product feeds, the item key is usually an ID of a product (g:id
org:item_group_id
). Remember! The values in the item key column must be consistent with the product ID on the website (og:tags
) and in transactions. -
Add a new column:
- Click Add input.
- In the Input name field, enter the name of the catalog.
- In the Plain text field, enter the ID of the catalog (it’s the numerical value at the end of the link to the catalog).
- Click Save.
-
Map the newly added column (with the catalog) with the
Bag Id
(the Optional list > Additional Data). -
If the attributes are mapped, to proceed, click Next.
Result: A preview of mapping is displayed. -
Check if the transformation of attributes is correct.
-
To start imports, on the left side, click Run import.
Results:
- The attributes from a sample file are imported to the catalog.
- Product feed will be imported periodically according to the settings in the Schedule section and data will be added to the catalog. If a product is removed from the feed, this product will stay in the catalog anyway.
- You can check the status of imports in the Progress section.