4.6.2. Assigning partners to messages

Assigning partners to the messages is automatically interesting, because it will allow you to view the partners directly involved in a message, make searches, e.g.: "give me all messages exchanged with partner X" or "make stats by partners", ... See the section Using partners for more details.

You can associate two partners with messages:

  • The Partner IN. It is the entity from which the message comes, the sender of the message.
  • The Partner OUT. It is the entity to which the message is adressed, the recipient of the message.

Partners IN and OUT in list of messages

Figure 4.220. Partners IN and OUT in list of messages

Assigning partners via 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 the easiest way, 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 just choose your partner. You have to define your partners first, so that you can choose it from the dropdown menu.

Assigning partners via gateways

Figure 4.221. Assigning partners via gateways

Assigning partners via MessageDefinitions

The previous case was very easy, but is not possible when your gateway is used to communicate to multiple partners. For example, if you setup an email Gateway IN to receive orders from all your clients, you can not associate this gateway to just one partner.

In this case, the only way to know the sender of the order is to open the order, and read the sender in it.

To do this in the interface, you have to go to the structure definition of the MessageDefinition, select the fields that contain the ids of the partners (VAT, GLN, ...), and set this info in the "Semantic field" zone.

Assigning partners via MessageDefinitions

Figure 4.222. Assigning partners via MessageDefinitions

To identify partners, you just need to designate one field with one id for the partner IN, and one field with one id for the partner OUT. Anyway, the interface also allows you to flag other fields to tell the system what they contain, like the name, or the address of the partners IN and OUT. This info is not needed to identify partners (ids are enough), but it can be interesting to complete it, as it can then be used to create your partners automatically from the data contained in your messages.

Designating other fields in MessageDefinition

Figure 4.223. Designating other fields in MessageDefinition

As for all other elements of the application, the changes will only apply after deployment of your environment. Changes in partners (add, delete, change of ids, ...) also need to be deployed to apply to production messages.

Conflicts during identification

Partners can be identified in four of the message processing steps. gatewayIn step (for partner IN), messageDefinitionIn step (IN and OUT), messageDefinitionOut step (IN and OUT) and gatewayOut step (OUT).

If you fill the partner info in just one of these steps, it will be enough for the system to extract the information.

Filling the information in many of these steps should not cause any problem, as the extracted info should be the same as each step. For example, there is no reason (apart from wrong configuration) for ids of the sender to be different in the source format of the message compared to the output format of the message.

Anyway, if it should happen, the message will not be set in error, and the first identified partner will be assigned to your message. A warning will also be added to the execution log of the message.

Message processing log - partner identification conflict

Figure 4.224. Message processing log - partner identification conflict