Compensate Sales Orders That Are Awaiting Shipping

The compensation pattern for the Shipping task uses Cancel and Create to substitute an item during shipping because Oracle Shipping supports only cancel and create. You can modify your compensation rule to support shipping.

If you don't use Oracle Shipping, and if your shipping system:

  • Supports Update. You don't need to modify anything.

  • Doesn't support Update. You must modify the compensation rule so it uses Cancel and Create.

Note

  • If you need different behavior, then you can write a compensation rule according to an item change. Note that business rules call the Update service for an item change.

  • Change management can only identify change to an extensible flexfield. However, you can write a compensation rule that examines the extensible flexfield segment so it can determine whether to do compensation.

Here's the rule you will create.

  • If the sales order is at the await shipping step, and if the Order Entry Specialist substituted the item, then cancel the existing request to ship, create a new request, schedule, reserve, and then send the new request to shipping.

Each shipping step and reservation step on a predefined orchestration process that integrates with shipping already use this logic. You add this logic only if you set up your own orchestration process.

Compensate sales orders that are awaiting shipping.

  1. Use the Manage Orchestration Process Definitions page to open and edit the orchestration process you must modify.

  2. In the row that ships the item, in the Compensation Pattern column, click Click for Rule, then add the rule.

Here's the code to use.

Root: DooSeededOrchestrationRules.DOOHeader
If
  header is a DooSeededOrchestrationRules.DOOHeader
  and At least one
  fline is a header/childFlines
  and fline.attributeChanged(DooSeededOrchestrationRules.IFLine.INVENTORYITEMID) is true
then
  assign header.mRuleDecision.compensationPattern = "CANCEL_CREATE"

Here's what it looks like.

Rule that compensates sales orders that are awaiting shipping