Purchase Order Interface: Table Driven Method

Use the Purchase Order Interface to load purchase order data from external applications. Information you load using this interface adds to or updates data already stored in PENTA.

This interface supports Job, Work Order, and OU & Account line items.

The Purchase Order Interface has a Request Type of PO and an Interface Type of P. Data files you load must have Request Types assigned to the P Interface Type.

PENTA creates or updates purchase orders using the accepted records from the file. It notes the rejected records and does not load them into PENTA.

If PENTA is unable to load an individual row, it bypasses that purchase order and moves on to the next. For example, rows (lines) 1, 2, and 3 are for purchase order 678. If row 2 has an error, rows 1, 2, and 3 are not loaded.

Purchase Order Interface Limitations & Restrictions

PENTA places the following limitations and restrictions on purchase order data loaded with the interface:

  • PENTA does not support the following line item types:

  • Account Distribution

  • Fixed Asset Distribution

  • Inventory Warehouse Distribution

  • Distribute when Received

  • You are restricted from entering or maintaining shipping address information and purchase order and line item comments, text, order requirements, and user-defined field values. You must maintain this information solely in the external application or in the Purchase Orders window.

  • Although the external application can request that PENTA mark a purchase order or one of its line items for deletion, it cannot actually perform the deletion.

  • If PENTA rejects a purchase order Master Record, the entire purchase order is rejected (not the entire data file). You must correct the data in the external application and then reload the file before submitting additional changes to the rejected purchase orders.

  • If the value of System Option 152 (“Track Sales and Use Tax”) is Y, you cannot define tax overrides in the data file. PENTA calculates taxes from the Job’s default information.

  • Do not load tax lines into PENTA. PENTA calculates sales and use tax from the job’s Costcode tax rules or the job’s tax jurisdiction list if there are no rules. The PENTA-calculated tax may be different from the tax calculated by the external application.

  • You cannot delete purchase orders and line items by loading a data file.

Purchase Order Interface- Loading Purchase Order Data

You can use the Initiate Batch Interface Request window to load purchase order data.

The Initiate Batch Interface Request window has the following features:

  • You can update specific purchase order columns without re-sending all other information associated with the main purchase and Detail Records.

  • A purchase order Type Code is required. Available Type Codes are:

  • STD – Standard

  • BULK – Bulk (parent line number must be defined for bulk purchase orders)

  • FAB – Fabricated

  • BLKT – Blanket

  • You can load additional data to process sales and use tax more accurately.

Purchase Order Where to View Loaded Data

You can review and modify interfaced data in the Purchase Order Information window and Purchase Order – Grid Option window.

Available Tables

Purchase Order Detail Record

The following information relates to the INTR_PO_DTL table.

Column

Entry

Format

Description

Column

Entry

Format

Description

INTR_RQST_ID

Req

C! 13

The interface request value that you enter to initiate the interface process. The value must be consistent for all records that PENTA should process together.

OU_ID

Req

X

Id of the OU assigned to the Purchase Order.

PO_NUM

Req

X

Id of the Purchase Order.

LINE_NUM

Req

I 9

Id of the line on the Purchase Order.

JOB_ID

Opt

X

Id of the Job associated with the Purchase Order.

ACTIVITY_CD

Req

C! 1

Required for all activity. Possible values are:

  • A(Add) – Adds the record to the database. PENTA provides an error message if the record already exists in the database.

  • C (Change) – Update an existing record. If the column is not updateable, PENTA records an error.

PO_STAT_CD

Req

C! 1

Status of the Purchase Order. Possible values are:

  • A (Active / Approved)

  • C (Complete)

  • D (Delete)

  • I (Inactive)

  • O (Over the Limit)

  • P (Pending)

ITEM_NUM

Opt

X

Non-inventory reference number. Could be relevant to the vendor or a work reference.

LONG_DESCR

Opt

C 2000

The description of the line item. If null, PENTA copies the value from the Detail – Master Record.

DISTR_TYPE_CD

Req

C 1

Available values:

  • A – Account Distribution

  • J – Job Distribution

  • O –Work Order Distribution

  • X – Parent Line of a Bulk Purchase Order

ALLOW_OVRN_AMT

Opt

F 15.2

The amount by which you allow the invoice value to be over the original cost. If the record is for a child line of a bulk purchase order, this should not contain a value.

ALLOW_OVRN_PCT

Opt

F 8.5

The percent by which you allow the invoice value to be over the original cost. If the record is for a child line of a bulk purchase order, this should not contain a value.

CC

Req

X

Id of the line item’s Costcode.

COST_TYPE_CD

Req

C! 4

Id of the line item’s Cost Type.

LUMP_SUM_AMT

Opt

F 15.2

For an Activity Code of A, if the Lump Sum Amount is set, the Unit Price and Units must be null.

UP

Opt

F 12.3

The Unit Price. For an Activity Code of A, if Unit Price contains a value, a value for Units is required and Lump Sum Amount must be null.
Exception: BULK POs. The child lines cannot have an updated Unit Price. The parent exclusively controls the price.

UNITS

Req

F 12.3

For an Activity Code of A, if Unit Price contains a value, an entry in this column is required.

PO_CO_ID

Opt

X

Id of the purchase order’s Change Request. Validate against the PO_CO table for the current purchase order. If the Id does not exist, PENTA adds it.

PO_CO_DESCR

Opt

C 30

If the description is in the PO_CO table, update the description. If it does not exist, PENTA adds it.

PAR_LINE_NUM

Opt

I 9

Id of the parent line item. The line number may not be associated with a PO line that is a child to another line. The parent line must already exist. If the Purchase Order Type code from the Detail – Master Record is BULK, this column must contain a value.

PO_LINE_TYPE_CD

Req

C! 1

Validate against the PO_LINE_TYPE table. Available values:

  • R – Regular

  • F – Freight

  • T – Tax

UM

Opt

C 5

The Unit of Measure. PENTA validates against the UNIT_OF_MEASURE table.

D_NEEDED_DATE

Opt

D

The date you need the line item in-house.

D_PROMISED_DATE

Opt

D

The date the line item was promised.

TAX_EXEMPT_
REASON_CD

Opt

C! 3

Explanation for why the Purchase Order is tax exempt.

TAX_PERMIT_ID

Opt

C 15

A free-format value signifying the tax-exempt permit number provided by the Vendor.

USER_ID

Req

C 6

The Id of the user assigned to the PO. Can be a generic user, but the Id must exist in PENTA.

ALLOW_OVRN_UP_
PCT

Opt

F 8.5

Percent by which you allow the invoice value for the unit price of this line item to be over the original cost.

ALLOW_OVRN_UP_
AMT

Opt

F 15.2

Overrun for Unit Price amounts. Amount by which you allow the invoice value for the unit price of this line item to be over the original cost.

RET_PCT

Opt

F 8.5

The Retention Percent PENTA should withhold from each invoice generated on or after the Effective Date.

PRICING_FACTOR_CD

Opt

C! 2

Code identifying the vendor-pricing rules for purchased products.

PROD_ID

Opt

X

Id of the purchased product.

DR_OU_ID

Opt

X

Id of the OU debited.

DR_ACCT_NUM

Opt

X

Id of the account debited.

WO_ID

Opt

C! 25

Id of the Work Order associated with the line item distribution.

WO_OU_ID

Opt

X

Id of the Organizational Unit associated with the Work Order.

WO_COST_TYPE_CD

Opt

C! 4

Id of the Work Order’s Cost Type associated with the transaction.

WO_TASK_ID

Opt

C! 10

Id of the Work Order Task associated with the line item distribution.

WO_MAINT_
CONTRACT_ID

Opt

C! 15

Id of the Work Order’s Maintenance Contract associated with the line item distribution.

RECORD_NUM

Opt

I 10

Do not assign this value. PENTA assigns this record number, which you can use to identify records with errors or warning messages.

MODIFICATION_DATE

Opt

D

Once the process completes, this displays the date PENTA marked the record as modified in the database. The current date is the default value.

Purchase Order Header Record

The following information relates to the INTR_PO_HDR table.

Column

Entry

Format

Description

Column

Entry

Format

Description

INTR_RQST_ID

Req

C! 13

The interface request value that you enter to initiate the interface process. The value must be consistent for all records that PENTA should process together.

RECORD_COUNT

Req

I 10

Each batch includes a count of the records (header and detail) within the file. If the number in the Header Record differs from the number read by PENTA, no update occurs and PENTA rejects the entire file.

DATA_CHECK_
VERIFIER

Req

I 8

The sum of the Record Type Number columns for all Master and Detail records associated with this Header record. For example, if this file contains 1 Master record (Record Type Number = 1) with 6 Detail records (Record Type Number = 2), the Data Check Verifier value is 13 ((1 * 1) + (6 * 2)).

RECORD_NUM

Opt

I 10

Do not assign this value. PENTA assigns this record number, which you can use to identify records with errors or warning messages.

USER_ID

Req

C 6

Id of the employee performing the load process. This user_id must exist in PENTA.

MODIFICATION_DATE

Opt

D

Once the process completes, this displays the date PENTA marked the record as modified in the database. The current date is the default value.

Purchase Order Master Record

The following information relates to the INTR_PO_MSTR table.

Column

Entry

Format

Description

Column

Entry

Format

Description

INTR_RQST_ID

Req

C! 13

The interface request value that you enter to initiate the interface process. The value must be consistent for all records that PENTA should process together.

OU_ID

Req

X

Id of the organizational unit associated with the purchase order.

PO_NUM

Req

X

Id of the purchase order.

JOB_ID

Opt

X

Id of the Job associated with the purchase order.

ACTIVITY_CD

Req

C! 1

Required for all activity. Possible values are:

  • A (Add) – Adds the record to the database. PENTA provides an error message if the record already exists in the database.

  • C (Change) – Update an existing record. If the column is not updateable, PENTA records an error.

PO_STAT_CD

Req

C! 1

Status of the Purchase Order. Available values:

  • A (Active / Approved)

  • C (Complete)

  • D (Delete)

  • I (Inactive)

  • O (Over the Limit)

  • P (Pending)

D_RQST_DATE

Req

D

The date you requested the Purchase Order items from the vendor.

CO_ID

Opt

X

Id of the Job’s Change Request.

VEN_ID

Req

X

Id of the Vendor.

DESCR

Req

C 30

Description of the Purchase Order.

CHANGE_TYPE_CD

Req

C! 1

Change Type Code identifies how purchase orders update. Valid values are:

  • I (Incremental) – PENTA data is preserved while adding new information (this kind of change applies primarily to line item pricing updates). PENTA adds the units and lump sum amount to the existing line item pricing criteria; all other purchase order and line item data replaces that stored in PENTA. PENTA does not mark line items for deletion if there is no data from the external application—only include line items that need updating.

  • R (Replace) – Data in PENTA is compared to data submitted by the external application.
    Anywhere there is a difference between the PENTA data and the interface data, the PENTA data is replaced.

PO_TYPE_CD

Req

C! 4

The Purchase Order’s classification. Validate against the PO_TYPE table. Available values:

  • STD (Standard)

  • BULK (Bulk)

  • FAB (Fabrication)

  • BLKT (Blanket)

PAY_TERM_NUM

Opt

C! 3

Id for the Purchase Order’s terms of payment.

CURRENCY_ID

Req

C! 3

If null, the currency of the Vendor is used. Validate against the table currency.

Required if System Option 44 is Y; otherwise, do not enter a value.

PO_CHK_AMT

Opt

F 15.2

Sum of all the PO detail line rows for a new (added) purchase order, or for a new (added) purchase order line. If null, PENTA does not check.

PENTA uses this amount within the interface program only. PENTA does not insert it into the PO_MSTR table, since PENTA calculates tax, which would create an immediate error the next time a user views the purchase order.

TAX_EXEMPT_
REASON_CD

Opt

C! 3

Explanation for why the Purchase Order is tax exempt.

TAX_PERMIT_ID

Opt

C 15

A free-format value signifying the tax-exempt permit number provided by the Vendor.

USER_ID

Req

C 6

Id of the user assigned to the Purchase Order. Can be a generic user, but the Id must exist in PENTA.

CONTACT_NUM

Opt

C! 3

Id of the Purchase Order’s vendor contact.

D_RELEASE_DATE

Opt

D

The date approved drawings must be released in order for the project to remain on schedule.

FAB_DELIVERY_DAYS

Opt

I 4

The expected number of days to fabricate and deliver the Purchase Order materials.

SHIP_METHOD_CD

Opt

C! 4

Id of the preferred method of shipment. Typically, ground, next day, two day, etc. are usable values in this column. Valid values originate in the Shipping Methods window.

SHIP_METHOD_DESCR

Opt

C 30

Description of the preferred method of shipment.

FREIGHT_TERM_CD

Opt

C! 8

Id of the terms under which the purchased items will ship.

PO_ORDER_TYPE_CD

Opt

C! 1

Available values:

  • STD (Standard)

  • BULK (Bulk)

  • FAB (Fabrication)

  • BLKT (Blanket)

ALLOW_OVRN_AMT

Opt

F 15.2

The amount by which you allow the invoice value to be over the original cost. If the record is for a child line of a bulk purchase order, this should not contain a value.

ALLOW_OVRN_PCT

Opt

F 8.5

The percentage by which you allow the invoice value to be over the original cost. If the record is for a child line of a bulk purchase order, this should not contain a value.

REQUESTER_EMP_ID

Opt

X

Id of the employee making a request for the Purchase Order.

PURCH_AGENT_EMP_
ID

Opt

X

The employee Id of the purchasing agent.

PMGR_EMP_ID

Opt

X

The employee Id of the project manager.

RECORD_NUM

Opt

I 10

Do not assign this value. PENTA assigns this record number, which you can use to identify records with errors or warning messages.

MODIFICATION_DATE

Opt

D

Once the process completes, this displays the date PENTA marked the record as modified in the database. The current date is the default value.

WO_ID

Opt

C! 25

Id of the Work Order associated with the Purchase Order’s line item distribution.

WO_OU_ID

Opt

X

Id of the OU associated with the WO_ID.

SHIP_NAME

Opt

C 30

Name of the address where materials will ship.

SHIP_ADDR_1

Opt

C 30

First line of the shipping address.

SHIP_ADDR_2

Opt

C 30

Second line of the shipping address.

SHIP_ADDR_3

Opt

C 30

Third line of the shipping address.

SHIP_CITY

Opt

C 20

City where the materials will ship.

SHIP_ST_CD

Opt

C! 4

State or province where the materials will ship.

SHIP_POSTAL_CD

Opt

C! 10

Postal (or zip) code where the materials will ship.

SHIP_COUNTRY_CD

Opt

C! 3

Country where the materials will ship.