Go to Configuration > Trading Partners and click on Edit for the relation you want to link. You can select an existing group under Group Name, or alternatively you need to create a new group first via Configuration > Relation Groups.
In addition, you will need to go through the following steps to prevent the EDI Gateway from sending old order confirmations, packing lists, and/or invoices.
Look up the chain that creates messages for this particular relation group in Chain Configuration. When you fold out the chain, you will see that it has a Valid From date. Change this date to the present date and click Save.
Stop and start the service via Management > Service Monitor. With this, the new Valid From date will become active and the chain will skip all older messages.
Once the chain has run, the old messages will be flagged as processed. If desired, you can restore the Valid From date to its original value after this and restart the service once more.