Skip to content

OrderFlow Magento 2 Integration Guide

OrderFlow Ltd.

Document Version: 4.2.4

Document Built: 2024-02-16

This document and its content is copyright of OrderFlow Ltd. All rights reserved.
You may not, except with our express written permission, distribute, publish or commercially exploit the content.
Any reproduction of part or all of the contents in any form is prohibited.

Product Export

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:

Magento2 Manual Product Export

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).

Bulk Reset Export Status

Magento Workflow

On Magento 2, the process of exporting a product to OrderFlow uses the following state flow:

  • An product is created, or modified.
  • The product is placed into the 'Pending' status.
  • Magento contacts OrderFlow at regular intervals to let it know that there is a new or updated product available to be retrieved.
  • The product is placed into the 'Queued' status.
  • OrderFlow makes a request to Magento via the native APIs to retrieve the product.
  • The entity is placed in the 'Exported' status.

A similar workflow applies for exporting orders to OrderFlow.

Product Export History - Magento

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

Magento2 Product Export

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:

OrderFlow Product Import

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"?>
    <import type="product" operation="merge" externalReference="wbk002c-Black-S"
        description=Black Nolita Cami-Black-S

The OrderFlow Magento extension sends the message in the native OrderFlow API format (as described in

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.