Automatically processes a web waitlist entry to turn it into a real waitlist entry without human intervention.
[WebMethod(Description = "Processes a web waitlist with the specified ID, to turn it into a real waitlist entry")] public TAuthProcessedWebWaitlist ProcessWebWaitlist(string token, int webWaitlistId, bool updateMatches);
Parameters |
Description |
string token |
String containing a token. |
int webWaitlistId |
Integer ID of the web waitlist entry to process. |
bool updateMatches |
Boolean indicating whether to update the existing client if matched. If false, if the web client can be matched with an existing client, the existing client is not updated with the new details from the web client in this waitlist - if true, the existing client is updated. Note that this setting has no effect when the web client cannot be matched to an existing client and a new client is created. |
TAuthProcessedWebWaitlist containing the result of the process and, if successful, details of the processed waitlist entry.
As an alternative to having a VETtrak user manually match the client and process a web waitlist entry using the Process Web Enrolment extension, you may call this function to automatically process a web waitlist entry and turn it into a real waitlist entry.
The webWaitlistId parameter is the ID of the web waitlist entry to process. This should be the ID returned from AddClientWebWaitlist.
The updateMatches parameter indicates whether any existing clients or employers should be updated with details from the web enrolment, for any existing clients or employers that are automatically matched to any web client or web company in the web enrolment. If true and the email address of a client is updated, and that client's username was matching their email address, the client's username will also be updated to match the new email address - this will cause an error if there's already another client with a username matching that new email address.
In order to attempt to automatically match the web client with an client that may be in the VETtrak database, some simple automatic client matching rules are used:
Note that this means that duplicate clients could be created (due to differences in the names for example), but if this becomes a problem, VETtrak has a Merge Client function that allows a VETtrak user to merge duplicate clients.
If VETtrak's security settings are configured to use email addresses for usernames, and this function needs to add a new client, you should have specified an email address on the web client (otherwise the client will have no username and cannot log in), and there must be no other clients with a username matching that email address.
This function returns a TAuthProcessedWebWaitlist which, if successful, contains a TProcessedWebWaitlist object with details about the processed waitlist entry. This includes the new or matched client code and ID of the new wailist entry.
A token is passed for authentication. If the authentication fails, or other errors occur, nothing is updated. The result of the process is represented by a TAuthenticate object. If an error occurs, there are no side-effects in the database and, depending on the nature of the error, it may be possible to retry the process. If an error occurs with this function, it is recommended that you do not report this error to the web site user - instead, the error should be reported to an administrator as it may be possible for an administrator to make a fix and retry the web waitlist processing.
If the web client is matched to an existing client that is already on the waitlist for the programme, an error will be returned.
To be able to process a web wailist that contains custom data for a client, the DatabaseMapping.xml file must exist in IIS in the folder where the VT_API.asmx file is located (there is a web.config setting to change the location of this file if required).
Requires a valid registration key entry for the Short Courses feature.
This function has security level "Protected", and can only be accessed by users that have explicitly been granted permission to the API, or users with access to the "API Functions" feature in the VETtrak application.
Copyright (c) VETtrak 2022. All rights reserved.
|