Product Export

With the module successfully installed, this section describes how to use the OrderFlow Magento extension.

It describes how the extension functionality can be applied, both manually and automatically. It also describes how the automatic options can be monitored.

The explanations below assume that the module has been enabled, that job scheduling functionality described in Magento Configuration has been turned on.

Export Types

The module supports three flavours of product export.

implicit: When a change is made to a product it is queued to be exported to OrderFlow

manual: the product export can be triggered manually from the catalog product grid.

bulk: All products marked as ‘pending’ under the Export Status will be picked up by the cron to export

We’ll go through each of these actions in turn.

Implicit product export is automatically triggered when a products properties are changed. This switches the products rxport status back to ‘Pending’

Manual product export can be triggered from the Magento Admin Panel Products -> Catalog grid, using the ‘Export’ under the action column, as shown below:

_images/mage2-manual-product-export.png

Bulk product exports are triggered by the cron running, this will pick up all products that are marked as pending and notify OrderFlow. To reset all products to the pending state select all products and then from the drop down menu select Reset Export Status (OF).

_images/bulk-reset-export-status.png

Product Export History - Magento

The history of product exports is available from the System -> OrderFlow Exports -> Product menu.

_images/mage2-product-export.png

The summary product export admin grid includes an Export ID, Message ID, the returned responses (Successes, Duplicates, Failures) and the ability to view requests in detail.

The detail product export form repeats the summary information, as well as letting you view the Export Lines details. Depending on log cleaning settings within the configuration, details on the raw requests and response XML are available from this screen.

Product Import History - OrderFlow

The history of product imports can also be seen in OrderFlow in the Import -> History -> Batches menu, filtered by the Entity ‘Product’, as shown below:

_images/orderflow-product-import.png

Testing the Product Export

This section describes a simple end to end step for verifying the connectivity of the module as well as the product export process. It assumes that there are simple product definitions present in the Magento catalog.

From the Magento Admin Panel Products > Catalog menu, select a simple product by clicking its ‘select’ button under the Action column. Select ‘Export’ menu item.

If successful, you will see this message:

Product xxxxx has been queued for export to OrderFlow.

Next, navigate within OrderFlow to the Import > History > Batches menu. The first entry in the list will be the most recent import. Click on it and you should see the Import batch details and below, the message received from Magento. An example message text receipt may look as follows.

<?xml version="1.0" encoding="UTF-8"?>
<imports>
    <import type="product" operation="merge" externalReference="wbk002c-Black-S"
        <![CDATA[externalReference=wbk002c-Black-S
        description=Black Nolita Cami-Black-S
        weight=10
        priceNet=25.89
        sellable=1
        priceGross=25.89
        magentoType=simple]]>
    </import>
</imports>

The OrderFlow Magento extension sends the message in the native OrderFlow API format (as described in http://www.realtimedespatch.co.uk/documentation).

If the product existed in OrderFlow before the message arrived, the product information will have been merged into the existing record. If it did not exist, the new product definition will have been created.

The next step is to find the product in using the OrderFlow product search.

Take a note of the product externalReference, then go to Inventory > Products > Search, and enter the externalReference in the Product Code field. Set the Active dropdown to blank and click on the ‘Search’ button. You should see the product that has just been imported in the search results list. Click on it to see more information. Selecting the magnifier next to Created will take you to the import record last used to update the import definition.

Note: a product imported into OrderFlow will not necessarily be set to activated by default, it will be inactive until all the conditions defined using the system property product.activation.required.fields are met.