Under what scope must control numbers be unique?
-
When generating control numbers for ISA and GS segments, what are the requirements for uniqueness? I have seen that the same value is frequently used for both the ISA and GS within an EDI file. I understand that the values should be incremented sequentially, but I'm not sure about the scope of these requirements:
- under what circumstances should the ISA / GS values be different from one another?
- should the control numbers I send be correlated with the values received from my trading partners (for example if they send 0003, should my next message use 0004), or should both parties track their values separately?
- is it acceptable to reuse the same number for the same trading partner when sending documents containing different transaction types (for example, using value 0005 for an invoice and then using 0005 again later when sending a ship notice)?
Thanks in advance for any help/guidance on this!
-
under what circumstances should the ISA / GS values be different from one another?
The control number for a GS segment should uniquely identify that GS segment. If each of your EDI messages only contain one GS segment per ISA segment then you can reuse the ISA control number. However, as soon as an ISA segment contains multiple GS segments, that trick doesn’t work anymore, because you’d have two different GS segments with the same control number.
There’s a subtlety, though: different GS segments can have the same control number if they have different values for GS01. So, if one GS segment contains invoices (IN) and the other contains ship notices (SH), it’s still fine to reuse the ISA control number for both of them. Only if you have multiple GS segments with the same GS01 do the control numbers have to be distinct. At least, according to the X12 standard. In practice, not all EDI systems understand this subtlety, so you’ll have to check with your trading partner.
should the control numbers I send be correlated with the values received from my trading partners (for example if they send 0003, should my next message use 0004), or should both parties track their values separately?
No, there’s no need to do that. In fact, some trading partners expect your control numbers to be sequential (even though the standard doesn’t require that), so if you start skipping numbers, they may think something went wrong. Check with your trading partner to be sure.
is it acceptable to reuse the same number for the same trading partner when sending documents containing different transaction types (for example, using value 0005 for an invoice and then using 0005 again later when sending a ship notice)?
According to the standard, that’s acceptable. As noted before, the standard says GS control numbers need to be unique with regards to GS01, but in practice, not all EDI systems handle this correctly. So, check with your trading partner.
Also note that transaction set identifier code (ST01) and functional identifier code (GS01) aren’t exactly the same. For example 997 Functional Acknowledgment and 999 Implementation Acknowledgment both have functional identifier code FA, so if you have one GS segment with 997s and one GS segment with 999s, they do need distinct control numbers.
For more nitty gritty, check out the article about control numbres on the Stedi blog.
-
@joost-agerbeek this is very helpful, thank you for the detailed reply!