824 Application Advice

Functional Group ID=AG

Introduction:

This Draft Standard for Trial Use contains the format and establishes the data contents of the Application Advice Transaction Set (824) for use within the context of an Electronic Data Interchange (EDI) environment. The transaction set can be used to provide the ability to report the results of an application system's data content edits of transaction sets. The results of editing transaction sets can be reported at the functional group and transaction set level, in either coded or free-form format. It is designed to accommodate the business need of reporting the acceptance, rejection or acceptance with change of any transaction set. The Application Advice should not be used in place of a transaction set designed as a specific response to another transaction set (e.g., purchase order acknowledgment sent in response to a purchase order).

PLEASE READ NOTES:

This transaction will be used by AAFES to report application errors from the business application systems.  Application errors will not be communicated via phone, fax, or paper once the 824 is moved to production nor 810 data will be provided as data can be pulled from partner’s application. 

AAFES will not use the 824 to acknowledge receipt of transmissions with no errors.

All errors on a document will be reported. 	

Heading:

Page	Pos.	Seg.		Req.		Loop	Notes and
No.	No.	ID	Name	Des.	Max.Use	Repeat	Comments	
3	0100	ST	Transaction Set Header	M	1									
4	0200	BGN	Beginning Segment	M	1									
			LOOP ID - N1			>1								
5	0300	N1	Name	O	1									
Not Used	0400	N2	Additional Name Information	O	2									
Not Used	0500	N3	Address Information	O	2									
Not Used	0600	N4	Geographic Location	O	1									
Not Used	0700	REF	Reference Identification	O	12									
Not Used	0800	PER	Administrative Communications Contact	O	3									

Detail:

Page	Pos.	Seg.		Req.		Loop	Notes and
No.	No.	ID	Name	Des.	Max.Use	Repeat	Comments	
			LOOP ID - OTI			>1								
6	0100	OTI	Original Transaction Identification	M	1		n1							
Not Used	0200	REF	Reference Identification	O	12		n2							
Not Used	0300	DTM	Date/Time Reference	O	2		n3							
Not Used	0400	PER	Administrative Communications Contact	O	3		n4							
Not Used	0500	AMT	Monetary Amount	O	>1		n5							
Not Used	0600	QTY	Quantity	O	>1		n6							
Not Used	0650	NM1	Individual or Organizational Name	O	9		n7							
			LOOP ID - TED			>1								
8	0700	TED	Technical Error Description	O	1									
Not Used	0800	NTE	Note/Special Instruction	O	100									
	0820	RED	Related Data	O	100		n8							
														
			LOOP ID - LM			>1								
Not Used	0850	LM	Code Source Information	O	1		n9							
			LOOP ID - LQ			100								
Not Used	0860	LQ	Industry Code	M	1									
Not Used	0870	RED	Related Data	O	100		n10							
														
	0900	SE	Transaction Set Trailer	M	1									

Notes:
This transaction will be used by AAFES to report application errors from the business application systems.  Application errors will not be communicated via phone, fax, or paper once the 824 is moved to production nor 810 data will be provided as data can be pulled from partner’s application. 

AAFES will not use the 824 to acknowledge receipt of transmissions with no errors.

All errors on a document will be reported.

	Segment:	ST Transaction Set Header
	Position:	0100
	Loop:
	Level:	Heading
	Usage:	Mandatory
	Max Use:	1
	Purpose:	To indicate the start of a transaction set and to assign a control number
	Syntax Notes:
	Semantic Notes:	1	The transaction set identifier (ST01) is used by the translation routines of the interchange partners to select the appropriate transaction set definition (e.g., 810 selects the Invoice Transaction Set).
		2	The implementation convention reference (ST03) is used by the translation routines of the interchange partners to select the appropriate implementation convention to match the transaction set definition.
	Comments:

Data Element Summary
	Ref.	Data	
	Des.	Element	Name	    Attributes 
   
M	ST01	143	Transaction Set Identifier Code	M	1 	ID 3/3	
	Code uniquely identifying a Transaction Set	
 	824		Application Advice

M	ST02	329	Transaction Set Control Number	M	1 	AN 4/9	
	Identifying control number that must be unique within the transaction set functional group assigned by the originator for a transaction set	
				 
                                     Example:  ST*824*0001~

	Segment:	BGN Beginning Segment
	Position:	0200
	Loop:
	Level:	Heading
	Usage:	Mandatory
	Max Use:	1
	Purpose:	To indicate the beginning of a transaction set
	Syntax Notes:	1	If BGN05 is present, then BGN04 is required.
	Semantic Notes:	1	BGN02 is the transaction set reference number.
		2	BGN03 is the transaction set date.
		3	BGN04 is the transaction set time.
		4	BGN05 is the transaction set time qualifier.
		5	BGN06 is the transaction set reference number of a previously sent transaction affected by the current transaction.
	Comments:

Data Element Summary
	Ref.	Data	
	Des.	Element	Name	    Attributes 
   
M	BGN01	353	Transaction Set Purpose Code	M	1 	ID 2/2	
	Code identifying purpose of transaction set	
 		00		Original

M	BGN02	127	Reference Identification	M	1 	AN 1/50	
	Reference information as defined for a particular Transaction Set or as specified by the Reference Identification Qualifier
	
	The first part is the sender's internal number used to identify this transaction set within the sender's application system. This number is the invoice date, invoice number, and PO number from the 810 transmission.

Example 824:  BGN*00*2014120234413268 0068565960*20141202~
Example 810:  BIG*20141202*34413268**0068565960~

Note:  
If no invoice date, invoice number, or PO number is sent on 810 the BGN will indicate the following:
BGN*00*2014120234413268 NO PO*20141202~
           
BGN*00*20141202NO INVOICE 0068565960*20141202~
           
BGN*00*NO DATE34413268 0068565960*20141202~

M	
BGN03	
373	
Current Date	
M	
1 	
DT 8/8	
	Date expressed as CCYYMMDD where CC represents the first two digits of the calendar year
	
	Example 824:  BGN*00*2014120234413268 0068565960*20141202~

	Segment:	N1 Name
	Position:	0300
	Loop:	Mandatory
	Level:	Heading
	Usage:	Mandatory
	Max Use:	1
	Purpose:	To identify a party by type of organization, name, and code
	Syntax Notes:	1	At least one of N102 or N103 is required.
		2	If either N103 or N104 is present, then the other is required.
	Semantic Notes:
	Comments:	1	This segment, used alone, provides the most efficient method of providing organizational identification. To obtain this efficiency the "ID Code" (N104) must provide a key to the table maintained by the transaction processing party.
		2	N105 and N106 further define the type of entity in N101.

Data Element Summary
	Ref.	Data	
	Des.	Element	Name	    Attributes 
   
M	N101	98	Entity Identifier Code	M	1 	ID 2/3	
	Code identifying an organizational entity, a physical location, property or an individual
	
 	TO		Message To	
 	FR		Message From
	
	N102	93	Name	X	1 	AN 1/60	
	Free-form name
	
M	N103	66	Identification Code Qualifier	X	1 	ID 1/2	
	Code designating the system/method of code structure used for Identification Code (67)	
 	1		D-U-N-S Number, Dun & Bradstreet	
 	9		D-U-N-S+4, D-U-N-S Number with Four Character Suffix	
 	92		Assigned by Buyer or Buyer's Agent
	
M	N104	67	Identification Code	X	1 	AN 2/80	
	Code identifying a party or other code	

Example:  N1*TO*STACY ABC*9*0010111110000~
Example:  N1*FR* HQ – Army/Air Force Exch SVC *92*1018542~

	Segment:	OTI Original Transaction Identification
	Position:	0100
	Loop:	OTI        Mandatory
	Level:	Detail
	Usage:	Mandatory
	Max Use:	1
	Purpose:	To identify the edited transaction set and the level at which the results of the edit are reported, and to indicate the accepted, rejected, or accepted-with-change edit result
	Syntax Notes:	1	If OTI09 is present, then OTI08 is required.
	Semantic Notes:	1	OTI03 is the primary reference identification or number used to uniquely identify the original transaction set.
		2	OTI06 is the group date.
		3	OTI07 is the group time.
		4	If OTI11 is present, it will contain the version/release under which the original electronic transaction was translated by the receiver.
		5	OTI12 is the purpose of the original transaction set, and is used to assist in its unique identification.
		6	OTI13 is the type of the original transaction set, and is used to assist in its unique identification.
		7	OTI14 is the application type of the original transaction set, and is used to assist in its unique identification.
		8	OTI15 is the type of action indicated or requested by the original transaction set, and is used to assist in its unique identification.
		9	OTI16 is the action requested by the original transaction set, and is used to assist in its unique identification.
		10	OTI17 is the status reason of the original transaction set, and is used to assist in its unique identification.
	Comments:	1	OTI02 contains the qualifier identifying the business transaction from the original business application, and OTI03 will contain the original business application identification.
		2	If used, OTI04 through OTI08 will contain values from the original electronic functional group generated by the sender.
		3	If used, OTI09 through OTI10 will contain values from the original electronic transaction set generated by the sender.

Data Element Summary
	Ref.	Data	
	Des.	Element	Name	    Attributes   
 
M	OTI01	110	Application Acknowledgment Code	M	1 	ID 1/2	
	Code indicating the application system edit results of the business data	
 	IR		Item Reject	
 	TA		Transaction Set Accept	
 	TE		Transaction Set Accept with Error	
 	TR		Transaction Set Reject
	
M	OTI02	128	Reference Identification Qualifier	M	1 	ID 2/3	
	Code qualifying the Reference Identification	
	Identifies error transaction set key field. For example, Transaction Set 810 key is invoice number.	
 	08		Carrier Assigned Package Identification Number	
	A reference number assigned by a carrier to uniquely identify a single package	
 	1X		Credit or Debit Adjustment Number	
 	2F		Consolidated Invoice Number	
 	BM		Bill of Lading Number	
 	CN		Carrier's Reference Number (PRO/Invoice)	
 	IV		Seller's Invoice Number	
 	PD		Promotion/Deal Number	
 	PO		Purchase Order Number	
 	SI		Shipper's Identifying Number for Shipment (SID)	
	A unique number (to the shipper) assigned by the shipper to identify the shipment	
 	TN		Transaction Reference Number	
 	VP		Vendor Product Number	
	A unique number assigned by a vendor or manufacturer to identify its products
	
M	OTI03	127	Reference Identification	M	1 	AN 1/50	
	Reference information as defined for a particular Transaction Set or as specified by the Reference Identification Qualifier

This is the invoice number from the 810 - invoice that rejected.
Example: OTI*IR*IV*34413268*****1932*1932*810~                  	
M	OTI08	28	Group Control Number	X	1 	N0 1/9	
	Assigned number originated and maintained by the sender	
	Contains GS06 data contents from the original 810 functional group generated by the sender.

Example 824:  OTI*IR*IV*34413268*****1932*1932*810~
Example 810:  GS*IN*9726060604*001695568GT*20141202*1215*1932*X*005010~

M	
 OTI09	
329	
Transaction Set Control Number	
O	
1 	
AN 4/9	
	Identifying control number that must be unique within the transaction set functional group assigned by the originator for a transaction set	
	Contains ST02 data contents from the original transaction set header generated by the sender.

Example 824:  OTI*IR*IV*34413268*****1932*1932*810~
Example 810:  ST*810*1932~	

M	
OTI10	
143	
Transaction Set Identifier Code	
O	
1 	
ID 3/3	
	Code uniquely identifying a Transaction Set	
	Contains ST01 data contents from the original transaction set header generated by the sender.  

Example 824:  OTI*IR*IV*34413268*****1932*1932*810~
Example 810:  ST*810*1932~	

	Segment:	TED Technical Error Description
	Position:	0700
	Loop:	Mandatory
	Level:	Detail
	Usage:	Mandatory
	Max Use:	1
	Purpose:	To identify the error and, if feasible, the erroneous segment, or data element, or both
	Syntax Notes:
	Semantic Notes:
	Comments:	If used, TED02 will contain a generic description of the data in error (e.g., part number, date, reference number, etc.).

Notes:		Separate iterations of the TED loop should be generated for each error condition detected.
The codes listed for TED02 may not be used in conjunction with any code other than 024 in TED01.

Example 824: TED*012*THE 7 DIGIT FACILITY # (N104) DOES NOT EXIST FOR THE ST.~
           TED*024*ITD07 MUST BE GREATER THAN ITD05~

Data Element Summary
	Ref.	Data	
	Des.	Element	Name	    Attributes  
  
M	TED01	647	Application Error Condition Code	M	1 	ID 1/3	
	Code indicating application error condition	

007 – Missing Data
POI – Purchase Order Number Invalid
MF – Missing or Invalid Internal Vendor Number
848 – Incorrect Data
012 – Invalid Combination
010 – Total Out Of Balance

Error Codes	Error Msg For 810
	
007	THE N1 SEGMENT IS REQUIRED FOR THE ST OR BY	
007	THE N1 SEGMENT IS REQUIRED FOR THE RI	
007	THE DTM SEGMENT (DTM01 = '011') IS REQUIRED	
007	THE IT1 SEGMENT IS REQUIRED	
007	REF SEGMENT IS REQUIRED (REF01 = 'BM', 'CT', 'DJ', or 'IA')	
POI	PO MUST BE TEN CHARACTERS IN LENGTH	
POI	PO MUST BE NUMERIC	
POI	PO MUST BE NUMERIC AND TEN DIGITS IN LENGTH	
POI	PO MUST BE TEN DIGITS IN LENGTH	
MF	WHEN REF01='IA',REF02 MUST = 8 DIGIT PROCUREMENT CODE	
007	THE ID CODE QUALIFIER (N103) IS REQUIRED FOR THE ST	
848	QUALIFIER (N103) CAN ONLY BE '9', '92', OR 'UL' FOR THE ST	
848	QUALIFIER (N103) CAN ONLY BE '9', '92', OR 'UL' FOR THE BY	
848	QUALIFIER (N103) CAN ONLY BE '1', '9', OR '92' FOR THE RI	
848	N104 NEEDS TO BE '9', '13', OR '8' CHAR FOR THE RI	
012	WHEN N103 = '1', N104 MUST = 9 DIGIT DUNS FOR THE RI	
012	WHEN N103 = '9', N104 MUST = 13 CHAR DUNS +4 FOR THE RI	
012	WHEN N103 = '92', N104 MUST = 8 DIGIT PAY CODE FOR RI
	
848	9 DIGIT DUNS # + FOUR DOES NOT EXIST IN SYSTEM FOR THE RI	
848	13 DIGIT DUNS # DOES NOT EXIST IN SYSTEM FOR THE RI	
848	ITD05 MUST BE > THAN ZERO AND ITD07 MUST BE > THAN ITD05	
007	WHEN ITD03 EXIST THEN ITD05 IS REQUIRED	
848	ITD07 IS REQUIRED & MUST BE > THAN ITD05	
848	ITD07 MUST BE GREATER THAN ITD05	
848	QUANTITY INVOICED (IT102) CANNOT BE ZERO	
848	UNIT PRICE (IT104) CANNOT BE ZERO	
848	IT102 AND IT104 CANNOT BE NEGATIVE; ONLY ONE OR THE OTHER	
848	IF ONE IT102 IS NEGATIVE, ALL IT102 VALUES MUST BE NEGATIVE	
848	IF ONE IT104 IS NEGATIVE, ALL IT104 VALUES MUST BE NEGATIVE	
007	IT106 ELEMENT IS REQUIRED	
007	IT107 ELEMENT IS REQUIRED	
007	IT106 & IT107 ELEMENTS ARE REQUIRED	
848	IT106 IS INVALID. MUST BE ONLY EN, UA, UI, UK, UP, EO or IB	
848	IT107 MUST BE NUMERIC	
012	IT107 MUST BE 13-DIGIT EAN NUMBER AND IT MUST BE NUMERIC	
012	IT106 IS ‘EN’, IT107 MUST BE 13-DIGIT EAN NUMBER	
848	IT107 MUST BE NUMERIC	
012	IT107 MUST BE 8-DIGIT EAN NUMBER AND IT MUST BE NUMERIC	
012	IT106 IS ‘EO’, IT107 MUST BE 8-DIGIT EAN NUMBER	
848	IT107 MUST BE NUMERIC	
012	IT107 MUST BE 13-DIGIT INTL STND BOOK # AND MUST BE NUMERIC	
012	IT106 = 'IB', IT107 MUST BE 13-DIGIT INTL STANDARD BOOK #  	
012	IT107 MUST BE 12-DIGIT UNIT UPC OR CASE UPC AND BE NUMERIC	
012	IT106 IS UA/UP, IT107 MUST BE 12-DIGIT UNIT UPC OR CASE UPC	
012	IT107 MUST BE 14-DIGIT GTIN AND IT MUST BE NUMERIC	
012	IT106 IS UK, IT107 MUST BE 14-DIGIT GTIN	
012	IT107 MUST BE 11-DIGIT UPC CONSUMER PKG CODE AND NUMERIC	
012	IT106 IS UI, IT107 MUST BE 11-DIGIT UPC CONSUMER PKG CODE	
007	THE AMOUNT (SAC05) AFTER IT1 SEGMENT IS REQUIRED	
848	THE AMOUNT (SAC05) AFTER IT1 SEGMENT CANNOT BE < ZERO (0)	
007	AMOUNT (TDS01) IS REQUIRED	
848	AMOUNT (TDS01) CANNOT BE ZERO	
010	TDS01 HAS UNDERCHARGE AMT: $17.28 FOR INV: 79774658	
848	Number of line items[0] is not equal to CTT01	

M	
TED02	
3	
Free Form Message	
O	
1 	
AN 1/60	
		
	When TED01 contains code 024, TED02 must contain either application error code or free-form text description of the application error.  For example, TED01 contains code 010, TED02 contains "SUM of SKU cost extensions does not equal total invoice.

							

	
	
	Segment:	SE Transaction Set Trailer
	Position:	0900
	Loop:
	Level:	Detail
	Usage:	Mandatory
	Max Use:	1
	Purpose:	To indicate the end of the transaction set and provide the count of the transmitted segments (including the beginning (ST) and ending (SE) segments)
	Syntax Notes:
	Semantic Notes:
	Comments:	1	SE is the last segment of each transaction set.

Data Element Summary
	Ref.	Data		
	Des.	Element	Name	    Attributes    
M	SE01	96	Number of Included Segments	M	1 	N0 1/10	
	Total number of segments included in a transaction set including ST and SE segments	
M	SE02	329	Transaction Set Control Number	M	1 	AN 4/9	
	Identifying control number that must be unique within the transaction set functional group assigned by the originator for a transaction set