Update or Close Fulfillment Lines That Remain Open

Close a fulfillment line that remains open when it should be closed.

Order Management closes each fulfillment line when it finishes all orchestration process steps of the orchestration process. In some situations, a step might indicate that fulfillment is done, such as shipping is done for a shipping step. The indicator might mean your organization considers fulfillment done when the orchestration process reaches this step, but the fulfillment line is still open.

If you haven't run the Update or Close Sales Orders scheduled process since Order Management closed the fulfillment line, then the Order Management work area might display sales orders and order lines as open even if it closed all the fulfillment lines that these orders and lines reference. You can run the scheduled process to fix this problem.

  • We recommend that you set up the scheduled process so it runs automatically according to a schedule, such as every 12 hours.

  • The scheduled process also updates the status on the order header.

  • The scheduled process updates the SHIPPED_QUANTITY, SCHEDULE_SHIP_DATE, and ACTUAL_SHIP_DATE columns in the DOO_LINES_ALL table. If you don't run the process, then the status on the order line might display as Closed in the Order Management work area but as Open in DOO_LINES_ALL, or the Scheduled Ship Date on the line might contain a value in the work area but not in DOO_LINES_ALL.

  • If you don't run the scheduled process, then the data that you use in various integrations, such as reports and analytics, might not reflect the latest changes that you see in the Order Management work area.

  • Make sure all instances of the Update or Close Sales Orders scheduled process are currently in the Succeeded status or the Error status. If you find a process that isn't in one of these statuses, such as Retrying, then you must wait for that instance to finish before you start a new instance.
  • If you encounter a problem, try running the process without a value in the Interval Hours parameter.

The scheduled process updates the order status depending on the order line status.

Order Line Status

What the Process Does

All lines in the sales order are in the Canceled status.

Sets the order status to Canceled.

At least one line in order is in the Closed status and all other lines are in the Canceled or Closed status.

Sets the order status to Closed.

The scheduled process gets attribute values from the fulfillment line and uses them to update attributes on the order line.

Order Line Attribute

Fulfillment Line Attribute

Shipped Quantity

Shipped Quantity

Delivered Quantity

Delivered Quantity

Fulfilled Quantity

Fulfilled Quantity

Actual Ship Date

Actual Ship Date

Scheduled Ship Date

Scheduled Ship Date

Fulfillment Date

Fulfillment Date

These attribute names are slightly different in your business rules and web service payloads.

Order Line Attribute

Fulfillment Line Attribute

ShippedQty

SumShippedQty

RmaDeliveredQty

SumRmaDeliveredQty

FulfilledQty

SumFulfilledQty

ActualShipDate

MaxActualShipDate

ScheduleShipDate

MaxScheduleShipDate

FulfillmentDate

MaxFulfillmentDate

Try It

Assume you administer a call center that's open 9 AM to 5 PM, and you must process all order headers that Order Management creates during the open hours. You also must run the process every day for the 2021 fiscal year, and run the process after the call center closes.

  1. Verify that the orchestration process successfully finished processing the fulfillment line.

    • Go to the Order Management work area, search for, and open your sales order.

    • On the Overview page, click Actions > Switch to Fulfillment View.

    • Click the Fulfillment Lines tab.

    • In the Fulfillment Line Details area, on the General tab, verify that the Status attribute contains Closed.

    • Click the value in the Orchestration Process Number attribute, such as 300100541247223.

    • On the Orchestration Process page, in the Orchestration Plan area, verify that the last row in the Task Progress column contains a green check mark.

  2. Sign into Oracle Applications with the credentials that you need to run the scheduled process.
    Credential Value
    Job role Order Manager (ORA_DOO_ORDER_MANAGER_JOB
    Privilege Plan Orchestration Processes (DOO_PLAN_ORCHESTRATION_PROCESSES_PRIV)
    Duty Role Orchestration Order Management (ORA_DOO_ORCHESTRATION_ORDER_MANAGEMENT_DUTY)

    This topic uses predefined job roles. You must create your own job roles, depending on your security requirements. For details, see Privileges That You Need to Implement Order Management.

  3. Go to the Scheduled Processes work area.

  4. On the Scheduled Process page, click Actions > Schedule New Process.

  5. In the Schedule New Process dialog, click the down arrow, click Search, then search for the value.

    Parameter

    Value

    Name

    Update or Close Sales Orders

  6. Click OK > OK.

  7. Make sure at least one sales order is open and that it meets the values that you set in the next step. If no sales order meets the criteria that you set, then the process might return an error.

  8. In the Process Details dialog, set the values.

    Parameter

    Description

    Entity Name

    Enter the text Header or Line:

    • Header. For sales order.

    • Line. For order line.

    For this example, enter Header.

    Entity ID

    To process one:

    • Order header, enter the ID for the order header.

    • Order line, enter the ID for the order line.

    If you don't enter a From Creation Date, To Creation Date, or interval hours, then you must enter an entity ID. You can run a query to get the entity ID.

    For this example, leave Entity ID empty.

    From Creation Date and To Creation Date

    Use From Creation Date and To Creation Date to specify the time period to consider when updating or closing the entity.

    • From Creation Date. Specify the earliest time and date when Order Management created the entity.

    • To Creation Date. Specify the latest time and date when Order Management created the entity.

    For example, if you set Header as the entity, and if you set:

    • Noon yesterday as the From Creation Date, and 4 PM yesterday as the To Creation Date, then the scheduled process will update all the order headers that Order Management created yesterday on or after Noon and on or before 4 PM.

    • Noon yesterday as the From Creation Date but don't specify the To Creation Date, then the scheduled process will update all order headers that Order Management created on or after Noon yesterday up to the current time.

    If you enter interval hours, then don't enter a From Creation Date or To Creation Date.

    For this example, leave these attributes empty.

    Interval Hours

    Period of time in hours to count backward from the time when the process starts. The scheduled processes uses this interval to identify the entities that it processes.

    For example, if you enter 8 for interval hours, and if you enter Header, and if you leave all other attributes empty, then the scheduled process will process all the entities that Order Management created in the eight hours immediately before you click Submit.

    For this example, enter 10 in the Interval. The call center is open 9 to 5, which is 8 hours. You will set the scheduled process to start at 5:30 so the Order Entry Specialists can finish creating any sales orders that they're currently adding. Using 10 as the interval will pick up these sales orders, and also any sales orders that you create after 7:30 AM.

    All parameters are optional except for Entity Name.

    For important details, see Guidelines for Using Scheduled Processes in Order Management.

  9. Click Advanced > Using a Schedule, then set the values.

    Attribute

    Value

    Frequency

    Daily

    Every

    1 Day

    From Creation Date

    1/1/21 5:30 PM

    To Creation Date

    12/31/21 5:30 PM

  10. Click Submit.

Guidelines to Set Your Dates and Intervals

You can use these combinations:
  • From Creation Date and To Creation Date
  • Only the From Creation Date
  • Only the Interval
You can't use only the:
  • From Creation Date and the Interval
  • To Creation Date and the Interval
  • To Creation Date

You can't leave From Creation Date, and To Creation Date, and the Interval empty.

If you don't follow these guidelines, you can still submit the scheduled process, but it will fail.

Query to Get the Entity ID

Here's some SQL that you can use to get the entity Id.

SELECT DISTINCT
lines.line_id,
lines.creation_date,
lines.header_id
FROM
fusion.doo_process_instances pi,
fusion.doo_orchestration_groups og,
fusion.doo_lines_all lines
WHERE
og.doo_process_instance_id = pi.doo_process_instance_id
AND og.status = 'ACTIVE'
AND og.line_id = lines.line_id
AND pi.process_active IN (
'COMPLETED',
'INACTIVE'
)
AND lines.open_flag = 'Y'
AND lines.header_id IN (
SELECT
nvl(header_id, 0)
FROM
doo_headers_all
WHERE
creation_date BETWEEN :currstartdate AND :currenddate
)
UNION
SELECT DISTINCT
lines.line_id,
lines.creation_date,
lines.header_id
FROM
fusion.doo_lines_all lines,
fusion.doo_fulfill_lines_all flines
WHERE
lines.line_id = flines.line_id
AND lines.open_flag = 'Y'
AND flines.canceled_flag = 'Y'
AND flines.open_flag = 'N'
AND lines.header_id IN (
SELECT
nvl(header_id, 0)
FROM
doo_headers_all
WHERE
creation_date BETWEEN :currstartdate AND :currenddate
)

=========
HeaderWithCompletedProcessInstancesVO
---------------------

SELECT DISTINCT
headers.header_id,
headers.creation_date
FROM
doo_process_instances pi,
doo_orchestration_groups og,
doo_headers_all headers
WHERE
og.doo_process_instance_id = pi.doo_process_instance_id
AND og.status = 'ACTIVE'
AND og.header_id = headers.header_id
AND headers.open_flag = 'Y'
AND pi.process_active IN (
'COMPLETED',
'INACTIVE'
)
UNION
SELECT DISTINCT
headers.header_id,
headers.creation_date
FROM
doo_lines_all lines,
doo_headers_all headers
WHERE
headers.open_flag = 'Y'
AND headers.header_id = lines.header_id
AND lines.canceled_flag = 'Y';