Cenex AFD File Technical Specifications

File Layout of Incoming AFD File


Export File Field Name

Max Field Length

Description

File Header Record:


File header, one record per file

Record Type

1

The value is always 1 for a file header record

Version

4

The first two characters describe the format version (e.g. 01); the second two describe the content version (initially 00)

Facility Number

10

Coop identification number

Batch Date

10

Current date (mm/dd/yyyy)




Invoice Header Record:


Customer Header, one record per customer

Record Type

1

The value is always 2 for a customer invoice header record

Customer ID

6

CHS Customer ID number

Coop Account Number

10

The customer account number created and used by the local coop

Customer Name

30

The customer first and last name, or company name

Customer Address1

30

The first address line for the customer

Customer Address2

30

The second address line for the customer

Customer City

30

The city of the customer

Customer State

2

The state of the customer

Customer Zip

10

The zip code for the customer

Billing Date

10

The date the coops are billed (mm/dd/yyyy)




Invoice Detail Record:


Tank Header, one record per active tank for the given customer

Record Type

1

The value is always 3 for a customer invoice detail record

Product ID

8

Product identification i.e. FLD-D, UL, RMXL

Product Type

25

Short description of the product

Site ID

1

Site ID is a number that represents a group of tanks out at the local farm

Tank ID

1

Tank ID is a number that represents a single tank at a given site at the local farm

Tank Capacity

8

The Capacity of the tank rounded to tenths of a gallon

Reference ID

8

For monthly billing this will be NULL, for daily billing this is either the Order ID or the Buyout ID

Delivery Date

19

For daily delivery orders this is the delivery date.  For monthly customers this is the billing date
(mm/dd/yy hh:mm:ss format using military time)

Gallons Delivered

8

For monthly billing, this is the number of gallons of product delivered over the billing cycle. For daily billing this, is the number of gallons delivered for the given order.

Gallons Used

8

For monthly billing, this is the number of gallons invoiced.  This includes used gallons in the current cycle and accumulated usage gallons from the prior billing cycle.

Buyout Gallons

8

For monthly billing this is zero or, if an auto-buyout occurred, the same value as Gallons Used.  For daily billing this is zero or, if the order was a buyout, is the same value as Gallons Used.

State Taxed

8

State taxed usage or delivered volume

State Tax-Exempt

8

State tax-exempt usage or delivered volume

Federal Taxed

8

Federal taxed usage or delivered volume

Federal Tax-Exempt

8

Federal tax-exempt usage or delivered volume

Co-op Cost per Gallon

8

Coop cost per gallon of product.

Total Cost No Taxes

8

Coop total cost without taxes

Total Freight

8

Total freight charges

Total Delivery Charges

8

Total delivery charges

Total Trip Charges

8

Total trip charges

Tank Serial ID


The serial ID listed on the tank page

Billing Type

1

1 – Monitored
2 – Non-Monitored

Order Create Date

19

On Daily Non-Monitored – Order Date,
Daily Monitored – Delivery Date,
Settlements & Monthly – Blank

File Trailer Record:


File Footer, one record per file

Record Type 

1

This value is always 4 for a file trailer record.

Batch Date

10

Current date (mm/dd/yyyy)

Record Count

8

Total number of all records in the export file