VerifyPartner Activity
The VerifyPartner activity validates the trading partner credentials specified in the incoming document or verifies if a default trading partner was present for the supplier.
The VerifyPartner activity uses credentials in the MLXML header along with the BuyerKeys specified to validate and identify the trading partner sending the message. If the activity succeeds in verifying the trading partner, it updates the MLXML header with details of the validated credentials. If none of the credentials can be validated, the default trading partner is verified.
If the default Trading Partner also does not exist, the user is asked to create a Trading Partner before processing of the document continues.
In pseudo code:
If (TradingPartnerCredentials were specified) { Extract TradingPartnerCredentials from the incoming document; Add/Update the Credentials found in the message header of the MLXML Document; } For every credential specified in the document { Validate every Credentials specified in the Incoming document; } If (atleast one Credentials match) Update Mlxml Document; TradingPartnerFound = True; Else // No Credentials found or validated { if (Default TradingPartner specified exists) Update OrganisationID and Organization Name from Lookup in the Mlxml document BuyerFound=True; } else { BuyerFound=False; } }
The BuyerFound output variable of the activity can be used in the workflow to prompt a user to manually verify and add the trading partner into the system.