Survey Platform - Web Service | Qualtrics

Web Service

Introduction

Sometimes it’s useful to bring additional information from a website into your survey. Our Web Service element allows you to do just that. For example, you can pull in the top 10 Headlines from CNN.com for a current events survey. You can even write your own web program and then integrate accordingly.

Connecting Your Survey to a Web Service

  1. Click the Survey Flow in the Survey module.image09
  2. Click Add Below or Add a New Element Here.image03
  3. Choose Web Service.image01
  4. Click and hold the Move button on the Web Service and drag it to the top of your Survey Flow.image04
  5. Paste the URL of your external Web Service (RSS Feed is a commonly used type) into the URL field of the Web Service element.image16
    Example: The images above display the URL to a simple Qualtrics Web Service (http://reporting.qualtrics.com/projects/randomNumGen.php). This Web Service generates a random number that you can use in your survey. To set limits on the random number that is generated, you can send the “min” and “max” parameter to the Web Service. In the images above, the “max” parameter is sent, limiting the random number between 0 (the default min) and 5000.
  6. Click Test URL to see which information you are able to pull from the external Web Service.image13
  7. Select any fields that you want to use or record in your survey (notice the field name appears in the left column and an example value in the right column).image05
  8. Click Add Embedded Data after you have made your selection.image06
  9. If desired, change the field names of your Web Service (the field names are to the left of the “=” sign; the right side should not be altered).image02
    Qtip: The names you set here will be the names that appear in your data in the Data & Analysis module.
  10. If desired, select the Fire and Forget setting.image12
    Qtip: Fire and Forget allows your survey to make a request to a Web Service without waiting for a response. This means that your respondents will be able to complete the full survey without any delay due to the Web Service. If you have a Web Service request that may take a while to process, be sure to check the Fire and Forget option.
  11. Click Save Flow.image07

Displaying a Web Service Field in Your Survey

  1. Go to the question or choice you’d like the field to appear in.image17
  2. Click Piped Text and choose Embedded Data Field.image10
  3. Enter the name of your field exactly as it appears in your Survey Flow and click Insert.image08

To see which data the respondent received from the Web Service, look for the Embedded Data field columns in your dataset. These Embedded Data fields can also be included in your Reports.

Sending Parameters to a Web Service

You can access RSS feeds with no strings attached, but more advanced Web Services may require information from you before they can send you anything back.

To add a parameter to your web service

  1. Select Add a parameter to send to web service.image15
  2. Type in the name of the parameter in the Parameter to Web Service box and the value of the parameter in the Value box.
  3. Select the plus sign to the right of the parameter to add another.image14
  4. Click Save Flow.image11
Example: The images above display the URL to a simple Qualtrics Web Service (http://reporting.qualtrics.com/projects/randomNumGen.php). This Web Service generates a random number that you can use in your survey. To set limits on the random number that is generated, you can send the “min” and “max” parameter to the Web Service. In the images above, the “max” parameter is sent, limiting the random number between 0 (the default min) and 5000.
Qtip: If you are looking for another way to generate a random number, you can use specialized piped text without having to create a Web Service. See the Random Number Generator page for more details on how to set this up.