Skip to content

Stacksync × Supabase Miami: AI-Native OperationsOct 13Reserve your spot

X12 transaction code

EDI 998 Set Cancellation (X12 998)

EDI 998 is the X12 Set Cancellation transaction set, used when a previously transmitted transaction needs cancellation. The rail shipper (the railroad's customer) sends the 998 to the rail carrier holding the previously submitted 404 bill of lading.

Standard
X12
Code
998
Partner references
4

At a glance

EDI 998 at a glance

What the 998 carries, who sends it to whom, when it goes out, and the segments trading partners list for it.

X12 998 Set Cancellation summary
Document X12 998 Set Cancellation
Business record Transaction cancellation request
Who sends it to whom The rail shipper (the railroad's customer) sends the 998 to the rail carrier holding the previously submitted 404 bill of lading.
When it is sent A rail shipment is cancelled or diverted after the bill of lading has been transmitted to the railroad but before the car is waybilled and moves.
Match on Original transaction reference and cancellation reason
Partner references 4 trading partners in this directory

Key segments in an EDI 998

The business segments that appear in at least half of the 4 partner document references listed below, most common first. The table leaves out envelope segments (ISA, GS, ST, SE, GE, IEA). Your partner guide sets which segments and elements your account must send.

Segment Name Purpose Partner references
ZD Transaction Set Deletion - ID, Reason, and Source This segment is used to specify the transaction set to be canceled. 4 of 4

Stacksync connects EDI documents such as the X12 998 to your ERP, CRM and databases with two-way sync. Read the EDI overview, check pricing and security, or book a demo to walk through your partner guide.

Implementation guide

X12 998 mapping and validation

X12 998 Set Cancellation is used when a previously transmitted transaction needs cancellation. Preserve original transaction reference and cancellation reason so the transaction cancellation request in your business system stays connected to the original document.

Use the version and implementation guide agreed with your trading partner to confirm required fields and responses.

Map records and test the business result
Document or decisionRecord and matching IDsWhat to test
Match the business record transaction cancellation request

original transaction reference and cancellation reason

  • Define which combination of original transaction reference and cancellation reason identifies one business record, its lines and any later revision.
Update the receiving system Processing the transaction cancellation request

ID assigned by the receiving system and processing result

  • Test cancellation of an unknown transaction and retain an explicit unresolved state.
  • Require business review when the original transaction has already caused a shipment or ledger entry.
Check the processing result Processing status for the transaction cancellation request

Original document reference and matching response

  • Reconcile the transaction cancellation request with the source after a timeout before sending it again. A lost response can occur after the destination has already processed the document.

Implementation steps

  1. Choose the starting event and owner

    Decide which application acts when a previously transmitted transaction needs cancellation. Name the operational owner of the transaction cancellation request and the team that resolves rejected or ambiguous messages.

  2. Keep record IDs connected

    Map original transaction reference and cancellation reason. Confirm qualifiers, code lists, units and date/time meaning against the agreed X12 version and partner guide. Preserve the source reference alongside any new destination identifier.

  3. Test failures before launch

    Run the failure cases in the mapping table against realistic transaction cancellation request data. Check how the receiving system reports a rejection and how your team corrects it without creating a duplicate.

  4. Track every document to completion

    Record transport delivery and document validation separately from successful transaction cancellation request processing. Give unresolved errors an owner and check the receiving system before approving retries.

Go-live checklist

  • An approved 998 sample and the agreed version and partner guide are available.
  • The mapping tests pass with realistic transaction cancellation request data.
  • Each submitted document can be traced through delivery, validation and processing in the receiving system.
  • Your team knows how to investigate and recover a rejected or timed-out transaction cancellation request without processing it twice.

Document structure

X12 998 Set Cancellation at the element level

The X12 998 reference contains 5 segment entries and 34 data elements; 30 are marked mandatory in this reference. Use the version and partner guide agreed for your account to confirm required fields.

Segments
5
Data elements
34
Mandatory elements
30
Segments with elements marked mandatory in this reference
Segment Elements Mandatory
ZD 8 4
Key identifiers in 998
  • Transaction Set Identifier Code
  • Equipment Initial
  • Equipment Number
  • Correction Indicator Code

Find your trading partner for X12 998

4 partners, 4 channels. Choose a channel to inspect its listed document reference and implementation context.

Catalog breakdown

Where X12 998 Set Cancellation appears in this catalog

The largest groups of classified 998 catalog entries are in logistics & transport.

By industry

  • logistics & transport 4 channels

FAQ

EDI 998 questions

What is an EDI 998?

EDI 998 is the X12 Set Cancellation transaction set. Trading partners use it when a previously transmitted transaction needs cancellation. It carries the data for the transaction cancellation request, and your system matches it on original transaction reference and cancellation reason.

Who sends an EDI 998 and who receives it?

The rail shipper (the railroad's customer) sends the 998 to the rail carrier holding the previously submitted 404 bill of lading. Your trading partner agreement confirms the direction and version for your account.

When is an EDI 998 sent?

A rail shipment is cancelled or diverted after the bill of lading has been transmitted to the railroad but before the car is waybilled and moves. Your partner guide sets any deadline or schedule for the document.

What are the key segments in an EDI 998?

Across 4 partner document references listed here, the business segments that appear most often include ZD (Transaction Set Deletion - ID, Reason, and Source). Each partner guide sets which segments and elements your account must send.

What should I map for X12 998?

Start with original transaction reference and cancellation reason and the target transaction cancellation request. Define duplicate detection, allowed updates and response correlation before mapping individual fields. Use the partner guide to check required fields and their formats.

How should I test 998 error handling?

Test cancellation of an unknown transaction and retain an explicit unresolved state. Require business review when the original transaction has already caused a shipment or ledger entry. Also test a lost response after destination processing so that a retry cannot create an unintended duplicate or repeated adjustment.

Which partners list X12 998?

The directory on this page links 4 partner entries that list this message. Choose your partner and channel, then confirm which messages and versions your account requires.

How does 998 relate to other EDI messages?

Keep 998 business processing separate from transport receipt and technical validation. Agree which preceding record, response or reconciliation completes the transaction cancellation request workflow; confirm any required companion messages with your partner.

Connect EDI to your business systems

See how Stacksync can fit your enterprise EDI workflow. Bring one partner guide and a sample exchange to plan the system mapping, exception handling and production rollout.