4.6.2. Assigning Partners to Messages
Assigning partners to messages serves multiple purposes in the application:
- Allows you to filter your messages not based on a gateway or message type (protocol related) but on a business partner. In the monitoring screen, you have partner in and out columns where you can quickly narrow down all the traffic going to a certain partner or coming from a certain partner.
- Allows you to enrich your messages. Sometimes, you need to convert a very limited message in into a more verbose message out. For partner information you can decide to store all the possible partner information directly in your partner and fetch it during the transformation to enrich your message with the partner's address, GLN, cost center etc. This design allows you to make sure that your message traffic is always pulling the latest partner information available just from updating your partner info in one location.
Thus, partners serve all sorts of use cases throughout the platform. See the section Using partners for more details.
Partner / Message Relationships
You can associate multiple partners with messages:
- The Partner IN is the entity which issues the message, its sender.
- The Partner OUT is the entity for which the message is intended, the recipient of the message.
- The Additional Allowed Partners is a list of partners that you wish to associate with the message but who are neither the sender nor the receiver of the message. For example, you may wish to associate your accounting department with all messages tied to invoices regardless to whom they are sent from or to. This feature is generally used in conjunction with portal users whose read access to messages is determined by the partners associated with them. Note that additional allowed partners are not searchable in the monitoring screen.
Partners IN and OUT in list of messages
Assigning Partners through Gateways
The easiest way to assign partners to messages is to tell the system "All the messages that are processed by this gateway come from partner X", or "All the messages that are processed by this gateway go to partner Y".
This is easiest when a specific gateway is only used to communicate with ONE partner.
To do this in the interface, you have to go to the Gateway Detail screen, in the General tab, and select your partner. You can also create the new partner directly from this screen.
Assigning partners via gateways
New partners are automatically deployed. Assigning a partner to a gateway however, is a change to a gateway. Gateways require a deployment for their new configuration to take effect. So, after updating the a gateway's partner, make sure to deploy your changes.
Assigning Partners via Channels
Sometimes, your gateway sends/receives traffic to/from multiple partners. At channel level however, you may know precisely which partners are involved. Thus, you can also assign partners IN and OUT through your channels:
Assigning Partners Through Transformations
You can also assign partners to messages directly in the transformation. Often, the information allowing you to identify a partner is contained in your messages. You can use that information in your mapping to find and set you partner IN, OUT dynamically using the findPartner function:
Additionally, you can check out the other partner related functions in the transformation. They will allow you to override existing partner assignments and use partner information to enrich your messages.
Also note that these functions are also available inside the document extractor extra-processing which provides an additional moment in the life of a message to link it to partners.
Partner Assignment Priority
Since you can assign partners at different moments during message processing, it's likely that at times you will be assigning partners through your gateway, transformations and possibly even channels in the same flow. This is not a problem but there is an order of priority to keep in mind if you want to know which partner will win in the end:
- Partner out assignments in your gateway out have the final say. Regardless what you have set elsewhere, if you set a partner in your gateway out, that is the one that will be set.
- Transformation partner assignments trump those from the message's channel and gateway IN.
- Gateway assignments trump assignments from the channel. The channel only assigns partners when they're empty (hence the interest of using a reset partner function). Thus, any other assignment takes precedence over this one.
Note that assignments in the document extractor behave exactly the same way as that of the transformation.
Child Messages
At various locations in the application, you can create child messages (splitting messages, generating messages in the transformation, requesting duplicates etc.). When this happens, the partner assignment is cascaded to the child message. That's what makes the resetPartner functions in the transformation useful:
They will allow you to correct partner assignment for child messages that are actually not tied to the same parties.