EDIFACT message guide · Control and acknowledgments

APERAK Application error and acknowledgement

The UN/EDIFACT message a receiving application uses to acknowledge a message or report that it was rejected because of errors.

Sent by
Receiver of the original message
Received by
Sender of the original message
Standard
UN/EDIFACT · Batch message
X12 equivalent
824 Application Advice

What is the EDIFACT APERAK message?

APERAK is the UN/EDIFACT application error and acknowledgement message. The directory gives it two functions: to inform a message issuer that its message was received by the addressee's application and rejected because of errors found during processing, and to acknowledge to the issuer that the addressee's application received the message.

APERAK works at the business level. A message can be syntactically correct, and acknowledged with CONTRL, but still be rejected by the application, for example because of an unknown product code or a duplicate invoice number. APERAK reports those problems so the sender can correct and resend.

How the EDIFACT APERAK message worksDiagram of the UN/EDIFACT APERAK Application error and acknowledgement message. Receiver of the original message sends it to sender of the original message. It usually follows INVOIC, ORDERS and DESADV. Inside the UNB and UNH envelopes, the directory D.21A requires, in the start of message: BGM (Beginning of message). 4 conditional segment groups are listed by their trigger segment.How the EDIFACT APERAK message worksApplication error and acknowledgement: who sends it, where it fits and what the directory marks mandatory1 WHERE IT FITSUSUALLY FOLLOWSINVOICInvoiceORDERSPurchase orderDESADVDespatch adviceAPERAKSENDERReceiver of theoriginal messageRECEIVERSender of the originalmessageCONTRL syntax report back, if agreedUSUALLY FOLLOWED BYNo business reply expected2 WHAT DIRECTORY D.21A REQUIRESInterchange: sender and recipient IDsUNB … UNZMessage APERAKUNH … UNTSTART OF MESSAGEBGMBeginning of messageBODY AND SEGMENT GROUPS+ 4 conditional groups, starting with:DOCRFFNADERCBlue box: mandatory segment group. Conditional groups are listed by the trigger segment that starts them; a group is sent only when its data applies.Conditional segments outside groups are not drawn.Structure: mandatory segments and groups in the UN/EDIFACT directory D.21A listing for APERAK. Your trading partner's implementation guide adds itsown requirements.
How the EDIFACT APERAK message worksDiagram of the UN/EDIFACT APERAK Application error and acknowledgement message. Receiver of the original message sends it to sender of the original message. It usually follows INVOIC, ORDERS and DESADV. Inside the UNB and UNH envelopes, the directory D.21A requires, in the start of message: BGM (Beginning of message). 4 conditional segment groups are listed by their trigger segment.How the EDIFACT APERAKmessage worksApplication error and acknowledgement: whosends it, where it fits and what the directorymarks mandatory1 WHERE IT FITSUSUALLY FOLLOWSINVOICInvoiceORDERSPurchase orderDESADVDespatch adviceAPERAKSENDERReceiver of theoriginalmessageRECEIVERSender of theoriginalmessageCONTRL syntax report back, if agreedUSUALLY FOLLOWED BYNo business reply expected2 WHAT DIRECTORY D.21A REQUIRESInterchange: sender and recipient IDs(UNB … UNZ)Message APERAK (UNH … UNT)START OF MESSAGEBGMBeginning of messageBODY AND SEGMENT GROUPS+ 4 conditional groups, starting with:DOCRFFNADERCBlue box: mandatory segment group. Conditionalgroups are listed by the trigger segment thatstarts them; a group is sent only when its dataapplies. Conditional segments outside groups arenot drawn.Structure: mandatory segments and groups in theUN/EDIFACT directory D.21A listing for APERAK.Your trading partner's implementation guide adds itsown requirements.

How to read this diagram: the top row shows who sends APERAK, to whom, and which messages usually come before and after it. The lower part shows what the directory D.21A itself requires: the envelopes around APERAK and the segments and segment groups it marks mandatory. Conditional groups are listed by their trigger segment rather than drawn in full. This is the directory's minimum, not a trading partner's requirement: a message implementation guide, such as an industry subset or a partner’s own guide, usually makes some conditional groups mandatory, restricts the codes and may use an older directory.

Expand diagram Download SVG

When it is used

  • Rejecting a message with business-level errors
  • Confirming that an application processed a message
  • Reporting errors in invoices, orders or despatch advices

Where it fits in the message flow

This message APERAK Application error and acknowledgement

Structure

Mandatory segments in APERAK (directory D.21A)

In UN/EDIFACT directory D.21A, the APERAK message has 17 segment positions arranged in 5 segment groups. These are the segments and segment groups marked mandatory at message level, in order; a mandatory group is shown with the segment that starts it. Segments inside conditional groups are needed only when the group is used. This is the directory’s requirement, not your trading partner’s: each partner’s message implementation guide names the directory it uses, often an older one such as D.96A or D.01B where the structure can differ, makes some conditional segments mandatory and restricts the codes.

  • UNH
  • BGM
  • UNT

Practical example

APERAK in practice

A retailer's invoice processing system receives an INVOIC that references an order number it does not know. It rejects the invoice with an APERAK giving the invoice number, the error code and a description. The supplier's EDI team corrects the order reference and resends the invoice the same day.

Implementation

Implementation considerations for APERAK

  • Agree which errors trigger APERAK and which codes describe them.
  • Route APERAKs to the team that can fix the data, not only to IT.
  • Distinguish APERAK (application) from CONTRL (syntax) acknowledgements.
  • Track rejected messages until a corrected version is accepted.

Related messages

Related control and acknowledgments messages

All 4 control and acknowledgments messages

Need help with APERAK?

ECOM maps, tests and monitors EDIFACT messages for your trading partners and integrates them with your ERP.