Try to get survey link by passing the user information.<br/>
The following is the example how to set the parameters.<br/>
GetSurveyLink tt = new GetSurveyLink()<br/>
TestWS.localhost.WebUser webUser = new TestWS.localhost.WebUser()<br/>
webUser.PodProjectID = '16052'<br/>
webUser.PodID = '9435'<br/>
webUser.EmailAddress = 'tyan@unifocus.com'<br/>
webUser.FirstName = 'Tom'<br/>
webUser.LastName = 'Yan'<br/>
webUser.RoomNo = '123'<br/>
webUser.RoomRate = '122.50'<br/>
TestWS.localhost.WebUserAttributes[] lst = new TestWS.localhost.WebUserAttributes[2]<br/>
TestWS.localhost.WebUserAttributes wbAttributes = new TestWS.localhost.WebUserAttributes()<br/>
wbAttributes.WebUserAttributeName = 'Wing Code'<br/>
wbAttributes.WebUserAttributeValue = '3'<br/>
lst[0] = wbAttributes<br/>
wbAttributes = new TestWS.localhost.WebUserAttributes()<br/>
wbAttributes.WebUserAttributeName = 'Number of Stays at Hotel'<br/>
wbAttributes.WebUserAttributeValue = '5'<br/>
lst[1] = wbAttributes<br/>
webUser.WebUserAttributes = lst<br/>
string surveyLink = tt.GetSurveyLinkString(webUser)
Return an empty WebUser object to be used to store some user info.<br/>
The data type of every input is string.<br/>
The first 3 are necessary which are podProjectID,
podID and emailAddress and the rest are optional.<br/>
About the Property LanuageID.<br/>
LanuageID=1(default), means English; else<br/>
7=French;8=German;9=Dutch;10=Spanish;11=Arabic;12=Chinese;
13=Danish;14=Finnish;15=Greek;<br/>16=Hebrew;17=Hindi;18=Hungarian;
19=indonesian;20=Irish;21=Italian;22=Japanese;23=Korean;<br/>
24=Norwegian;25=Persian;26=Polish;27=Portuguese;28=Romanian;29=Russian;
30=Swedish;<br/>31=TagalogFilipino;32=Thai;33=Turkish;34=Vietnamese.<br/>
webUser.WebUserAttributes is an array so you must pass an array of
WebUserAttributes objects to this property.
Return an empty WebUserAttributes object to be used to store some user attributes info. it is optional.
Returned String types:<br/>
http://s.unifocus.com/s.asp?PaperCode=WW6EXL5V42&FirstName=tom&LastName=Yan&Email=tyan@unifocus.com(English) or<br/>
http://survey.unifocus.com/survey.aspx?TCode=WW6EXL5V42&FirstName=tom&LastName=Yan&Email=tyan@unifocus.com(English)<br/>
The last three query strings are for the validation<br/><br/>
- Sent Before. The same email has been sent to this email address with 30 days(This amount of days is set in the Unifocus System. Ask unifocus if you want to change.)<br/>
- Invalid PodId:9435 or PodProjectID:16052, Please try again.(Invalid login, your PodID or PodProjectID is not in the unifocus system yet)<br/>
- This PodProjectID:16052 has not been set up yet, please try later!(The Unifocus system is not ready for you to get the survey link)<br/>
- Invalid Email Address:Tyan@unifocus..com for this PodProjectID:16054(Invalid Email)<br/>
- Invalid input of ..! The length should be less than 10 characters. Please try again.<br/><br/>
** If an error occurs in the system, Please contact the UniFocus support department. (Service@UniFocus.com)
The same function as the GetSurveyLinkString but instead of returning a string it will <br/>
return an Object 'SurveyLinkObject' which has 5 Properties: URL, Papercode, UserID, Status and Message.<br/>
The Status property has 7 types:<br/>
OK, SentBefore, SystemError, InvalidInput, InvalidPodProjectIDOrPodID, InvalidEmailAddress, NotReady.<br/>
with the detail message in the Message Property.<br/>
eg.<br/>
GetSurveyLink tt = new GetSurveyLink();<br/>
TestWS.localhost.WebUser webUser = new TestWS.localhost.WebUser();<br/>
Set the Values to this object webUser(mentioned above).<br/>
TestWS.localhost.SurveyLinkObject obj = tt.GetSurveyLinkObject(webUser);<br/>
if (obj.Status == TestWS.localhost.StatusOfSurveyLink.OK)<br/>
{<br/>
string url = obj.URL;<br/>
string paperCode = obj.PaperCode;<br/>
int userID = obj.UserID;<br/>
}<br/>
else<br/>
check the obj.Status and obj.Message.<br/><br/>
The papercode we return will be 10 characters and the URL will look similar to this:<br/>
http://survey.unifocus.com/survey.aspx?TCode=WW6EXL5V42
This method allows you to submit a list of WebUser objects at the same time.<br/>
return is an list of Results the each contain the input (Webuser) and Output (SurveyLinkObject) in the same sequence.
SurveyLinkObjects have 5 Properties: URL, Papercode, UserID, Status and Message.<br/>
The Status property has 7 types:<br/>
OK, SentBefore, SystemError, InvalidInput, InvalidPodProjectIDOrPodID, InvalidEmailAddress, NotReady.<br/>
with the detail message in the Message Property.<br/>
The papercode we return will be 10 characters and the URL will look similar to this:<br/>
http://survey.unifocus.com/survey.aspx?TCode=WW6EXL5V42
update all the values found in the properties of the WebUser which includes the WebUserAttributes <br/>
except PodProjectID and PodID.<br/>
for the WebUserAttributes, if matches the AttributeName, then update AttributeValue,<br/>
otherwise, insert into the WebUserAttributes table with this webUser, attrtibuteName and value.<br/>
Input: paperCode, WebUser.<br/>
Returned Object UpdatedStatus with two Properties: status and message.<br/>
e.g.<br/>
TestWS.localhost.UpdatedStatus status = tt.UpdateWebUserInfor('TRT4T0CIIV', webUser);<br/>
if (status.Status == TestWS.localhost.StatusOfUpdate.OK)<br/>
msg = status.Message;<br/>
else if (status.Status == TestWS.localhost.StatusOfUpdate.NoWebUserID)<br/>
msg = status.Message;<br/>
else if (status.Status == TestWS.localhost.StatusOfUpdate.InvalidInput)<br/>
msg = status.Message;<br/>
else<br/>
msg = status.Message;
Try to get survey link by passing the user information.<br/>
The following is the example how to set the parameters.<br/>
GetSurveyLink tt = new GetSurveyLink()<br/>
TestWS.localhost.WebUser webUser = new TestWS.localhost.WebUser()<br/>
webUser.PodProjectID = '16052'<br/>
webUser.PodID = '9435'<br/>
webUser.EmailAddress = 'tyan@unifocus.com'<br/>
webUser.FirstName = 'Tom'<br/>
webUser.LastName = 'Yan'<br/>
webUser.RoomNo = '123'<br/>
webUser.RoomRate = '122.50'<br/>
TestWS.localhost.WebUserAttributes[] lst = new TestWS.localhost.WebUserAttributes[2]<br/>
TestWS.localhost.WebUserAttributes wbAttributes = new TestWS.localhost.WebUserAttributes()<br/>
wbAttributes.WebUserAttributeName = 'Wing Code'<br/>
wbAttributes.WebUserAttributeValue = '3'<br/>
lst[0] = wbAttributes<br/>
wbAttributes = new TestWS.localhost.WebUserAttributes()<br/>
wbAttributes.WebUserAttributeName = 'Number of Stays at Hotel'<br/>
wbAttributes.WebUserAttributeValue = '5'<br/>
lst[1] = wbAttributes<br/>
webUser.WebUserAttributes = lst<br/>
string surveyLink = tt.GetSurveyLinkString(webUser)