Price Code Upload
Overview: The Price Code Upload allows you to upload price code information from an external system to create, update, or delete records in the Price Code, Price Code Customer, and Price Code Details tables.
In this topic:
- Price Code Upload Setup
- Price Code Upload Process
- Price Code Upload Errors
- Price Code Upload Errors Report
For more information: See Working with Price Codes (WPCD) and Assigning Price Codes (APCD).
Price Code Upload Setup
The setup required to use the price code upload includes:
File for Upload
Create a Price Code text file for the price code information you wish to create, update, or delete. The file should be named PRICECDUPLOAD.txt.
Note:
- The Request Type identifies the type of upload record.
- You must create records in this file in the correct order; for example, you must process a Price Code upload record before you can upload a Price Code Customer upload record and Price Code Detail upload record for that price code. The system processes the records in ascending Seq # order.
- Decimals in this file are explicit and not implied; for example, pass 19.99 and not 1999.
- To leave any field in the upload file blank, pass a space in an alphanumeric field and a 0 in a numeric field so that the file can be processed without errors. Leaving a field with no space or 0 is interpreted as null in the database and causes errors.
See the Price Code Upload Process for more information on using the data in the text file.
Sample data: You can use the sample data below to create a price code upload file.
Sample PCO Price Code Upload record type:
7|1|PCO|U|1150416|1234567|PRICE CODE UPLOAD|1|1|5.00|0.00|0.00|0.00|0.00|0.00|ITEM|Y|1150401|1150501|||||0||||
Sample PCC Price Code Customer Upload record type:
7|2|PCC|U|1150416|1234567||0|0|.00|.00|.00|.00|.00|.00|||0|0|||||55||||
Sample PCD Price Code Detail Upload record type:
7|3|PCD|U|1150416|1234567||0|0|.00|.00|.00|.00|.00|.00|||0|0|SKU|RED||SOURCE7|0||||
Price Code Upload Table (PriceCdUpload)
This table contains upload records for the Price Code, Price Code Customer, and Price Code Detail tables. The Request Type identifies the type of upload record.
Field | Description |
---|---|
Company |
Required for all Record Types. A code for the company associated with the Price Code Upload record. The system processes only records associated with the company from where the Price Code Upload Process was submitted. Company codes are defined in and validated against the Company table. Price Code: Updates Company in the Price Code table. Price Code Customer: Updates Company in the Price Code Customer table. Price Code Detail: Updates Company in the Price Code Details table. Numeric, 3 positions. |
Seq # |
Required for all Record Types. A unique number assigned to each Price Code Upload record. The system processes the records in the Price Code Upload table in ascending sequence number order. Numeric, 9 positions. |
Record Type |
Required for all Record Types. The type of Price Code Upload record. Valid values:
Alphanumeric, 3 positions. |
Request Type |
Required for all Record Types. Indicates whether the Price Code Upload record creates, updates, or deletes a record. Valid values:
Alphanumeric, 1 position. |
Record Date |
Required for all Record Types. The date the Price Code Upload record was created. Numeric, 7 positions (CYYMMDD format). |
PCO Price Code |
Required for all Record Types. A code to identify the price code to upload. Price codes are defined in and validated against the Price Code table. Price Code: Updates PCO Price Code in the Price Code table. Price Code Customer: Updates Price Code Code in the Price Code Customer table. Price Code Detail: Updates PCO Price Code in the Price Code Details table. Numeric, 7 positions. |
Description |
Required for Record Type PCO Price Code. Not used by Record Type PCC Price Code Customer or PCD Price Code Detail. A description of the price code. Updates PCO Description in the Price Code table. Alphanumeric, 30 positions. |
PCO Sequence |
Required for Record Type PCO Price Code. Not used by Record Type PCC Price Code Customer or PCD Price Code Detail. The order in which the system evaluates whether a price code applies to an order. Regular Price Code Pricing: If an order qualifies for two or more price codes, the system uses the price code with the lowest sequence number. If two price codes have the same sequence number, the system uses the price code with the lowest price code number. Customer Price Group Price Code Pricing: If an order qualifies for two or more price codes, the system uses the price code that provides the greatest discount to the order. If two price codes provide the same discount, the system uses the price code with the lowest sequence number. If two price codes have the same sequence number, the system uses the price code with the lowest price code number. Updates PCO Sequence in the Price Code table. Numeric, 7 positions. |
PCO Qty Required |
Required for Record Type PCO Price Code. Not used by Record Type PCC Price Code Customer or PCD Price Code Detail. The total quantity the customer must order of all qualifying items to get the price break. Updates PCO Qty Required in the Price Code table. Numeric, 7 positions. |
PCO Percent Discount |
Required for Record Type PCO Price Code if a PCO Dollar Discount, PCO Special Price, or Group Price is not defined. Not used by Record Type PCC Price Code Customer or PCD Price Code Detail. The percentage of the regular item price to subtract for each qualifying item associated with the price code. If the Tax Included in Price (E70) system control value is selected, the system applies the discount against the regular tax-inclusive price to calculate the tax-inclusive price code price. Updates PCO Percent Discount in the Price Code table. Numeric, 7 positions with a 2-place decimal. |
PCO Dollar Discount |
Required for Record Type PCO Price Code if a PCO Percent Discount, PCO Special Price, or Group Price is not defined. Not used by Record Type PCC Price Code Customer or PCD Price Code Detail. The dollar amount to subtract from the regular price of each qualifying item associated with the price code. If the Tax Included in Price (E70) system control value is selected, the system applies the discount against the regular tax-inclusive price to calculate the tax-inclusive price code price. Updates PCO Dollar Discount in the Price Code table. Numeric, 13 positions with a 2-place decimal. |
PCO Special Price |
Required for Record Type PCO Price Code if a PCO Percent Discount, PCO Dollar Discount, or Group Price is not defined. Not used by Record Type PCC Price Code Customer or PCD Price Code Detail. The special price to charge the customer for all qualifying items associated with the price code. Updates PCO Special Price in the Price Code table. Numeric, 13 positions with a 2-place decimal. |
PCO Tax Special Price |
Required for Record Type PCO Price Code if a PCO Percent Discount, PCO Dollar Discount, or Group Price is not defined and the Tax Included in Price (E70) system control value is selected. Not used by Record Type PCC Price Code Customer or PCD Price Code Detail. The special price to charge the customer for all qualifying items associated with the price code on orders subject to VAT. Used only if the Tax Included in Price (E70) system control value is selected. Note: If an order is subject to VAT, but the item is subject to a price code with a only a special price and not a Tax-inclusive price, the system uses the special price for the price code.Updates PCO Tax Special Price in the Price Code table. Numeric, 13 positions with a 2-place decimal. |
Group Price |
Required for Record Type PCO Price Code if a PCO Percent Discount, PCO Dollar Discount, or PCO Special Price is not defined. Not used by Record Type PCC Price Code Customer or PCD Price Code Detail. The group price to charge the customer for all qualifying items associated with the price code. Updates PCO Group Price in the Price Code table. Numeric, 13 positions with a 2-place decimal. |
PCO Tax Group Price |
Required for Record Type PCO Price Code if a PCO Percent Discount, PCO Dollar Discount, or PCO Special Price is not defined and the Tax Included in Price (E70) system control value is selected. Not used by Record Type PCC Price Code Customer or PCD Price Code Detail. The group price to charge the customer for all qualifying items associated with the price code on orders subject to VAT. Used only if the Tax Included in Price (E70) system control value is selected. Note: If an order is subject to VAT, but the item is subject to a price code with a only a group price and not a Tax-inclusive price, the system uses the group price for the price code.Updates PCO Tax Special Price in the Price Code table. Numeric, 13 positions with a 2-place decimal. |
Distinct By |
Optional for Record Type PCO Price Code. Not used by Record Type PCC Price Code Customer or PCD Price Code Detail. The method the system uses to determine whether the customer ordered the quantity required to receive the group price. Valid values:
Updates PCO Distinct By in the Price Code table. Alphanumeric, 10 positions. |
Multiples |
Required for Record Type PCO Price Code if a Distinct By setting or Group Price is defined. Not used by Record Type PCC Price Code Customer or PCD Price Code Detail. Defines whether the order qualifies for a discount multiple times if the correct number of qualifying items/SKUs is added to the order.
Updates PCO Allow Multiples in the Price Code table. Alphanumeric, 1 position. |
Start Date |
Optional for Record Type PCO Price Code. Not used by Record Type PCC Price Code Customer or PCD Price Code Detail. The beginning date when the price code discount becomes effective. Updates PCO Start Date in the Price Code table. Numeric, 7 positions (CYYMMDD format). |
End Date |
Optional for Record Type PCO Price Code. Not used by Record Type PCC Price Code Customer or PCD Price Code Detail. The end date when the pice code discount becomes effective. The end date cannot be earlier than the start date or earlier than the current date. Updates PCO End Date in the Price Code table. Numeric, 7 positions (CYYMMDD format). |
ITM Number |
Required for Record Type PCD Price Code Detail. Not used by Record Type PCO Price Code or PCC Price Code Customer. A code for the item to assign to the price code. Item codes are defined in and validated against the Item table. Updates ITM Number in the Price Code Details table. Alphanumeric, 12 positions. |
SKU Code |
Required for Record Type PCD Price Code Detail if the item contains SKUs and you want to specify which SKUs qualify for the price code; leave blank if all SKUs for the item qualify for the price code. Not used by Record Type PCO Price Code or PCC Price Code Customer. A code for the SKU to assign to the price code. SKU codes are defined in and validated against the SKU table. Updates SKU Code in the Price Code Details table. Alphanumeric, 14 positions. |
Offer Number |
Required for Record Type PCD Price Code Detail if a SRC Source Code is not defined. Not used by Record Type PCO Price Code or PCC Price Code Customer. A catalog, advertisement, or other means you use to present merchandise to your customers. The price code defined for an item/offer combination applies to orders whose header-level source code points to the offer. Offers are defined in and validated against the Offer table. See Working with Offers (WOFR). Updates Offer Number in the Price Code Details table. Alphanumeric, 3 positions. |
SRC Source Code |
Required for Record Type PCD Price Code Detail if a Offer Number is not defined. Not used by Record Type PCO Price Code or PCC Price Code Customer. A code you use to group a segment of your customers. The price code defined for this item/source code combination applies to orders with this source code on the order header. Source codes are defined in and validated against the Source Code table. See Working with Source Codes (WSRC). Updates SRC Source Code in the Price Code Details table. Alphanumeric, 9 positions. |
Customer |
Required for Record Type PCC Price Code Customer if a Customer Price Group is not defined. Not used by Record Type PCO Price Code or PCD Price Code Detail. The sold to customer number that qualifies for the price code. Sold to customer numbers are defined in and validated against the Customer Sold To table. Updates Customer # in the Price Code Customer table. Numeric, 9 positions. |
Customer Price Group |
Required for Record Type PCC Price Code Customer if a Customer is not defined. Not used by Record Type PCO Price Code or PCD Price Code Detail. The code for the customer price group that qualifies for the price code discount. Customer price group codes are defined in and validated against the Customer Price Group table. Updates Customer Price Group in the Price Code Customer table. Alphanumeric, 4 positions. |
Error Description |
Updated by the system during the Price Code Upload Process. The reason why the Price Code Upload record has been placed in an error status. See Price Code Upload Errors. Alphanumeric, 20 positions. |
Processed |
Updated by the system during the Price Code Upload Process. The status of the Price Code Upload record. Valid values:
Alphanumeric, 1 position. |
PCUPLD Price Code Upload Periodic Function
Use the PCUPLD periodic function to update the Price Code table after you have completed the File for Upload.
Option | Setting |
---|---|
Function: | PCUPLD |
Description: | PRICE CODE UPLOAD |
Program name: | PFPRCCODUP |
Company |
The Company flag must be selected. The Price Code Upload process creates, updates, and deletes records in the Price Code, Price Code Customer, and Price Code Details tables based on the records in the Price Code Upload Table (PriceCdUpload) using the company you entered when you submitted the PCUPLD periodic function. |
- The PCUPLD periodic function is delivered with the system; use the Working with Periodic Functions (WPER) menu option to review it.
- Use the Working with Periodic Processes (WPPR) menu option to assign the UPPRCCD and PCUPLD periodic function to a periodic process.
- Once you have created the periodic process, you can use the Execute Periodic Process screen (located in the Working with Periodic Processes (WPPR) or Executing Periodic Processes (EPRO)) to define a schedule for the job. See Defining the Job Schedule.
For more information: See delivered with the system; use the Scheduling Jobs for more information on How to Schedule a Job.
Price Code Upload Process
Use the following steps to upload Price Code records from an external system.
# | Step |
---|---|
1. |
Create a text file named PRICECDUPLOAD.txt containing the price code data. See File for Upload for more information. |
Update Price Code Upload Table (PriceCdUpload) with price code information from the text file:
|
|
2. |
Submit the Price Code Upload process:
The Record Type identifies the type of upload record:
|
3. |
The system updates the Processed field for each record in the Price Code Upload table to blank to include all records in the upload process. |
4. |
The system processes the records in the Price Code Upload table in Seq # order. |
5. |
The system validates each record in the Price Code Upload Table (PriceCdUpload). |
PCO Price Code Upload Record Validation The required fields for Record Type PCO Price Code are:
Optionally, you can define:
|
|
PCC Price Code Customer Upload Record
Validation The required fields for Record Type PCC Price Code Customer are:
|
|
PCD Price Code Detail Upload Record
Validation The required fields for Record Type PCD Price Code Detail are:
Optionally, you can define:
|
|
6. |
If the record in the Price Code Upload table does not pass validation, the system:
A record in error remains in the Price Code Upload table until you fix or delete it. The system validates the record again the next time you submit the Price Code Upload Process. |
7. |
If the record in the Price Code Upload table passes validation, the system:
You can review or maintain:
|
Price Code Upload Errors
The system includes Price Code Upload records that are in error on the Price Code Upload Errors Report.
Error | Reason |
---|---|
General Errors The following errors can occur for any Record Type. |
|
Invalid Company |
The Company is missing, invalid, or inactive. |
Invalid Seq# |
The Seq # is missing. |
Record Type not found |
The Record Type is missing or invalid. Valid values:
|
Invalid Request Type |
The Request Type is missing or invalid. Valid values:
|
Invalid Record Date |
The Record Date is missing or invalid. Must be in CYYMMDD format. |
Invalid Price Code |
The PCO Price Code is missing or invalid. |
Price Code Table Errors The following errors can occur if the Record Type for the record in the Price Code Upload table is PCO Price Code. |
|
Invalid Seq # |
The PCO Sequence is missing or invalid. |
Invalid Qty Req’d |
The PCO Qty Required is missing or invalid. |
Discount Missing |
You must enter a PCO Percent Discount, PCO Dollar Discount, PCO Special Price, or Group Price. |
Discount Conflict |
You can define only one type of discount: PCO Percent Discount, PCO Dollar Discount, PCO Special Price, or Group Price. |
Invalid Distinct by |
The Distinct By field is invalid. Valid values:
|
Invalid Multiples |
The Multiples field is invalid or the Distinct By field is populated and the Multiples field is not set to Y. Valid values:
|
Invalid Start Date |
The Start Date is invalid. |
Invalid End Date |
The End Date is invalid. This error can occur if the End Date is earlier than the current date. |
Invalid Field Populated |
Fields not related to the PCO Record Type are populated. |
Price Code Customer Table Errors The following errors can occur if the Record Type for the record in the Price Code Upload table is PCC Price Code Customer. |
|
Invalid Customer |
The Customer is invalid. |
Cust\CPG Conflict |
You must define a Customer or Customer Price Group for a PCC Price Code Customer upload record, but not both. |
Invalid Cust Prc Grp |
The Customer Price Group is invalid. |
Invalid PCC Record |
Fields not related to the PCC Record Type are populated. |
Price Code Detail Table Errors The following errors can occur if the Record Type for the record in the Price Code Upload table is PCD Price Code Detail. |
|
Invalid Item |
The ITM Number is missing or invalid. |
Invalid SKU |
The SKU Code is invalid. |
Invalid Offer |
The Offer Number is invalid. |
Offer\Src Conflict |
You must define an Offer Number or SRC Source Code for a PCD Price Code Detail upload record, but not both. |
Invalid Source |
The SRC Source Code is invalid. |
Invalid PCD Record |
Fields not related to the PCD Record Type are populated. |