997 is the functional acknowledgement in X12. It will typically:
- indicate if the original X12 message is structurally valid or not
- optionally describe the errors found (data element too long, invalid control numbers etc)
- provide an acknowledgement code indicating if the message was accepted or not.
Sending Out 997 Acknowledgements
We provide the possibility to automatically generate 997s upon reception of an X12 message. Hence, if the message passed X12 validation (the acknowledgement is sent before checking the message against your message definition) we will send a positive acknowledgement. If the X12 validation failed we will try to construct a matching 997 describing the error. Note that depending on the nature of the error this may not succeed: we do not recover from certain structural errors. If the acknowledgement creation fails, then the message will be set in error and will indicate the failure of generating a 997. If the original message contains an FA functional group, then it will be ignored. If the interchange only contains functional acknowledgement groups no message will be generated at all.
Ultimately, when you choose to send out an acknowledgement, the system needs to know which gateway IN to inject it into. This configuration is available on the X12 message definition properties page:
A wizard can construct the separate channel which will send out the acknowledgements:
You can choose to reuse existing components or to build a completely new channel.
Babelway's 997s contain one functional group and transaction set per functional group found in the original message. Note that in Babelway a message either passes entirely or not at all. Thus, if you include multiple messages within an interchange and one of them is in error, the 997 produced will indicate all items are in error.
Below you will find the error codes we support:
A - message is accepted
E - message is accepted but errors were noted. Typically, if you choose not to validate segments or values but that errors were identified then we will send out this status.
R - message is rejected.
4 Group control number in the functional group header and trailer do not agree
5 Number of included transaction sets does not match actual count
3 Transaction set control number in header and trailer do not match
4 Number of included segments does not match actual count
5 One or more segments in error
5 Segment exceeds maximum use
8 Segment has data element errors
1 Mandatory data element missing
2 Conditional required data element missing
3 Too many data elements
5 Data element is too long
6 Invalid character in data element
8 Invalid date
9 Invalid time
On an X12 message definition OUT, you can choose for a message to "expect an acknowledgement". This means that after the message is sent out, it is only flagged in success if a successful 997 is received within a timeframe configured in your message definition. It will be set in error if after the timeout period no 997 is received or if a 997 indicated that the message was rejected (in part or fully).
This feature requires a matching channel capable of receiving messages from the partner to whom you're sending X12 messages. Additionnally, this channel needs to be configured to identify and match incoming 997s with pending messages.
A wizard assists you in guaranteeing that you have the right setup to identify matching acknowledgements. It allows you to configure a new gateway IN for your partner. If you already have a gateway configured to receive messages from this partner you can select the existing gateway and we will configure an additional channel around it. If you already have a channel starting with this gateway capable of handling 997s we won't create additional components and will simply indicate that an existing channel will handle these incoming acknowledgements.