Keep Your Order Number When You Import

Control how Order Management sets the order number when you import a source order.

Use this order profile:

Profile Option Code

Value

DOO_RT_USE_ORDER_NUMBER

Select one:

  • Y. Order Management will use the number that you import from your source system as the order number. Order Management will display the number that you import throughout the Order Management work area after transformation and during order fulfillment.

  • N. Order Management won't use the number from your system, but will instead create and assign a new order number for the order that you import.

    The default value is N.

You can use this order profile only for a single site.

For more, see Use Order Profiles to Control Order Management Behavior

.

Use the Number From Your Source System

For example, you might want to use an entirely different set of identifying numbers for your sales orders. Assume you use your source system to log service requests from your customers, and then import each request into Order Management where you can manage it as a sales order. You don't want to use Order Management's order numbers, but instead want to use the service request number as the order number in Order Management. Assume you need to import service request 76546286. Here's how you can meet that requirement:

  1. Set DOO_RT_USE_ORDER_NUMBER to Y.
  2. Include 76546286 in the SourceOrderNumber attribute in your import payload.
  3. Import your source orders.

During import, Order Management will set the sales order's Order Number attribute to 76546286, and will use 76546286 as the order number throughout fulfillment.

Don't Use the Number From Your Source System

If you set DOO_RT_USE_ORDER_NUMBER to N, then Order Management doesn't use your source order number as the order number during or after transformation.

  • Order Management will assign a new order number for the source order and display the new number throughout the Order Management work area after transformation and during order fulfillment.

  • Order Management creates a unique number for each sales order that you create in the Order Management work area, and each of these orders use Order Orchestration and Planning (OPS) as the source system.

    If you use OPS as your source system, and you if set DOO_RT_USE_ORDER_NUMBER to Y, then a conflict might happen between order numbers.

    For example, your source system might create a source order with order number 543865, and an order that you create in the Order Management work area might also use order number 543865. You must make sure these order numbers are unique. For example, use a value for your source order number that isn't numeric, or add a prefix or suffix to the number, such as src_543865.

If the source order number in the source order that you import from the source system isn't unique in the source system, then you must set this profile to N. This is necessary to avoid an error when you import orders because Order Management requires a unique order number for each sales order in the same source system. For example, if source system A contains:

  • Two source orders that each use order number 12345, then set DOO_RT_USE_ORDER_NUMBER to N.
  • One source order that uses order number 12345, and if source system B contains one source order that uses order number 12345, then you can set DOO_RT_USE_ORDER_NUMBER to Y or N.

Integrate with Accounts Receivable

You might encounter a situation where the order number in Accounts Receivable isn't the same as the order number in Order Management. This might cause problems, such as when you do AutoInvoice during file-based data import in Accounts Receivable.

Order Management uses the RA_INTERFACE_LINES_ALL table to integrate with Accounts Receivable.

Order Management uses the ORDER_NUMBER column and SOURCE_ORDER_NUMBER column on the DOO_HEADERS_ALL table to populate columns in RA_INTERFACE_LINES_ALL.

Column in RA_INTERFACE_LINES_ALL

What Does it Store

INTERFACE_LINE_ATTRIBUTE1

SOURCE_ORDER_NUMBER

INTERFACE_LINE_ATTRIBUTE3

ORDER_NUMBER

SALES_ORDER

SOURCE_ORDER_NUMBER

Order Management sets the ORDER_NUMBER and SOURCE_ORDER_NUMBER in the DOO_HEADERS table to the same value that it uses in the Order Management work area.

However, if the values that you import are different than what Order Management uses, then you have two choices to make sure you use the same order number in Order Management and in Accounts Receivable:

  • Set the DOO_RT_USE_ORDER_NUMBER profile to Y, and Order Management will set ORDER_NUMBER to the same value that SOURCE_ORDER_NUMBER contains.

  • Use a document sequence to set the value in ORDER_NUMBER. For details, see Set Up Sequences for Sales Order Numbers.

Answers to Some of Your Questions About Sales Order Numbers

  • You can't use different order number sequences for different order types or different source systems. For example, you can't use sales orders 1000 through 10000 for order type A, and sales orders 10001 through 20000 for type B.

  • Order Management creates order numbers from a database sequence that makes sure order numbers are unique, but the sequence might contain gaps because of caching and other processing anomalies. You can't change this behavior.

  • You can't assign an order number from one draft order to another draft order, even if you delete the original draft because deleting the draft will result in gaps in the order number sequence. Order Management assigns the order number for a draft order and the order details in the DOO_HEADERS_ALL table. If you delete the draft, then Order Management also deletes the entry for the draft from DOO_HEADERS_ALL.

You can use this SQL to identify the line numbers that Order Management assigned to an order line and the fulfillment line:

SELECT  dha.header_id            ,
       dha.order_number         ,
       dha.source_order_number  ,
       dha.submitted_flag,
       dla.line_number          ,
       dla.SOURCE_LINE_NUMBER   ,
       dla.SOURCE_LINE_ID,
       dla. DISPLAY_LINE_NUMBER ,
       dfla.SOURCE_LINE_NUMBER  ,
       dfla.fulfill_line_number
FROM    fusion.doo_headers_All dha,
       fusion.doo_lines_all dla  ,
       Fusion.doo_fulfill_lines_all dfla
WHERE   dha.source_order_number in ('&SOURCE_ORDER1','&SOURCE_ORDER2')
       AND dla.header_id       = dha.header_id
       AND dfla.line_id        = dla.line_id
--and submitted_flag = 'Y'
order by dha.SOURCE_ORDER_NUMBER , dla.LINE_NUMBER

Validate Your Source Order Numbers

If you enable the DOO_RT_USE_ORDER_NUMBER order profile, then the predefined DOO_VALIDATE_DUPLICATE_SOURCE_ORDER constraint looks at the value in the Source Transaction Number attribute in your import payload and makes sure it doesn't already exist in the Oracle database. If the value already exists, then the constraint prevents you from importing the fulfillment line. It does this to prevent a situation where you might import the same source order number from different source systems. Having the same number might result in lines that are awaiting shipping in Order Management, but Oracle Shipping can't view all of them because there's a conflict in the data.

DOO_VALIDATE_DUPLICATE_SOURCE_ORDER comes predefined as enabled. If DOO_RT_USE_ORDER_NUMBER is enabled, then we recommend you make sure DOO_VALIDATE_DUPLICATE_SOURCE_ORDER is also enabled. You will need to make sure that each order number you import is unique across all source systems.

Order Management uses this constraint only with Oracle Shipping and when you set the DOO_RT_USE_ORDER profile to Y. If you're using some other shipping system, and if you set DOO_RT_USE_ORDER to N, then you must disable the DOO_VALIDATE_DUPLICATE_SOURCE_ORDER constraint.