edix12

Is there an EDI Segment that can contain more than 256 characters?


Is there an EDI x12 segment that has no character limit? We often use the MSG segment for open text fields but this is capped at 256 characters, so we’re looking for an alternative that can handle 500+ characters.


Solution

  • The short answer

    The MTX Text segment allows you to send messages of up to 4096 characters long, which is the longest available in X12. You can’t just swap out an MSG segment for an MTX segment, though. You can only use MTX if it’s included in the transaction set, and that depends on which X12 'release' (version) you're using.

    For the 005010 release (one of the more popular ones), here are the transaction sets that MTX appears in:

    Some additional clarification

    Now, back to your original question: is there a data element that allows for a larger character payload?

    The answer is that there are 8 data elements that accept a payload larger than 264 characters.

    Two of them are binary data types, which we can likely eliminate off the bat:

    The rest are strings, which is promising:

    And, last but not least:

    Looks like a winner!

    Note that element 1551 appears in only one segment: MTX, which was introduced in the 003060 X12 release. And in the initial 003060 release, it was only included in one X12 Transaction Set: 194 Grant or Assistance Application (which makes sense – a longer field was needed for grant applications).

    It seems that as new releases were developed, the MTX segment made its way into more and more transaction sets – likely for exactly the reason you're asking. In 003070, it was included in 5 transaction sets; in 004010, 15; in 005010, 24, and so on.

    The MTX segment uses element 1551 in both MTX02 and MTX03, so you can get double the length by using both of them. Note that there's a 'relational condition': If MTX-03 is present, then MTX-02 is required (in other words, you can't use MTX03 if you don't use MTX02 first).

    And depending on the transaction set, the MTX segment may be able to be repeated as well.

    Long story short: if the MTX segment is in the transaction set / release you're using, you're likely in luck.

    Hope this helps.