Basic Order Management Integration Framework

Certain system pipelines and API objects, along with the Gillian cartridge, available in the Salesforce Commerce Cloud community on GitHub, enable you to integrate automated order routing and payment processing capabilities into Salesforce B2C Commerce. You create the business logic that uses the objects.

Note: Most of the functionality described in this topic is not available in most implementations.

You can use this functionality to:

  • Create and export ShippingOrders
  • Use an import to update the status of ShippingOrders

    When an error exists in an import file, the shipping order or the return imports fail. A file is created, using the original file name with a .BAD extension. You can fix the error in the order import, rename the file with the original .xml extension, and then rerun the import. Properties unknown to the import specification (XSD) are not included in the .BAD files; however, custom properties are included.

  • Capture or refund payments
  • Provide a self-service return merchandise authorization (RMA) and refund items once received
  • Support partial delivery and capture based on either B2C Commerce inventory tables or an external inventory

Select site > Merchant Tools > Ordering > Orders > order. Track changes made by custom jobs or imports on shipping orders, invoices, or returns by clicking the Shipping Orders, Invoices, or Returns tabs, respectively. The information on these tabs is read-only. The tabs only appear when an order contains a shipping order, invoice, or return.

Pipelines

The GillianJobs pipeline contains CreateShippingOrders, ImportReturn, and UpdateShippingOrders. You set up system job schedules to call the GillianJobs pipeline by selecting Administration > Operations > Schedules . Configure the schedules with an Execution Scope of Sites (click Sites), with scheduled execution from between once every 30 minutes to once every 2 hours.

API Objects

Use the following API objects to customize your order management processes:

API object Description
ShippingOrder Group of items that are shipped together. The content of a ShippingOrder is a subset of items of one dw.order.Shipment, and depends on inventory and custom code extensions such as warehouse optimization and dropship settings. Due to ShippingOrder update feeds, certain items of a ShippingOrder can be marked as shipped, canceled, or warehouse.
TrackingInfo TrackingInfo: contains a tracking#, shipping date, and carrier name, by default. You can also add custom attributes, for example, a tracking link. You can now link all shipped items of a ShippingOrder to one or more tracking details by calling the addTrackingRef method in ShippingOrderItem. This associates a shipped item with one or more TrackingInfos.
Invoice Monetary representation of either a ShippingOrder, Return, or Appeasement. It's the base of any payment transaction (capture / refund).
ReturnCase Abstraction of an RMA. Every return without a ReturnCase reference is assigned to a new ReturnCase.
Return Container of items that were returned to the merchant. Depending on custom code implementations, certain actions such as a refund or an even exchange can be done.

Import

The file naming pattern for the import feeds for shipping order updates is:

{Impex}/src/feeds/shippingorder/shipping_order_update_feed_SiteGenesis_20131101141905769_23.xml

For the return import, the file naming pattern is:

{Impex}/src/feeds/return/return_import_feed_SiteGenesis_20131101141905768_11.xml

Appended to the file name are:

  • The timestamp, precise to milliseconds
  • An underscore
  • An arbitrary number that represents a feed ID

Export

When running a ShippingOrder export, you can define an XML structure of your own. Exports are handled in the sample code of createShippingOrder.ds.

In the Gillian sample script that creates shipping orders, a new shipping order is exported to a file. The export includes shipping order items, such as option and bundle items, in a hierarchical structure, with reference between the parent and child items. A new item type attribute enables you to specify the child or parent type, as follows:

  • PRODUCT
  • OPTION
  • BUNDLED_PRODUCT