Update or Close Sales Orders That Remain Open
Close an order line that remains open when it should be closed.
Order Management closes each order 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 order line is still open.
If you haven't run the Update or Close Sales Orders scheduled process since Order Management closed the order line, then the Order Management work area might display sales orders and order lines as open even if it closed all the order lines that these orders and lines reference. You can run the scheduled process to fix this problem.
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 must also run the process every day for the 2021 fiscal year, and run the process after the call center closes.
-
Verify that the orchestration process successfully finished processing the order line.
-
Go to the Order Management work area, search for, and open your sales order.
-
Verify that the Line Status attribute on the order line contains Closed.
-
Click the value in the Orchestration Process Number attribute on the order line, 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.
-
- 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 Get the Privileges That You Need to Implement Order Management.
- Enable the profile options that you need to use the latest version of the scheduled process. See Close Sales Orders That Remain Open.
-
Go to the Scheduled Processes work area.
-
On the Scheduled Process page, click Actions > Schedule New Process.
-
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
-
Click OK > OK.
-
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.
-
In the Process Details dialog, set the parameter values to meet your needs. See Close Sales Orders That Remain Open.
For important details, see Guidelines for Using Scheduled Processes in Order Management.
-
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
-
Click Submit.
Guidelines
-
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 draft order line and uses them to update attributes on the submitted order line.
These attribute names are slightly different in your business rules and web service payloads.
Order Line Attribute |
Submitted Order Line Attribute |
---|---|
ShippedQty |
SumShippedQty |
RmaDeliveredQty |
SumRmaDeliveredQty |
FulfilledQty |
SumFulfilledQty |
ActualShipDate |
MaxActualShipDate |
ScheduleShipDate |
MaxScheduleShipDate |
FulfillmentDate |
MaxFulfillmentDate |
Guidelines to Set Your Dates and Intervals
- From Creation Date and To Creation Date
- Only the From Creation Date
- Only the Interval
- 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.
For example:
Parameter |
Description |
---|---|
Entity Name |
Enter the text
For this example, enter |
Entity ID |
To process one:
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.
For example, if you set Header as the entity, and if you set:
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. |
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';