Order Export

Components & Concept

Please refer to Order Workflow for technical insights.

Once this feature is enabled (configurable) an export pipeline will be created for each order, which matches the filter conditions (configurable). Depending on the following settings the pipeline contains 2, 3 or 4 steps.

Step Description

transform

This step transforms the Magento order into a target format.

transport

This step transports the transformed order to the target destination.

handle_response

This step exists, if a response handler is configured. It is designed to handle async responses from ERP/OMS.

handle_notification

This step exists, if a notification handler is configured. This step can be used to send a order confirmation mail after the ERP/OMS accepts the order.

The configurations for the order export can be done in Magento’s admin UI Stores > Configuration > Pacemaker > Order Workflow

Configuration

General Settings

order export export settings
Figure 1. Order Export Settings
Configuration Description Default Value

Enable Order Export

Feature toggle for the whole export pipeline.

No

Filter Conditions

This mapping grid allows to define conditions, when an order should be exported. It is a combination of payment method and order status. Once one of the defined conditions matches the order the export pipeline will be triggered for this order. Leave the configuration grid blank to export all orders without filtering.

payment method: any | status: processing

Export Format

order export export format
Figure 2. Order Export Format
Configuration Description Default Value

Export Format

This setting defines, which formater should be used to transform the order to the target format. The formats are extendable, please refer to Add custom export format chapter for details. By default there is the Custom Template formater available.

Custom Template

Export Template

This option appears if the value Custom Template is chosen for Export Format. Here you can create a template for the target order format by using the twig templating syntax. Please refer to Twig Documentation. The only variable, which is passed to the renderer is order, which is an instance of the Magento’s OrderInterface

Transport Adapter

order export transport adapter
Figure 3. Transport Adapter
Configuration Description Default Value

Transport Adapter

This setting defines, which adapter should be used to transport the order to the target destination. The adapters are extendable, please refer to Add custom transport adapter chapter for details. By default there is the Local Filesystem adapter available.

Local Filesystem

Local Filesystem Target Directory

This option appears if the value Local Filesystem is chosen for Transport Adapter. Here you can specify the target destination within the filesystem. The path can be absolute or relative to the Magento root directory.

var/pacemaker/export

Local Filesystem Filename Pattern

This option appears if the value Local Filesystem is chosen for Transport Adapter. Here you can specify the naming of the export file. There are following placeholders available: INCREMENT_ID, ENTITY_ID, WEBSITE_CODE, STORE_CODE#

order-INCREMENT_ID.json

Response Handler

order export response handler
Figure 4. Response Handler
Configuration Description Default Value

Response Handler

This setting defines, which handler should be used to handle the response from the target system. This handler is optional. If No response handler is chosen, there will no corresponding step be spawned within the export pipeline. The handlers are extendable, please refer to Add custom response handler chapter for details. By default there is the Default JSON adapter available.

No response handler

JSON Response Source Directory

This option appears if the value Default JSON is chosen for Response Handler. Here you can specify the target directory, which should be observed for response files.

var/pacemaker/import

JSON Response Filename Pattern

This option appears if the value Default JSON is chosen for Response Handler. Here you can specify the naming of the response file.

order-update-INCREMENT_ID.json

Notification Handler

order export notification handler
Figure 5. Notification Handler
Configuration Description Default Value

Notification Handler

This setting defines, which handler should be used to handle the notification step, which is the last step in the pipeline. This handler is optional. If No notification handler is chosen, there will no corresponding step be spawned within the export pipeline. The handlers are extendable, please refer to Add custom notification handler chapter for details. By default there is the Default JSON adapter available.

No notification handler

Disable Default Order Confirmation E-mails

If you want notify customer about a successful purchase after this sale was approved from the ERP/OMS, you probably want to disable the default order confirmation mail.

No