In the Shopranos platform, you can create your own custom data feeds by navigating to Feeder Transformations. This feature allows you to define a custom feed by manipulating the product data loaded by the system. The system provides access to a products variable, which contains all product data. You can use this data to generate a custom feed by populating a result variable with the desired output format.Example Scenario#
Below is an example scenario where the product data is transformed into an XML format:Additional Functions:#
You can also call the following functions to retrieve additional information:_getUnits(): Retrieves unit information.
_getCategories(): Retrieves category information.
_getBrands(): Retrieves brand information.
These functions can be integrated into your custom feed to enrich the data further.Escaping XML values:#
xmlEscape(value) is available to every transformation. It returns the value as a string with &, <, >, " and ' escaped, and with characters that are not allowed in XML 1.0 (such as control characters) removed. null and undefined return an empty string.Prefer it over chains of .replace() calls: it is faster and allocates far less memory on large catalogs.Large catalogs: per-product output:#
Building the whole feed in a single result string works for most catalogs. For large catalogs, define a feedItem function instead and the platform calls it once per product, writing each returned value straight to the feed:feedHeader() and feedFooter() are optional and are written before and after the products.
feedItem(product, index) receives each product in order, with its zero-based index.
Top-level code still runs first, so lookups built from products, _getCategories() and the other functions can be prepared once and reused inside feedItem.
When feedItem is defined, result is ignored.
Each function call has its own time and statement limits, and the whole run is limited to 10 minutes.
Key Points:#
Custom Feed Creation: You can fully customize the output of your feed by manipulating the products data and storing the final output in the result variable, or by returning it per product from feedItem.
XML Generation: The example provided demonstrates how to transform product data into an XML structure. Use xmlEscape() for values that may contain markup characters.
Data Enrichment: Use additional functions like _getUnits(), _getCategories(), and _getBrands() to enhance your feed with relevant information.
Memory: A transformation may keep a limited amount of data in memory. Keep large intermediate structures to a minimum, and use per-product output for large catalogs.
Modified at 2026-10-09 09:09:45