Zynk Workflow Documentation

This task will update stock data for the products in Magento.



The Magento connection to use. See the Connecting to Magento article if you require more information on how to create/manage connections.

Fail File

The XML file to output failed stock level updates to.

Input File

The XML file containing the products to update stock levels for.

Success File

The XML to output successful stock level updates to.

Prevent Reprocessing

Set to true to prevent the same record being processed more than once by the task. This setting will only work where an <external_id> element is provided in the XML.

Zynk Settings

See Common Task Settings.


Sample input file, showing the product TEST with a stock level of 80:

<?xml version="1.0" encoding="utf-8"?>

Sample XSLT file to use to transform products exported from Sage in the Zynk XML Products format, to the Magento order update format. This is also available in the Auto Mapper.

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

  <xsl:output method="xml" version="1.0" encoding="utf-8" indent="yes"/>

  <xsl:template match="/">
      <xsl:for-each select="Company/Products/Product">
        <xsl:call-template name="Product" />

  <xsl:template name="Product">
      <!-- Don't allow negative stock levels -->
      <xsl:when test="(QtyInStock - QtyAllocated) > -1">
          <sku><xsl:value-of select="Sku"/></sku>
          <qty><xsl:value-of select="(QtyInStock - QtyAllocated)"/></qty>
            <xsl:call-template name="IsInStock">
              <xsl:with-param name="QtyInStock" select="QtyInStock" />
              <xsl:with-param name="QtyAllocated" select="QtyAllocated" />

  <xsl:template name="IsInStock">
    <xsl:param name="QtyInStock"/>
    <xsl:param name="QtyAllocated"/>
      <xsl:when test="($QtyInStock - $QtyAllocated) > 0">1</xsl:when>


Back | Edit on Github