Background: Order Import

Use the Order Import (EPI) program to import sales orders from an ASCII file. See Road Map for work flow. Optionally, EDI orders can be automatically processed. See Set EDI Drop File Parameters. If the drop file process is used, orders that are imported without errors are automatically transferred to live sales orders.

This topic has these subtopics:

Why Use a Native Disc
Import Process
Validation

EDI Order Log

ASCII File Format

Order Cancellation
Configured Products

 

Why Use a Native Disc

The file you import data from can reside on your PC (or network) or on a native disc.

  • Importing from a native disc is much faster since it the data does not have to be read on the PC and then transferred

  • Import files residing on your PC (or network) are limited to 512-characters

Import Process

The import process consists of these steps:

  1. Run the Order Import program to read the ASCII file and copy its contents into a temporary work file that is a mirror of the sales order file.

    The program validates the format of the ASCII file and writes the EDI Order Log. This log reports the order number that the system assigned and any error messages. The program prints to your default output device. Run the EDI Order Log (EPILG) program if you want to select a different output device.

    If deposit records are included in the batch with a deposit number of "NEW" a cash deposit is processed prior to the order being created. This allows for the EDI process to fully identify deposits associated with an EDI order entry process. A normal cash deposit batch is processed with all the associated logs and updates. The order batch is then processed with the deposit data.

    Order Import completes header and line fields that are not included in the ASCII file. For header fields, the program obtains default data from the customer's record in the Customer Maintenance (CM) program, or from the Customer Ship-to Maintenance (CSM) program if you included a ship-to number. For line fields, the program checks the item's records in the Enterprise Item Maintenance (IM) and Branch Item Maintenance (IMB) programs.

    A successful import creates an offline sales order. If there are errors, the system places the order on hold.

    If you selected the Erase import file when done option, the program erases the ASCII file to prevent reprocessing it.

  1. Review the EDI Order Log.

  2. Run the EDI/Sales Quote Maintenance (QOE) program to maintain the order. This program is similar to Sales Order Maintenance (OE). You can change header and line fields. You can add and delete lines. You cannot obligate items, create a shipment, or cancel an order because the order is still in a temporary work file and not yet an online order.

    The system places an order that has an error on non-credit hold. After you fix the error, you must release the order from hold before you can transfer it to an online sales order.

    If a customer deposit is less than the deposit amount recorded in the EDI file, the system places the order on credit hold.

    If “deposit” records are included in the batch with a deposit number of “NEW” a cash deposit is processed prior to the order being created.   This allows for the EDI process to fully identify deposits associated with an EDI order entry process.  A normal cash deposit batch is processed with all the associated logs and updates.  The order batch is then processed with the deposit data.

  1. Run the Quote-to-Order Transfer (EPIB) program to process sales quotes and imported orders to create sales orders.

    The program creates the EPI Transfer Log, which you should print. If a log file already exists, you will be asked whether you want to print the existing report. If you choose not to print the existing report, it will be erased so that a new batch of orders can be transferred.

  1. Run the Sales Quote Purge Selection (EPIP) program to purge transferred sales quotes.

Validation

You can import orders for multiple sales branches in a single batch. The orders do not have to be for your login branch or even in your inventory group.

The options you set in the Order Import program govern whether the program performs pricing validation, and if so, which price to use. If you use the price in the EDI file or the system price, the program totals the order and updates Sales quotes entered statistics in the Executive Information Summary (EIS) program.

For the revenue organization code, the program uses the GL organization code in the EDI file, if one is included. If not, the program finds an organization code from these sources in this sequence:

  1. The Sales org code from record in the Customer Ship-to Maintenance (CSM) program for the ship-to number referenced in the EDI file.

  2. The Sales org code from the customer's record in the Customer Maintenance (CM) program.

  3. The GL org code from record in the Branch Maintenance (TBM) program for the sales branch referenced in the EDI file.

  4. The GL org code from record in the Branch Maintenance (TBM) program selected for the Sales branch field in the Order Import program.

EDI Order Log

The log includes this information:

  • Number of records read; number of records written

  • Sequence number

  • Order number assigned to this imported order
    no order or error when an order could not be created

  • Line number

  • Customer purchase order number

  • Transaction type:

  • Error message, for example:
    Customer is inactive
    Invalid record type
    Invalid header, detail has been skipped
    Invalid customer number
    Enter a valid branch code
    [date] is not a valid date
    A terms code is required
    Supplied terms code does not match customer file

Order has no lines
[number] is an invalid item
Import line already exists
Error using customer supplied line number, no line number found
System price does not match import price
There is no pricing set up for this item in this branch

ASCII File Format

The ASCII file can contain multiple orders. Each order must have a HEADER statement and at least one LINE statement.

Each HEADER can have one or more note statements (COMNTS) and a ship-to (SHIPTO), bill-to (BILLTO), and deposit (DEPOST) statement. For example, this order header has two notes and a ship-to address:

HEADER
COMNTS
COMNTS
SHIPTO

Each header can have multiple LINE statements. Each LINE statement can have multiple notes. For example, this order has four lines, two of which have notes.

LINE
COMNTS
LINE
LINE
COMNTS
COMNTS
LINE

Use the Data Dictionary Inquiry (DFQ) program to list the variables that you can include, their position, and length. Enter the data file name for each statement to list this information.

Statement Type

Data File Name

HEADER

O2F-H

COMNTS

O2F-C

SHIPTO

O2F-S

BILLTO

O2F-B

DEPOST

O2F-D

LINE

O2F-L

CANCEL (see Order Cancellation heading below)

O2F-OC

DETAIL (see Configured Products heading below)

O2F-LD

  • Dates must be in the format YYYYMMDD.

  • Entries are case sensitive. For example, the program correctly translates Y and N for fields that you normally select or leave blank but not y or n.

The Order Import program retrieves default data from the customer's record in the Customer Maintenance (CM) program. The program also retrieves data from the item's record in the Enterprise Item Maintenance (IM) and Branch Item Maintenance (IMB) program for the items ordered. Therefore, these are the only variables that are required:

Statement type

Required variables

HEADER

HEADER, Customer number

If the Date ordered and Date wanted are blank, the program uses the login date.

COMNTS

COMNTS, up to 80 characters of notes

SHIPTO

SHIPTO and all fields that you need for the alternative ship-to address

Note
The program does not take any fields from the customer's shipping address. Therefore, if you omit state, that field will be blank.

BILLTO

BILLTO and all fields that you need for the alternative bill-to address

Note
The program does not take any fields from the customer's billing address. Therefore, if you omit state, that field will be blank.

DEPOST

DEPOST, Deposit number, Deposit amount

When the deposit number is "NEW", the system creates a new deposit (using the Numbering System Setup for customer deposits) and then applies that deposit to the EDI order. When the deposit number is something other than "NEW", the deposit must already on file or an error message is generated that the deposit is invalid.

Other Requirements

  1. The payment date must be valid and in an open G/L period (if blank it defaults to the current date)

  2. The payment method must be valid

  3. The payment reference must be unique (if required) and

  4. Appropriate posting criteria must be available.

LINE

LINE, Item number, Quantity ordered, Date wanted, Expected ship

EDI item number can be a Customer item number set up in the Customer Item Maintenance (CIX) program. If both an Item number and EDI item number are included, the program uses the EDI item number. If the EDI item number is invalid, the program uses the Item number, but generates an error and places the order on hold, which alerts you to check the item number.

A Line number is not required; the system assigns 1, 2, and so on.

CANCEL

CANCEL, customer PO number, customer number, order number, reason code (see Order Cancellation heading below)

DETAIL

DETAIL, component item number, component quantity (see Configured Products heading below)

Order Cancellation

The import process supports order cancellation. The process changes open order quantities to zero and closes the order. The EDI log file will reflect any errors that occurred. The cancellation import file requires the constant CANCEL, followed by the customer PO number, customer number, order number and reason code.

The reason code in the import file must be a valid S (sales order) type in the table maintained by Reason Codes Maintenance (TRCM). A default reason can be specified when Order Import (EPI) is run. If you use drop file processing, set the default reason in Drop File Interface - EDI 850 options.

Configured Products

The import process for configured items does not validate components against the parent item's bill of material and assumes that the quantity per for each component record is the actual quantity required for the particular component.

For configured product orders, each LINE statement has one or more DETAIL component records. Line notes (COMNTS) can precede or follow DETAIL records; DETAIL records themselves do not have notes). For example, this order has two lines: the first line has three component selections and one line of notes; the second line has two component selections:

LINE
DETAIL
DETAIL
DETAIL
COMNTS
LINE

DETAIL
DETAIL