Partner Types | Aayu Technologies Link Search Menu Expand Document

Partner Types

This feature caters for a very specific use case; if you are simply setting up a connection for directly exchanging production messages, you can most probably ignore this entire section.

If the partner has two AS2 IDs for Production and Testing, this feature does not apply to you

Production and Test partner types allow you to maintain separate configurations for your (and your partners’) test and production connections while using the same AS2 identifier; however, it should be used with caution, and proper understanding by both parties.

Partner types allow the same AS2 identifier (and identical or different configurations, as recommended/requested by your remote trading partner) to be reused as two Partners in the system, one of type Production and the other of type Test. Your partner can simply send messages to the respective endpoint (test URL vs production URL) to differentiate the environment, using the same AS2 ID, and keeping all other configurations unchanged on their side.

Generally in most cases, you can stick to Production type; otherwise you can first set up Test communications, and later - when you start exchanging production messages:

  • change the partner type to Production, and
  • instruct the partner to point the URL to AS2 Gateway production endpoint, keeping all other configurations unchanged.

You would need two partners of each type, only if you wish to continue to receive both test and production messages.

1 Use case scenario

Some trading partners prefer to maintain their test/UAT and production (prod) messages separate. This is usually achieved by having two AS2 partner configurations on their systems, which corresponds to having two trading stations on AS2 Gateway side.

  • However, for obvious reasons, these two remotely defined partners often have identical configurations - including messaging settings (encryption, signing etc.), partner certificates, and AS2 IDs.
  • Trading systems often send messages to both these endpoints from the same AS2 station on their side - again for obvious reasons of maintaining similar configurations on both test and production channels.

As such, the only difference between test and prod might be the endpoint/URL to which each message type would be sent.

This poses two problems for AS2 Gateway users:

  • AS2 Gateway needs each of its AS2 stations to have a unique AS2 ID (because it has to uniquely associate each incoming message with exactly one station). Hence, it is not possible to create a “test station” and “prod station” corresponding to the two remote partners that are present in the partner system.
  • With both test and prod messages coming in, from the same source AS2 ID (AS2-From, i.e. station AS2 ID on remote system), to the same target ID (AS2-To, i.e. partner AS2 ID configured on remote system), AS2 Gateway has no way of distinguishing test and prod messages.

2 Test/Production partner types

To mitigate the above problems, AS2 Gateway provides a mechanism to distinguish test and prod messages based on the incoming URL. Messages sent to the test URL will get associated with a “test” partner on the AS2 Gateway side, and those hitting the production URL will go under a “production” partner.

  • This way, the remote partner only has to vary the destination URL in his side, and AS2 Gateway will correctly identify and separate out incoming test and production messages.
  • Since AS2 Gateway now has two distinct partner configurations, you have the flexibility to configure outgoing messages for the two environments in whatever desired combination - either maintain identical configurations, or allow for variations (e.g. endpoint/URL and certificates).

3 Configuring test and/or production partners

Each type involves the same steps. Following are for a test partner; for prod, follow the same steps by interpreting “test” as “prod”.

  • Your trading partner sends you his partner configuration or profile (details of a local trading station defined on their side)
  • You define a test-type trading partner on AS2 Gateway, using the above information
  • You define a trading station on AS2 Gateway, in the usual manner
  • You send the partner configuration (profile) of this trading station to your trading partner, and instruct them to send messages to the test URL mentioned in it

Once testing is complete, you can either:

  • change the partner type to production: this would be applicable for most cases, where you would usually run in “production” mode once the setting up is complete - so that there would be no more “test” messages; or,
  • define a new partner of type production, probably with an identical configuration to the existing test partner: this would be useful if you intend to continue to exchange test messages alongside production traffic (for sanity purposes etc.)

In either case, in order to receive messages under the prod partner, you need to instruct your trading partner to start sending messages to the prod URL.

4 Troubleshooting

If your partner on AS2 Gateway is defined with type test but the partner system is sending messages to the prod URL (or vice versa), AS2 Gateway will reject these messages with HTTP 422 (unprocessable entry) errors; containing the plaintext response:

A PROD type AS2 Partner with the AS2 identifier <partner AS2 ID> is not found. Please try the TEST URL.

In such cases, the simplest solution is to switch the partner’s type on AS2 Gateway from test to production. Once you do that, your partner should be able to send messages to you, without making any changes to the current (prod) URL configured on their side.

Alternatively, you can also instruct your trading partner to switch the partner URL on their side, from test (with hostname test-service.as2gateway.com) to prod (with hostname service.as2gateway.com).

5 Difference between test and production partners and messages

From AS2 Gateway perspective, test and prod are two distinct partners - even though they have the same AS2 ID.

Accordingly, there is no specific distinction between test and prod messages; they are simply messages received under two trading partners.

However, since both partners have the same AS2 ID, your inbox/outbox will display messages from both partners - even when you filter them by the AS2 ID. To mitigate this, AS2 Gateway provides a Partner Type filter. Using this, you can choose to view either test or production messages only.

From the billing perspective as well, there is no “test” vs “production” messages distinction; both will count towards your monthly quota (and excess).