SOAP API examples
You can find the most frequently used APIs and their implementation examples on this page.
Users Import Use case
This use case shows how users can be imported into Form.com Database. There is a user's database in the form of Excel's spreadsheet that stores the client's user data with its number of fields, involving a role-based structure.
With the help of given services import the users' data from User module into Form.com's database and set:
expirationDate - 1 year for all account types.
the number of accounts for ACCESS_LEVEL_ADMIN, MULTIUSER_ADMIN - 10
the number of credits according to the account type: ACCESS_KEVEL_ADMIN - 1000, MULTIUSER_ADMIN - 1000, SINGLE_USER - 50.
Create and Send Form Use Case
This use case shows how a new form can be created and submitted to respondents.
It does the following: Creates the form that contains all supported question types (except of Compare one against another, Object lookup and Multiple Object Lookup) and sends the unique links for filling in the forms to respondents to the indicated e-mail addresses.
Access Level Use Case
This use case shows how access level functionality can be used to enable only VIEW, EDIT or LAUNCH permissions to certain forms for specified users.
It does the following: Creates the user of TYPE_ACCESS_LEVELS_MASTER account type with 100 credits and 5 accounts. Creates for this users 3 accounts of TYPE_ACCESS_LEVELS_SINGLE_USER type.
Creates 3 forms with certain questions under previously created user of TYPE_ACCESS_LEVELS_MASTER account type.
Through the web interface set the rights for the created accounts of TYPE_ACCESS_LEVELS_SINGLE_USER type in the following way:
For the first user get the rights for reading
For the second user set the rights for creating and editing
For the third user set the rights for launching
Select Filtered Respondents Use Case
This use case shows how to filter respondents submitted a certain form by their responses.
There is an active form with some respondents and a need to filter all respondents who respondent in the same way to 3 questions.
Launch with Autofill Use Case
This use case shows how to submit a form with autofill to respondents.
It does the following: Creates a sample form containing 3 questions. Then sends the unique links of this form via email to the certain number of respondents. The form will contain the unique information per each respondent, for example, First name and Last name.
Launching forms
One of the frequent use cases for programmatic access to the FORM platform is sending our email invitations or auto-filling information using unique passwords to forms and surveys created with the FORM platform.
FORM platform allows to prefill response data, generate unique links, distribute the unique links via email or provide password protected access to forms or surveys. All this functionality is available through the WorldAPP SOAP API and is located in the Launch Management Service.
Here's a quick example of how to generate a set of unique links and distribute them to people who are supposed to fill out the form. Pre-filling the information, generating unique links and sending out the email invitation is all performed with a single API call:
CODE
|
This method takes the form ID that has to be launched, the type of the URL that has to be sent (secure, domain name or IP address based) and the list of data that has to be pre-filled. Each of the pre-fill data sets has to be an instance of the WSAutoFill class, which contains an email address and a list of instances of WSAutofillDataItem, which in turn specifies what questions have to be pre-filled with what values.
The email parameters, such as the Subject and the Body of the email can be customized through the FORM application user interface or programmatically using the following methods in the Launch Management Service. The following method is used for the purpose:
CODE
|
This method accepts the email template as a parameter. Email template contains all of the email definitions, such as From field, subject and the email body.
For more details and more functions available to prefill data, send emails and generate unique links please see the documentation on the API's Launch Management Service.