Find herewith complete list of API functions regarding Web sites and surveys.
Web pages
When you want to use Web Pages and Surveys of a Journey you have to use as idWebSite the value of the field idWebSite inside the Journey structure.
loginContact
It searches a contact in the database using the 'login field' defined for the database.
It returns results only if the contact is found, otherwise the result is empty.
Parameter | Type | Description |
---|---|---|
idDatabase | String | |
username | String | |
password | String | |
options | List of <Option> | Available options: Boolean log: It indicates to save on the database the 'attempt to login', by default is equals to 'false' String custom1: Application string to characterize the login attempt String custom2: Application string to characterize the login attempt String custom3: Application string to characterize the login attempt String custom4: Application string to characterize the login attempt String ip: IP address to register for the login attempt Boolean only_system_fields: For each contact will be uploaded only system fields (STATO, PRIMARYKEY, EMAIL, ...). This option is useful because it has faster execution and fewer data traffic on the network. String passwordField: It indicates the contact field where the password value is saved. The default value of this option is 'password'. |
Return values: MNContact
Permissions: Modify contact data of the database
getWebPageLink
Returns a link to display a web page.
You can also specify a contact id (so that it is "logged").
Parameter | Type |
---|---|
webpageId | String |
idcontact | String |
options | List of <Option> |
Return values: String
Permissions: Export data of contacts of database
findWebPageById
Returns information about a web page.
Parameter | Type |
---|---|
idPage | String |
Return values: List of MnPage
Permissions: Manage pages of the journey
getAllWebSites
List of all websites.
Return values: List of MnWebSite
Permissions: Manage all journeys
Surveys
createSimpleSurvey
Creates a survey.
Note: questions definition is not currently manageable with WSAPI.
Parameter | Type | Description |
---|---|---|
idWebsite | String | The idWebsite can be found in the Web tab of the journey Setup; where the information is not provided, the idWebsite corresponds to the idCampaign |
name | String | |
options | List of <Option> | No available options |
Return values: String
Permissions: Manage journey surveys
findSurveyById
Returns information about a survey.
Parameter | Type |
---|---|
idSurvey | String |
Return values: MnSurvey
Permissions: Manage journey surveys
getAllSurveys
Returns the list of all surveys defined in a journey.
Parameter | Type | Description |
---|---|---|
idWebsite | String | The idWebsite can be found in the Web tab of the journey Setup; where the information is not provided, the idWebsite corresponds to the idCampaign |
Return values: MnSurvey
Permissions: Manage journey surveys
getAllFieldsInPage
Returns the list of all fields used in a web page.
Parameter | Type |
---|---|
idPage | String |
Return values: MNFormField
Permissions: Manage journey surveys
getAllFieldsInSurvey
Returns the list of all fields used in a survey web pages.
Parameter | Type |
---|---|
idSurvey | String |
Return values: MNFormField
Permissions: Manage journey surveys
queryFormSubmissions
Returns a Rowset id with a form submission results.
If you want some RowSet's info, see Utility
If parameters 'from' and 'to' are valued, they filter the result according to the time of submission.
Parameter | Type | Description |
---|---|---|
idPage | String | |
from | Date | |
to | Date | |
showanonymous | Boolean | if "false" you can filter submissions displaying only those by "recognized contacts". |
Return values: String
Permissions: Manage journey surveys
fetchFormSubmissions
Returns a form submissions page.
If parameters "fromRow" and "toRow" are valued, only the results included between the lines pointed by the fromRow to the toRow values will be selected.
Note: in the field value there is the recorded value for each field. In case of "multiple choices" the value can appear several times (once for every single options indicated by the user)
Parameter | Type | Description |
---|---|---|
idRowSet | String | Is id returned by queryFormSubmissions |
fromRow | int | |
toRow | int |
Return values: List of MnFormSubmission
Permissions: Manage journey surveys and export data for contacts for all databases
querySurveySessions
Returns a RowSet id with the survey submissions results.
Please note that the results will include the test sessions as well.
If you want some RowSet's info, see Utility
If parameters "From" and "to" are valued, they filter the result according to time of submission.
Parameter | Type | Description |
---|---|---|
idSurvey | String | |
from | Date | |
to | Date | |
showanonymous | Boolean | if "false" you can filter submissions displaying only those by "recognized contacts". |
showuncompleted | Boolean | if "false" you can filter "not completed" submissions. |
Return values: String
Permissions: Manage journey surveys
fetchSurveySessions
Returns a survey submissions page.
Note: in the field value there is the latest recorded value for each field.
In case of "multiple choices" the value can appear several times (once for every single options indicated by the user)
Parameter | Type | Description |
---|---|---|
idRowSet | String | Is id returned by querySurveySessions |
fromRow | String | |
toRow | String |
Return values: List of MNSurveySession
Permissions: Manage journey surveys and export data for contacts for all databases