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.
If Intershop 7 has to meet additional customer-related requirements, the extension concept described later in this document can be used to export additional data. Or a new, completely different order export implementation has to be developed to meet those additional requirements.
Both, import and export functionality use XML as source/target format. However, with the Data Push Services Framework and Order Export Framework mentioned above various export/import formats and targets can be implemented.
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 consists of the following steps (see above diagram):
Enable the service in Organization Management Application:
Create the service in Organization:
Create export to run:
To repeat an export, only run is required.
Note
In the Commerce Management application you can also create an export at the channel level. Here only orders of this channel are exported.
The following elements of the order export reference implementation have to be considered:
javax.xml.bind.annotation.*
annotations in XML binding classes. (Java->XSD) - Java classes, their attributes and methods are provided with annotations that control the transformation. A corresponding XML schema can be generated with the schemagen command line tool accompanied with J2SE. Please have a look at the Cookbook - Order Export | Recipe: 3rd Party System Imports Orders Exported from IS7.
This section outlines how to extend the export by adding an additional implementation.
Have a look at ac_order_export_xml\staticfiles\cartridge\components\instances.component. Here you can see how to instantiate a builder that can have sub-builders by using the fulfill statement. In this way the XML export file is constructed.
For example: The OrderShippingDiscountsBuilderImpl
was introduced later. It should be placed in order-summary -> order-pricing -> pricing -> shipping-discounts
. The tags order-pricing -> pricing
already exist. Therefore, inside the fulfill tag of OrderExportXML-OrderPricing-Pricing
the new OrderShippingDiscountsBuilderImpl
was placed. By linking to the parent builder, you can achieve that the outer XML is left out if the inner XML is empty.
The OrderShippingDiscountsBuilderImpl
class gets a BusinessObject from the parent handler.
Use BO classes to determine data you need for this export.
The XML is represented in this case by the DiscountXML
. The outer brace is the ShippingDiscountsXML
class.
The order export job supports to store a 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 a export to fail must 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
The information provided in the Knowledge Base may not be applicable to all systems and situations. Intershop Communications will not be liable to any party for any direct or indirect damages resulting from the use of the Customer Support section of the Intershop Corporate Web site, including, without limitation, any lost profits, business interruption, loss of programs or other data on your information handling system.