This document deals with the intentions and concepts behind the order export. Orders can be exported in many ways regarding the export format as well as the technology. Exported orders are transmitted to or imported by 3rd party systems. Furthermore, the data that needs to be exported may differ among different customer deployments. This way, Intershop 7 provides a full-featured order export out of the box. An administrator should consider the contents of the present document rather as a blueprint of how customized export scenarios may be realized. So the Intershop 7 order export is referred to as an order export reference implementation in the further course of this document.
Intershop 7 uses the following functional components for order export:
With Intershop 7 complete orders can be exported, but, in contrast to previous ES6.x versions, not (re-)imported in Intershop 7 for the following reasons:
Therefore, in Intershop 7 there is an export of complete order data and an import of status value updates.
Using the Data Push Services Framework and Order Export Framework mentioned above, various export/import formats and targets can be implemented. Examples are the services Order XML Export and Order Submission.
Note
Basically, all data can be exported that are retrievable by accessing methods of related business objects and their extensions. It has to be noted that not all data, like certain product information of order line items, has to exist at the time the order export is triggered. Product information might be changed, or products might be removed in the meantime.
The order export framework provided by the cartridge bc_order_impex consists of the following steps (see diagram above):
Automatic status updates for orders and order line items can be configured to keep track of failed exports and completed or canceled orders which were exported. It can also be used to trigger a new order to become in progress.
Note
An updated status which was set during export does not refer to the exported data and will, therefore, only be visible in the system. If another export would be performed afterwards, the exported data would then contain the previous status updates.
The transition from new to exported upon export is enabled by default.
In case of status updates being enabled, the order export job supports the storage of the reason for a failed export. A reason is comprised of a reason code and a more detailed description. Both are set together with the status when it changes to state EXPORTFAILED. The reason is only displayed in the order details page of the Intershop 7 Commerce Management.
In order to use the feature, the exception causing an export to fail must be wrapped by or inherit from com.intershop.component.orderimpex.capi.export.order.OrderExportServiceException
. All other exceptions (e.g., invalid order, Input/Output exception) lead to a termination of the export of this order.
The configuration of the reason codes and their localizations are stored in the database. The involved tables - these are STATEDEFINITION
, STATEINFORMATION
and STATEINFORMATION_AV
- are initialized during the DBInit using the preparer com.intershop.beehive.bts.dbinit.preparer.state.PrepareStateDefinitions
.
Note
Class1 = com.intershop.beehive.bts.dbinit.preparer.state.PrepareStateDefinitions \ sample.order.dbinit.data.StateDefinition \ sample.order.dbinit.data.StateInformation
################################################# # Order status reason codes # ################################################# OrderStatusReason;1000=DUPLICATE OrderStatusReason;1100=INVALID_ARTICLE
################################################# # Order status reason codes # ################################################# OrderStatusReason;1000=due to a duplicate order ID OrderStatusReason;1100=order contains invalid data