B2B Data Exchange determines the Profile or Endpoint to which send a message is sent, based on the following rules:
endpointName.
If the endpointName is set, the message is sent to the specified endpoint.
profileId/profileName.
If the profileId or profileName is set, the message is sent to the indicated profile.
accountNumber/partnerName:
If sendToAccount is set to True, then send the message to the endpoint associated with the given accountNumber/partnerName, which must be unique for the specified accountNumber/partnerName.
- OR-
If sendToAccount is not set (or set to False), then the profile is determined by the application, account, and partner.
If you want to route to an endpoint instead of a profile, it is strongly recommended that you use the accountNumber/partnerName routing method with sendToAccount set to True.