Follow

Product Feed Import

The Product Feed Import command allows you to add products to a catalog, update the product data, and add categories (product_type) to support cart and browse recovery campaigns.  Product Feed Import requires a begin and end to define the data block.  It requires the following arguments: Command, Delimiter, Data Header, Data, and Command End.

cmd=productfeedsave&delimiter=\t 
client_product_id catalog_id active psku vsku product_type title link image_link price currency availability quantity
2020ABCxyz 68 Y ABC xyz Office Products>Paper>Copy Paper http://www.mydomain.com/a.html http://images.mydomain.com/image/a.jpg 44.44 USD in stock 64
cmd=endproductfeedsave

The command is ‘productfeedsave’, the data is separated by tab (\t).  Comma is also supported as a delimiter.

The first line following the command is a required header defining the fields to import.  The header uses the names of the Product Feed Data Fields.  

The lines following the header define the raw data to import.  Each line must include the same number of fields defined in the header, separated by the delimiter.  If any lines are incomplete, the import will not process. During processing, the Catalog ID in the first row will determine which Catalog will be used for all subsequent rows.  Data rows with invalid Catalog ID will fail.  Data rows with a mismatched Catalog ID will be ignored. 

The raw data section ends with the ‘endproductfeedsave’ command.

The Product Feed command expects the following fields in the header.  

  • Catalog ID: "catalog_id": string
  • Product ID: "client_product_id": string
  • Status : "active": [N,n,Y,y]
  • Availability : "availability": string
  • VSKU : "vsku": string
  • PSKU : "psku": string
  • Product Type : "product_type": string
  • Title : "title": string
  • Link : "link": url
  • Image Link : "image_link": url
  • Price : "price": float
  • Currency : "currency": string

The following fields are optional:

  • Variant Title : "variant_title": string
  • Brand: "brand": string
  • Manufacturer: "manufacturer": string
  • Quantity: "quantity": integer
  • Color: "color": string
  • Size: "size": string
  • Gender: "gender": string

Handling Missing Products

Your import may or may not not include all the same rows of products every day.  At the realm level, The Deactivate Missing Products flag is included to determine how to handle products missing from the new import.  

If enabled, Deactivate Missing Products will add or update rows for products included in the import file as normal.  Any products not included in the new file will then be updated with the status of Inactive.  If not enabled, products not included in the new file will simple be ignored with no update. 

Please contact your Account Manager to determine your realm setup.

Adding Categories

The Product Type field in the import file corresponds to Product Categories that can be used for future browse recovery campaigns.  A Product Type may be a single category, such as "Copy Paper", or may include a main category and sub categories separated by an angle bracket, such as "Office Products > Paper > Copy Paper". During import, the processor will read the Product Type string and parse it based on the bracket as a break.  Each part of the string will be stored as a category.  For example:

  • If product_type = Copy Paper, the following category will be created:
    • Copy Paper
  • If product_type = Office Products > Paper > Copy Paper
  • , the following categories will be created
    • Office Products
    • Office Products > Paper
    • Office Products > Paper > Copy Paper

Existing categories cannot be updated or deleted.  When adding or updating a product, a new Category will be created if changes have been made and the Category does not already exist.  

Example

Using all commands and arguments, and example header rows for file processing (please note the command is wrapped for display purposes only):

realm=myrealm
password=mypass
confirm_email=myemail@mydomain.com
cmd=productfeedsave&delimiter=\t
client_product_id catalog_id active psku vsku product_type title variant_title link image_link price currency availability quantity brand manufacturer color size gender
2020ABCxyz 68 Y ABC xyz Office Products>Paper>Copy Paper Paper http://www.mydomain.com/copypaper.html http://images.mydomain.com/image/media/copypaper.jpg 44.44 USD in stock 64 My Brand My MFG white 8.5x11 none
2020ABCxyzB 68 Y ABC xyzB Office Products>Paper>Copy Paper Paper Blue http://www.mydomain.com/copypaperb.html http://images.mydomain.com/image/media/copypaperb.jpg 44.44 USD in stock 64 My Brand My MFG blue 8.5x11 none
2020ABCxyzP 60 Y ABC xyzP Office Products>Paper>Copy Paper Paper Pink http://www.mydomain.com/copypaperp.html http://images.mydomain.com/image/media/copypaperp.jpg 44.44 USD in stock 64 My Brand My MFG pink 8.5x11 none
cmd=endproductfeedsave

A new row will be inserted for the Product with the ID "2020ABCxyz" and "2020ABCxyzB" for the catalog "68" and for the first and second row.  The third row will be ignored because the Catalog ID does not match the Catalog ID defined in the first data row. 

Errors

A Product Feed Save command will fail if an invalid Catalog is specified or data does not match the header value type. 

Arguments

The Product Feed Save command supports the following arguments:

Name

Req?

Description

Argument

Command

Yes

Defines the command to use.

cmd=productfeedsave

cmd=endproductfeedsave

Delimiter

Yes

A single character field separator for raw data.  Product Feed does not recognize quotation marks as data enclosures. Because commas are common characters within data, it is not recommended to use comma as a separator.

Supported delimiters include:

  • Tab (\t)
  • Comma
  • Pipe (|)
  • Caret (^)

delimiter=[single character]

RECOMMENDED == |

Header

Yes

Product Feed data field names.  See field naming conventions and data types above.

[delimited field names]

Data

Yes

Product Feed data.  Catalog must exist.  Only import into one Catalog per import file.

[delimited fields]

Feature released in v15.14.00.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Powered by Zendesk