Document Tree
Document Properties
Kbid
2G5870
Last Modified
15-Feb-2023
Added to KB
18-Jul-2014
Public Access
Everyone
Status
Online
Doc Type
Concepts
Product
  • ICM 7.10
  • ICM 11
  • ICM 12
Concept - Order XML Export

Introduction

This document deals with the intentions and concepts behind the file based order export to the XML format. The XML files with the exported orders are transmitted to 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 content 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 concepts of the Order Export Framework to provide the file based XML export that is available out-of-the box.

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. Alternatively a new, completely different order export implementation has to be developed to meet those additional requirements.

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.

References

General Workflow of Order Export


The order export consists of the following steps (see diagram above):

  1. Order export is triggered.
  2. The Data Push Services Framework starts an order export job.
    See the configuration ac_order_export_xml...services.component for details.
  3. An order search query bc_order_impex...OrderExportSearch.query searches for orders.
    The configuration is stored at the export job.
  4. A list of orders is passed to the export service.
  5. The order export service uses the OrderXMLWriter to serialize the order.
    The OrderXMLWriter uses JAXB. JAXB uses builders and binding classes to create XML. Builders are configured by the Component framework. Builders get the relevant data from the order-related business objects and their extensions.
  6. The export service writes the serialized orders to an OutputStream.
    This can be a file or a transport protocol to another system.
  7. Orders are exported.

Set Up an Order Export

Procedure

Enable the service in Organization Management Application:

  1. Log in to Commerce Management application of the organization.
  2. Select <Sales Organizations> | <Organization> | Services tab.
  3. Select the Service Group Order Export Services.
  4. Enable Local XML File Order Export.

Create the service for your organization in the ICM:

  1. Log in to your organization.
  2. Select Services.
  3. Click New.
  4. Click Order Export Services | Local XML File Order Export | Next >>.
  5. Type name and ID of your service, e.g., OrderExportService.
  6. For configuration, type a valid file location, and prefix, e.g., c:\temp\orders.

    The path should be provided as absolute path. A relative path will be interpreted as starting from the <server>\local\engine\nodemanager.

    However, there is the possibility of using space holders. Therefore, these three ICM environment variables can be used: ${IS_HOME}, ${IS_SHARE} and ${IS_TEMP}, e.g. ${IS_TEMP}\export\orders.

  7. Share and activate your service.

Create export to run:

  1. Go to Orders | Import & Export.
  2. Click New.
  3. Give your export scenario a name.
  4. Select your desired service configuration, e.g., OrderExportService which was created in the previous step.

  5. Have a look at the tabs to configure your export.
  6. Go back to Orders | Import & Export.
  7. Select your export and run it.

To repeat an export, only step 7 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.

Cartridges and Cartridge Elements

The following elements of the order export reference implementation have to be considered:

  • Business objects and their extensions representing Intershop 7's public domain API.
  • Annotated binding classes represent XML schema types.
  • Builder classes act as link between business objects and XML binding classes by mapping information from business objects to XML binding classes.
  • XSD documents representing the external order format as XML schema. The XSD is directly created from XML schema types defined as javax.xml.bind.annotation.* annotations in XML binding classes. 

Java-XML Binding

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

Extending / Changing the Export

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.

Attachments

Disclaimer
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.
Home
Knowledge Base
Product Releases
Log on to continue
This Knowledge Base document is reserved for registered customers.
Log on with your Intershop Entra ID to continue.
Write an email to supportadmin@intershop.de if you experience login issues,
or if you want to register as customer.