Loading...
  • Customer Experience
    Customer Experience
  • Employee Experience
    Employee Experience
  • Brand Experience
    Brand Experience
  • Product Experience
    Product Experience
  • Core XM
    Core XM

Web Service

What's on This Page:


Was this helpful?


This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The feedback you submit here is used only to help improve this page.

That’s great! Thank you for your feedback!

Thank you for your feedback!


About Web Services

Sometimes you may want to include more complex features in your survey. Maybe you want to pull in the top 10 headlines from a news website into your survey, or you want to automate a second survey distribution to be emailed to the respondents of a first survey exactly two hours later. A Web Service would allow you to do just that by making requests to a designated URL.

Qtip: This page contains references to Qualtrics’ API, which is a feature that requires special permission to access. If you are interested in obtaining access to this feature, please reach out to your Brand Administrator for more information.
Attention: Setting up a Web Service often requires advanced programming knowledge. Although our support team is happy to help with the basics of putting information into the Web Service, we cannot provide support on the programming aspects. You can always try asking our community of dedicated users instead.

Adding a Web Service

  1. In the Survey tab, navigate to the Survey Flow.
    Survey Flow button
  2. Click Add Below or Add a New Element Here.
    Add Below and Add a New element Here buttons; Web Service option in the What do you want to add? menu
  3. Select Web Service.
  4. In the URL field, paste the URL of your external Web Service.
    Field for URL in a web service followed by method
  5. Select a Method for your Web Service. We will explain more about the different methods in the section below.

Methods

Our Web Service feature allows you to choose from a series of Methods to request information from your specified URL.

Method Type Action Example
GET The Web Service goes to the URL and retrieves information. Retrieve information about a member of your contact list. See the Get Contact API call for more details.
POST Go to the URL and save information there. Save a message to your library.
PUT Update or replace existing information. Change a username. This is one of the things you can do with the Update User call.
PATCH Update or replace existing information. Very similar to PUT. While our Web Service offers this method, our API does not use PATCH calls. Modify data saved on your server.
DELETE Remove information. Delete a graphic from your library.

 

If you are using our API calls, the documentation will tell you which method to use, as indicated in the screenshot below.

Method listed next to each call in the API documentation

Parameters

There are currently three types of Parameters you can append to your request.

A Web Service with the following highlighted: Add a query parameter, Add a body parameter, and Add a custom header

    1. Query parameter: Instead of adding a query string to the end of your Web Service URL, place your query parameters here.
  1. Body parameter: This parameter is not available for GET or DELETE requests. It comes with two formatting options:
    a) application/x-www-form-urlencoded: Rather than entering your body parameters into the specified area of the Web Service, add them as a query string at the end of your specified URL.
    b) application/json: Enter your keys in Dot Notation. For example, our API call may ask you to specify a header[fromEmail]. In Dot Notation, this becomes header.fromEmail.

    Attention: Every key and value in a JSON object, as well as every element in a JSON array (including piped text), must have double quotes around it. In a body parameter, every key and value in a JSON object, as well as every element in a JSON array, must have double quotes around it.
  2. Custom header: Insert URL headers here.

If you’re using our API calls, the documentation will tell you what kind of parameters to include. The example below provides Body parameters to set.

On the API documentation, an arrow indicating Body Params

Adding Parameters to Your Web Service

Body parameters filled out in a web service

  1. Select any of the three Add a parameter to send to web service options indicated in the previous section. In the above example, we are indicating the Query Parameters.
  2. Type in the name of the parameter in the Parameter to Web Service box on the left.
  3. Type the corresponding value of the parameter in the Value box on the right.
  4. Click the plus (+) sign to the right of the parameter to add another.
  5. Click Save Flow when finished.

Testing Your Parameters

Once you have pasted in your URL and set up your parameters, you can test your URL to see what Fields you can pull in.

  1. Click Test URL to see which information you can pull from the external Web Service.
    Test URL button next to the URL field
  2. Select any fields that you want to use or record in your survey. The Field Name appears on the left and a corresponding Example Value appears on the right.
    Selecting fields to capture from the URL
  3. Click Add Embedded Data to add selected fields to your data.
    Qtip: You can change the Embedded Data names associated with the fields of your Web Service under the Set Embedded Data column. The Embedded Data names are to the left of the equals (=) sign, indicated by a green ED icon. The right side should not be altered. The names you set on the left will be the names of the fields as they appear in your data.
  4. If you select Fire and Forget, you will not save any of the data returned from the web service call. This feature is useful when you do not need to save the returned data.
    Fire and Forget option above fields; Save Flow on lower-right

    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. You may want to use this option if you have a Web Service request that takes a while to process, but we would recommend that you only use this feature during testing, since it will prevent Embedded Data from saving.
  5. When you’re done, click Save Flow.

Random Number Generator

Back when Qualtrics was first getting started, we encouraged users to use a Web Service calling a random number generator to create IDs for survey respondents. However, based on feedback, we found that this process can be long, difficult, and painful.

There are now much easier ways to generate random numbers for your respondents using Piped Text. For even more support setting up your randomized IDs and displaying them to respondents, see the Assigning Random IDs to Respondents page.