WEM SPIRIT Batch File Processing

Understanding the batch file processing rules in WEM first requires a fundamental understanding of the architecture, if needed the architecture overview is available here. Currently WEM supports files in two legacy formats: one is the format needed for Open Domain's WIC MIS System in Nevada, and the other is for the SPIRIT WIC MIS System used by a large number of WIC agencies throughout the United States. As others are introduced, these tables may be changed. The information below is from the perspective of SPIRIT system.

Document Conventions

The following conventions apply to this document.

Field Data Types

Type Description
X Denotes text fields.
9 Denotes numeric fields.
9v9 Denotes decimal numeric fields, where the v represents an implied decimal. 999v99 for example could appear in the file as 43842, but would be read as 438.42.

Annotations

Type Description
Dropped Denotes that the field is not required for communication with the MIS according to processing analysis.
Unmapped Indicates that there is no equivalent field to use when transforming the data.
*Requires Mapping *This field must be mapped from another field or data element.
Pass through Fields marked as pass through require no manipulation or mapping, beyond that of the field name or format adjustment when transforming files.
Space filled Fields marked with the space filled annotation will be any nonsignificant digits, up to the entire length of the record will be filled with the empty character repeating.
Zero filled Fields marked with the zero filled annotation will be any nonsignificant digits, up to the entire length of the record will be filled with the zero digit repeating.

* When possible, this mapping will be explained in the text of this documentation.

General Requirements

The following is a list of general requirements for batch processing. The WEM shall:

Supported Inbound (EBT to SPIRIT) Types

Inbound Processing Flow

For files coming from EBT to SPIRIT a scheduled task must be created that will use an instance of the WEM file processor to pull those files in from the EBT Host FTP Server. Once retrieved, they are delivered to the WEM Proxy Inbox. Here the WEM file processor service will pick up the files and prepare them for processing. It will also create an archive of the file. Once it has the file content it will use that content and the delivery information to determine the best approach for processing.
Once determined it will select the correct handler and utilize that handler to convert the data into the desired format. Once the data is converted it is delivered.

Note: If the WEM is running in Smart Card mode it will determine if the sender is the Primary EBT system or SWEM-Q. If the sender was SWEM-Q it is routed to the MIS, if the sender is the primary EBT system it is routed to SWEM-Q.

Inbound File Workflow

Auxiliary file process

Some systems are treated as non-primary by the EBT environment. For example, in an agency with a SEBTC program, the agency is the primary and the SEBTC program is the non-primary. The workflow for these non-primary of subordinate systems. The function is very similar, but there are additional steps involved. Specifically, the EBT environment may write the files that are inbound for these systems into a different FTP folder. As an example, WIC Direct writes these files to the inbox archive and names them with the system id for the auxiliary system. Where the primary system may have a redemption file, "ftp/outbox/20160207035959.rxml" there may be an auxiliary file "ftp/outbox-archive/20160207035959.23.rxml" where 23 is the system id of the auxiliary system.

The WEM handles these by using the primary system files as a key for what has and has not been retrieved from the inbox and

Supported Outbound (SPIRIT to EBT) Types

Outbound Processing Flow

For files coming from SPIRIT to the EBT system the files are generated by SPIRIT End of Day and are delivered directly to the same folder that is designated as the WEM Inbox. The WEM file processor service is watching this folder and will fetch the file as soon as it is delivered. It will prepare the file for processing and create an archive to the inbox archive folder. It then hands the content over to the message processor which will determine the best approach for processing. Once determined it will select the correct handler and utilize that handler to convert the data into the desired format. Once the data is converted it is delivered. If the agency in the wem-config has only one EBT endpoint defined (most common scenario) then it will be delivered via FTP/SFTP to the host FTP server specified. If the agency has multiple EBT endpoints defined (common in smart card configurations) then the WEM will determine if this is a smart card configuration. If so, the files are routed to both defined endpoints. A third scenario is not common in SPIRIT agencies. It is possible to have two - or more - endpoints defined, but not be a smart card implementation. In this scenario, if the file has been defined to broadcast (in code, not configurable) the file will be delivered to all associated endpoints.

Outbound File Workflow

Common Elements

These elements are shared across all files.

The header elements used when connecting from SPIRIT are listed below:

EBT to SPIRIT Layout

MIS Element WUMEI Name Position Length Type Notes
Record Type Unmapped 1-2 2 X Coded value - 'HD'
Transaction Type File Name 3-10 8 X Mapped Value
Date Date and time, transmission 11-18 8 9 Derived
Time Date and time, transmission 19-26 8 9 Derived
Control Number File sequence number 27-32 6 9 Pass through
WIC EBT Program ID Unmapped 33-34 2 X  
Filler Unmapped 35-250 216 X Empty space filled record

SPIRIT to EBT Layout

MIS Element WUMEI Name Position Length Type Notes
Record Type Unmapped 1-2 2 X Coded value - 'HD'
Transaction Type File Name 3-10 8 X Mapped Value
Date Date and time, transmission 11-18 8 9 Derived
Time Date and time, transmission 19-26 8 9 Derived
Control Number File sequence number 27-32 6 9 Pass through
WIC EBT Program ID Unmapped 33-34 2 X  
Filler Unmapped 35-92 58 X Space filled
Error Code Unmapped 93-96 4 X Populated in response file only - currently unhandled.
Response Code Unmapped 97-100 4 X Populated in response file only - currently unhandled.
Unmapped Count, detail records       Derived during file creation.
Unmapped File format version       Configurable value: UniversalServiceICDVersion, provided by WIC EBT Processor.
Unmapped Originator of file       Configurable value: UniversalServiceWICStateAgencyID, provided by WIC EBT Processor.
Unmapped Receiving institution       Configurable value: UniversalServiceWICEBTSystemID, provided by WIC EBT Processor.
Unmapped Record sequence number       Coded value - '1'.
Unmapped Type code       Coded value - 'U'.

Trailer

The Universal Interface does not specify trailer records for files in the Universal Interface. For SPIRIT to EBT files, this means that WEM will just log the received trailer, but will not have to perform any translation or creation of trailer records in the file to the WIC EBT processor. For EBT to SPIRIT files, the WEM must compute the trailer record based upon the detail records in the incoming file. Each incoming file has a slightly different trailer record, those details included below the detail record information in the following sections.

Redemption File

The redemption file reflects transactions from the retail environments that result in a debit or credit of an EBT account. This file comes from the EBT system and is processed on benefit of the MIS therefore its header file is mapped to the EBT to SPIRIT Layout above. The detail and trailer records are indicated below.

Detail Record

MIS Element WUMEI Name Position Length Type Notes
Record Type Unmapped 1-2 2 X Coded value - 'DT'
Transaction Type Unmapped 3-4 2 X May be derived from Type code
Transaction Code Type code 5-7 3 X Coded value - requires mapping
WIC Vendor Number WIC MIS vendor ID 8-14 7 X Pass through
Recipient Number WIC MIS account ID 15-29 15 X Pass through - typically not available to WEM
Card Number Card number 30-48 19 X Pass through
Category Category code 49-50 2 9 Pass through
Sub-category Sub-category code 51-53 3 9 Pass through
Quantity Units 54-58 5 999v99 Pass through
Transaction Log Date Date and time, host 59-66 8 9 Derived value converted from date portion of datetime value, format: DateType 1
Transaction Log Time Date and time, host 67-74 8 9 Derived value converted from time portion of datetime value with 2 digit right zero padding, format: TimeType 1
UPC/PLU/Coupon Indicator Unmapped 75-75 1 X Coded value - requires mapping
Product UPC/PLU UPC/PLU data 76-92 17 X Pass through (strip UPC/PLU indicator first)
Number of Items Purchase quantity 93-94 2 9 Rounded value of quantity Note Quantity is a floating-point value in the EBT system
Requested Price See note. For 1st record in the group: Item Price * Sum(Original Purchase Quantity) 95-100 6 9999v99 For subsequent records in the group: $0.00 Aggregate Requested Amount for Unique Benefit Issuance Number, Applied Category, Applied Sub-category combination. Zero filled for subsequent Benefit Grant records within same transaction.
Settled Price See note. For 1st record in the group: Sum(Amount, paid) 101-106 6 9999v99 For subsequent records in the group: $0.00 Aggregate Settled Amount for Unique Benefit Issuance Number, Applied Category, Applied Sub-category combination. Zero filled for subsequent Benefit Grant records within same transaction.
Authorization Number Unique EBT transaction identifier 107-114 8 X Pass through last 8 digits
Unique Benefit Issuance Number Benefit issuance ID 115-134 20 X Pass through
Starting Date Date, begin benefit 135-142 8 9 Pass through
Peer Group ID WIC vendor peer group ID 143-144 2 9 Pass through
Filler Unmapped 145-148 4 X Space filled
Profile Number Unmapped 149-157 9 9 Zero filled - Used to indicate disparate programs within an agency. Since this field is not in the WUMEI, WEM will not be able to use it for EBT -> MIS files and will zero fill it instead
NIT Unmapped 158-163 6 X Space filled - used to represent WIC Authority ID
Reduction Indicator Unmapped 164-164 1 9 dropped '0' = Item quantity used to reduce available benefit balance '1' = Dollar amount used to reduce available balance; CVB uses '1' '2' = Calculated quantity based on weight of item used to reduce available benefit balance Standard default will be '0'"
Weight Product Indicator Unmapped 165-165 1 X dropped '0' = Quantity used as applied units '1' = weight of item(s) used as applied units Standard default will be '0' Note: CVB uses 0
WIC Clinic ID Clinic ID 166-170 5 X Pass through
Business Day Date, settlement 171-178 8 9 The year, month and day funds are transferred between the acquirer and the card issuer. In WIC EBT, the EBT system's recorded date of settlement.
Filler Unmapped 179-250 72 X Space filled

Important Notes about Redemption Detail Record

Trailer Record

MIS Element WUMEI Name Position Length Type Notes
Record Type Unmapped 1-2 2 X Coded value - 'TR'
Transaction Type File Name 3-10 8 X Mapped Value Must match Header
Date Date and time, transmission 11-18 8 9 Derived Must match Header
Time Date and time, transmission 19-26 8 9 Derived Must match Header
Control Number File sequence number 27-32 6 9 Pass through Must match Header
Total Detail Records Unmapped 33-38 6 9 Count of the number of detail records - zero padded
Filler Unmapped 39-250 212 X Space filled

Benefit Activity File

The Report WIC Benefit Changes from the Universal Interface describes a file that correlates to the WIC Activity File that is generated by a WIC EBT system and consumed by SPIRIT. This file contains a record of all SPIRIT initiated benefit adds and updates that were accepted by the WIC EBT system. This file allows SPIRIT to reconcile its record of SPIRIT initiated benefit activities against the benefit activities recorded in the WIC EBT system. SPIRIT records any exceptions detected and these exceptions must be researched and resolved manually. Note that the WIC Activity File contains several fields that are redemption related. However, SPIRIT ignores these fields and uses records related the benefit reconciliation of SPIRIT initiated benefit updates. Therefore, the Daily Interface File maps well to the file described in the Report WIC Benefit Changes section of the Universal Interface.

Detail Record

MIS Element WUMEI Name Position Length Type Notes
Record Type Unmapped 1-2 2 X Coded value - 'DT'
Recipient Number WIC MIS account ID 3-17 15 X Pass through
Filler Unmapped 18-28 11 X Space filled
WIC Clinic Code Clinic Id 29-33 5 X Pass through
Primary/Alternate Indicator Unmapped 34-35 2 9 Space filled Should this be zero filled?
Filler Unmapped 36-39 4 X Space Filled
Transaction Code Type Code 40-42 3 9 Coded value - requires mapping
Transaction Log Date Date and time, host 43-50 8 9 Derived value converted from date portion of datetime value, format: DateType 1
Transaction Log Time Date and time, host 51-58 8 9 Derived value converted from time portion of datetime value with 2 digit right zero padding, format: TimeType 1
Transaction Response Code Unmapped 59-60 2 9 Only approved transactions are included in the file
Benefit Type Unmapped 61-66 6 X Space filled
Credit Debit Indicator Unmapped 67-68 2 X Derived from type code - 'CR' = Credit, 'DB' = Debit
Requested Amount Unmapped 69-75 7 99999v99 Our analysis of the existing SPIRIT application indicates that this field is loaded into the SPIRIT database from the file, but is never subsequently used in any processing.
Settled Amount Unmapped 76-82 7 99999v99 Our analysis of the existing SPIRIT application indicates that this field is loaded into the SPIRIT database from the file, but is never subsequently used in any processing.
Origination Date Unmapped 83-90 8 9 Dropped Same date as Transaction Log Date
Business Date Date, business 91-98 8 9 Settlement date Should this be settlement date field, like redemption? Does that field exist in this file
WIC Vendor Number Unmapped 99-105 7 9 Dropped Our analysis of the existing SPIRIT application indicates that this field is loaded into the SPIRIT database from the file, but is never subsequently used in any processing.
Peer Group Id Unmapped 106-107 2 9 Dropped Our analysis of the existing SPIRIT application indicates that this field is loaded into the SPIRIT database from the file, but is never subsequently used in any processing.
POS ID Unmapped 108-122 15 X Dropped Our analysis of the existing SPIRIT application indicates that this field is loaded into the SPIRIT database from the file, but is never subsequently used in any processing.
Vendor Name Unmapped 123-137 15 X Dropped Space filled.
Vendor Location Unmapped 138-177 40 X Dropped Space filled.
Card Entry Unmapped 178-178 1 X Dropped Our analysis of the existing SPIRIT application indicates that this field is loaded into the SPIRIT database from the file, but is never subsequently used in any processing. 'K' = Manually Keyed, 'S' Card swiped.
Authorization Number Unmapped 179-186 8 X Dropped Our analysis of the existing SPIRIT application indicates that this field is loaded into the SPIRIT database from the file, but is never subsequently used in any processing.
Unique Benefit Issuance Number Benefit Issuance Id 187-206 20 X Transaction authorization number. Left-justified Space-filled
Applied Category Category Code 207-208 2 9 Identifies Category that was reduced from cardholder benefit grant. Right-justified, Zero-filled
Applied Sub-category Sub-category code 209-211 3 9 Identifies Sub-category that was reduced from cardholder benefit grant. Right-justified, Zero-filled
Applied Qty Benefit Quantity 212-216 5 999v99 Quantity in standard units reduced from applied Category/Sub-category. Right-justified, Zero-filled
UPC Category Unmapped 217-218 2 9 Dropped Zero filled
UPC Sub-category Unmapped 219-221 3 9 Dropped Zero filled
Exception Indicator Unmapped 222-222 1 X Dropped Identifies when the detail record has created an exception item.
Profile Number Unmapped 223-231 9 9 Dropped Used to indicate disparate programs within an agency.
Original Unique Benefit Issuance Number Unmapped 232-251 20 X Dropped Our analysis of the existing SPIRIT application indicates that this field is loaded into the SPIRIT database from the file, but is never subsequently used in any processing.
NIT Unmapped 252-257 6 X Dropped WIC Authority ID
Card Number Unmapped 258-276 19 X Dropped Our analysis of the existing SPIRIT application indicates that this field is loaded into the SPIRIT database from the file, but is never subsequently used in any processing.
Filler Unmapped 277-290 14 X Space Filled

Trailer Record

MIS Element WUMEI Name Position Length Type Notes
Record Type Unmapped 1-2 2 X Coded value - 'TR'
Transaction Type File Name 3-10 8 X Mapped Value Must match Header
Date Date and time, transmission 11-18 8 9 Derived Must match Header
Time Date and time, transmission 19-26 8 9 Derived Must match Header
Control Number File sequence number 27-32 6 9 Pass through Must match Header
Total Detail Records Unmapped 33-38 6 9 Count of the number of detail records - zero padded
Total Credits Unmapped 39-48 10 99999999v99 Total applied quantity for credits
Total Debits Unmapped 49-58 10 99999999v99 Total applied quantity for debits
Filler Unmapped 39-250 212 X Space filled

Benefit Expungement File

MIS Element WUMEI Name Position Length Type Notes
Record Type Unmapped 1-2 2 X Coded Value - 'DT'
Action Code Unmapped 3-4 2 X Dropped ('01' per JP Spec)
Benefit Type Unmapped 5-10 6 X Dropped ('WIC' per JP Spec)
Recipient ID WIC MIS account ID 11-25 15 X Dropped (SPIRIT drives everything off of the Unique Benefit Issuance Number; the WEM should still map and include in the file)
Number of Rx Items Unmapped 26-27 2 9 May be derived by counting number of detail records in source file.
Food Items Unmapped 28-357 330 9 Up to 30 category/subcategory/quantity entries.
          Repeats the following elements for each benefit issuance id purged:
          MIS: Category code WUMEI: Category code Length: 2 Pass through
          MIS: Subcategory code WUMEI: Subcategory code Length: 3 Pass through
          MIS: Quantity WUMEI: Benefit Quantity Length: 5 Pass through
          MIS: Reduction Indicator WUMEI: Unmapped Length: 1 Zero filled
Starting Date Date, begin benefit 358-365 8 9 Derived value converted from date portion of datetime value, format: DateType 1
Expiration Date Date, end benefit 366-373 8 9 Derived value converted from time portion of datetime value with 2 digit right zero padding, format: TimeType 1
Unique Benefit Issuance Number 374-393 Benefit issuance ID 20 X Pass through
Profile Number Unmapped 394-402 9 9 Used to indicate other programs managed by the agency. Since this is not currently supported in the Universal Interface, the WEM will not do anything with this field.
NIT Unmapped 403-408 6 X Dropped
WIC Clinic ID Unmapped 409-413 5 X Dropped
Filler Unmapped 414-470 57 X Space filled

Trailer Record

MIS Element WUMEI Name Position Length Type Notes
Record Type Unmapped 1-2 2 X Coded value - 'TR'
Transaction Type File Name 3-10 8 X Mapped Value Must match Header
Date Date and time, transmission 11-18 8 9 Derived Must match Header
Time Date and time, transmission 19-26 8 9 Derived Must match Header
Control Number File sequence number 27-32 6 9 Pass through Must match Header
Total Detail Records Unmapped 33-38 6 9 Count of the number of detail records - zero padded
Filler Unmapped 39-375 432 X Space Filled

Category Subcategory File

MIS Element WUMEI Name Position Length Type Notes
Record Type Unmapped 1-2 2 X Dropped Does not translate to WUMEI field
Action Code Action code 3-4 2 X Coded value – '002'
WIC EBT Program Item Code Unmapped 5-9 5 X Dropped Does not translate to WUMEI field
Category Number Category code 10-11 2 9 Pass through
Sub-category Number Sub-category code 12-14 3 9 Pass through
Unit Of Measure Benefit unit description 15-17 3 X Pass through
Shopping List Description Sub-category short description 18-59 42 X Pass through
Rebate Flag Unmapped 60-60 1 X Dropped
NIT Unmapped 61-66 6 X Dropped
Expire Date Date, end sub-category 67-74 8 9 Pass through
Profile Number Unmapped 75-83 9 9 Dropped
Reduction Indicator Unmapped 84-84 1 9 Dropped
Effective date Date, begin sub-category 85-92 8 9 Pass through
Error Code Unmapped 93-96 4 X Derived based on Universal Interface response file
Response Code Unmapped 97-100 4 X Derived based on Universal Interface response file
Filler Unmapped 101-156 55 X Space filled
Category long description Category long description 157-206 50 X Pass through
Category short description Category short description 207-226 20 X Pass through
Sub-Category long description Sub-Category long description 227-276 50 X Pass through

Vendor File

MIS Element WUMEI Name Position Length Type Notes
Record Type Unmapped 1-2 2 X Coded Value - 'DT'
Action Code Action code 3-4 2 X Coded Value - '002'
Vendor Number WIC MIS Vendor Id 5-11 7 X Pass through
Vendor Site Name Business Name, WIC Vendor 12-31 20 X Pass through
Peer Group Id WIC Vendor Peer Group Id 32-33 2 X Pass through
Filler Unmapped 34-37 4 X Pass through
Vendor Site Address 1 (Address, WIC Vendor Physical).Address Line 1 38-62 25 X Pass through
Vendor Site Address 2 (Address, WIC Vendor Physical).Address Line 2 63-87 25 X Pass through
Vendor City (Address, WIC Vendor Physical).Address City 88-112 25 X Pass through
Vendor State (Address, WIC Vendor Physical).Address State 113-114 2 X Pass through
Vendor Zip (Address, WIC Vendor Physical).Address Zip 115-123 9 9 Pass through
Vendor Corporate Name Unmapped 124-163 20 X Pass through
Vendor Contact Name Name, WIC Vendor Contact 114-163 20 X Pass through, parsed into various elements based on spaces. For example, John K. Doe would be parsed as First: John, Middle: K., Last: Doe. WEM makes a best guess at format of the name, but may not be accurate in all cases.
Vendor Mailing Address 1 (Address, WIC Vendor Mailing).Address Line 1 164-188 25 X Pass through
Vendor Mailing Address 2 (Address, WIC Vendor Mailing).Address Line 2 189-213 25 X Pass through
Vendor Mailing City (Address, WIC Vendor Mailing).Address City 214-238 25 X Pass through
Vendor Mailing State (Address, WIC Vendor Mailing).Address State 239-240 2 X Pass through
Vendor Mailing Zip (Address, WIC Vendor Mailing).Address Zip 241-249 9 9 Pass through
Vendor Site Phone Number Phone Number, Alternate WIC Vendor Contact 250-259 10 9 Pass through
Vendor Contact Phone Number Phone Number, WIC Vendor Contact 260-269 10 9 Pass through
Profile Number Profile Number 270-278 9 9 Pass through
NIT Unmapped 285-292 6 X Pass through
BIN Unmapped 285-292 8 9 Pass through
Effective Date Date, Being WIC Vendor 293-300 8 9 Pass through
Deactivation Date Date, End WIC Vendor 301-308 8 9 Pass through
Commissary Flag Unmapped 309-309 1 X Pass through
AplType Apl Type 310-310 1 X Pass Through
Filler Unmapped 311-113 3 X Dropped
Region Unmapped 314-318 5 X Dropped
County Unmapped 319-323 5 X Dropped
Clinic Unmapped 324-328 5 X Pass through
Filler Unmapped 310-342 18 X Pass through
Error Code Unmapped 343-346 4 X Derived based on Universal Interface response file
Response Code Unmapped 347-350 4 X Must be initialized to "0000"

WUMEI Fields not included in the legacy file, and are not mapped:

UPC-PLU-NTE / Approved Product List (APL) File

MIS Element WUMEI Name Position Length Type Notes
Record Type Unmapped 1-2 2 X Coded Value - 'DT'
Action Code Action code 3-4 2 X Coded Value - '002'
UPC/PLU Indicator Unmapped 5-5 1 X Maps into first digit of UPC/PLU data
UPC/PLU Number UPC/PLU Data 6-22 17 X Outbound version needs to include the UPC/PLU indicator
Product Description Item Description 23-64 42 X Pass through
Unit of Measure Benefit Unit Description 65-67 3 X Pass through
Manual Auth Hold Indicator Manual Voucher Indicator 68-68 1 X Coded Value - Requires Mapping
Category Category Code 69-70 2 9 Pass through
Subcategory Subcategory Code 71-73 3 9 Pass through
Quantity Benefit Quantity 74-78 5 999v99 Pass through
Maximum Price Array (21 Entries)   79-246 168 Mixed The following data elements are repeated for each UPC/PLU data element where an NTE price is provided:
  Peer Group Id   2 9 WIC Vendor Peer Group ID
  Peer Group Max Price   6 9999v99 NTE Price
Number of Peer Group Ids Number of WIC Vendor Peer Groups 247-248 2 x Pass Through
Expire Date Date, End UPC/PLU Data 255-262 8 9 Pass Through
Profile Number Unmapped 263-271 9 9 Dropped
Weight Product Indicator Unmapped 272-272 1 X Dropped - 57 272 – 272 Weight Product Indicator 1 X ‘0’ – Quantity used as applied units; ‘1’ – Weight of item(s) used as applied units. Standard default will be ‘0’. Note: CVV uses 0
Purchase Indicator Purchase Indicator 273-273 1 X Pass Through - Is item eligible for wildcard redemption. ‘0’ = Not eligible for wildcard redemption (restricted to specified Sub-category of food benefit issuance) ‘1’ = Eligible for wildcard redemption
Effective Date Date, Begin UPC/PLU Data 274-281 8 9 Pass Through - Date to start using UPC Zeros if unknown
Rebate Flag Rebate Flag 282-282 1 X Pass through - Y/N indicator used for Rebate Report
Price Type Code Price Type 283-284 2 X Pass Through - 00 = Do not provide max price to retailer; 01 = Provide max price to retailer; 03 = CVV price
UPC/PLU Length UPC/PLU Data Length 285-286 2 9 Pass Through - 62 288-289 UPC/PLU Length 2 9 Indicates the number of significant digits in the PLU/UPC
APL Type Length APL Type Length 290-290 1 9 Pass through - Number of APL Types reported for the UPC
APL Types List APL Type 291-299 9 9 Pass through - Right Padded, zero filled, starting at the indicated start position through the number of digits specified in APL Type Length, each digit represents a valid APL type.
Filler Unmapped 300-422 136 X Dropped
Error Code Unmapped 423-426 4 X Dropped
Response Code Unmapped 427-430 4 X Dropped

Processing Rules

UPC Format and Length

An important aspect of the UPC-PLU-NTE processing is ensuring the correct length for the UPC is submitted to the EBT processor. When working with different MIS systems the way a UPC is presented may vary considerably, and in some cases depending on how the file is generated it may come from the same MIS in multiple forms. With SPIRIT this is true. SPIRIT sometimes sends the UPC/PLU as a value that is 17 digits in length, and sometimes as a value that is less than 17 digits in length. Moreover, the value specified in the UPC/PLU Length Column may sometimes be 17, other times it may be a smaller number. However, according to the FNS Technical Implementation Guide a UPC entry may consist of a UPC/PLU indicator, the code itself, and a check digit. It can come with any combination of these two anomalies. Bear in mind, these three fields combined can be a maximum of 17 digits. However, the UPC Length field represents the length of the UPC Code and the Check Digit only. Therefore 17 is never a valid value for this field. The true maximum length of a UPC (for WIC purposes) is 16 digits. The EBT Processor expects the UPC to follow the format specified by the TIG, but with the length indication matching the actual UPC/PLU contained within.

When WEM receives any UPC value that is stated as 16 or less in the UPC/PLU Length column the system will convert the UPC by padding zeros and adding the indicator to provide a value that matches that of the TIG. If the length of the UPC/PLU code value 17 it is presumed that the value is preformatted by SPIRIT. A lesser length or lesser stated length is manipulated by WEM to ensure the correct format.

To format the value WEM will:

  1. Trim away any leading one (for the indicator).
  2. Trim away all leading zeros, leaving just the underlying code.
  3. Left pad the value with leading zeros to 16 digits
  4. Prepend a '1' for PLU values or a '0' for UPC values.

Once the value is correctly formatted, then WEM can proceed to calculate the correct length of the value. WEM assumes that a UPC-A format will be presented by SPIRIT this means the expectation is that SPIRIT has decompressed any UPC-E format UPCs in advance. Therefore, WEM can assume a 12 digit minimum size for a UPC record Note: This is not assumed for a PLU.

Initially, if the value reported in the file for UPC/PLU length is less than 17, assume that length is the real length. Otherwise, WEM will use the following logic to determine the length of the value: Note: UPC and PLU are handled slightly differently.

  1. Trim away the indicator.
  2. If the value is a PLU trim away all the leading zeros.
  3. If the value is a UPC trim away any leading zeros in excess of a 12-digit value.
  4. Count the digits in the remaining value and use that as the real length.

The value determined as the real length is submitted as the length in the converted file for the EBT system.