A Control Number Generator (CNG) is an object that assigns a sequential number to your trading partner's interchange, group, and message control numbers for outbound EDI documents.
Control numbers are unique values representing each level of the EDI document (interchange, group, and message). The Studio assigns this number when creating the envelope as part of outbound EDI processing.
The CNG supplies the value for a control number for each level of an outbound EDI document. Generally, one CNG object is created for each trading partner. In the example below, our trading partner ACME uses the following control numbers for an outbound EDI document:
- ACME-Interchange: 000000006
- ACME-Group: 3
- ACME-Message: 1
The values established above will increment each time the EDI document is enveloped.
For the most part, the CNG is primarily a “one and done” type of object; once defined and deployed there is seldom a need for editing or adjustment.
How the Object Works
The EDI Enveloper references the CNG as part of outbound EDI processing. Sometimes parent-child relationships between EDI Envelopers exist; in this case it is a good practice to populate the control number for the interchange at the parent level, while populating the control number for the group and message at the child level. An Auto counter check box in the EDI Enveloper editor can also be selected to automatically increment the control numbers to be used. It is important to note that using the check box will not increment CNGs that may be used by the Integration server. It is recommended to only use this counter when testing values in Local Test Server.
Note: Generally, per standard EDI protocol, you do not assign a control number to your message level. In this case, the Studio automatically assigns a control number of one, which increments until the next message level, at which point the control number returns to one.
Deployed CNGs (both to Local Test and Integration server) can be viewed in the Admin Console/Settings/Setting Types view.
To use this object, you must:
- Create the object.
- Define the name and number per your trading partner's envelope levels.
- Reference the object(s) from the EDI Enveloper object for that particular trading partner.