How to auto generate product feed from event data

You are here:
Estimated reading time: 1 min

Our system is able to generate product feed and reuse it across the services using event data. By default we cater to ecommerce companies, although this works with any kind of data feed (for example blog posts).

Default attributes our system is automatically able to work with:

  • idInShop
  • url
  • title
  • stock
  • main
  • image
  • price
  • discountPrice
  • category

Where the bold ones are always required.

If you do not have a product feed according to our documentation you will be able to generate this feed from sending data along with the events.

Events considered for reading data, when you enable auto feed generation:

  • viewitem, addtocart, addtowishlist when there is an item_data object sent along with their data
        "title": "Example item", 
        "category": [{"name":"unique_id_of_category", "title":"Category title"}]
  • viewcategory when there is a category_data object sent along with the event
        "title": "This is our category",

Important considerations:

  • idInShop for item and name for category are being cleaned (lower cased, trimmed and white space replaced with _)
  • items being pushed from events are being considered as active. You can not set nor update active flag on those.
  • url and image are validated to match your account domain and to be valid URLs
  • length of any text field can not exceed 250 characters.
  • any text field gets tabs and new lines removed
  • attribute names
    • must have between 3 and 50 characters,
    • must start with a small caps letter (a-z)
    • could only contain the following characters: a-z A-Z 0-9 _

Account config

By default, this feature is disabled. In order to enable it you will need to do it from Setup->Product feed.

There are 2 input fields to configure what attributes will be considering to insert a new product and what are the ones considered for updating a product.

Only those attributes will be saved/updated and nothing else that you sent along with the event data.

The prefix for image and url is needed to validate incoming attributes. If you leave it empty it will allow and image or url to be saved. Note the risk of someone hacking the product data with external urls!

Was this article helpful?
Dislike 0
Views: 26