Reviving this thread:I am trying to use the logic from @robpitingolo comment but the branch logic does not seem to work for me. It always goes to the first branch as if it doesn’t execute the condition.I thought I had everything set up correctly, and when I print the values, I can see that I am using the correct environment variables and that Q_R is getting passed in correctly to update the Q_URL. (note that everytime you re-visit the ‘re-take’ link it creates a new response ID)Any thoughts? Here are some screenshots for context:
@r2rajcic I think API call from JS is prohibited in someway because you can trigger it multiple time for spamming. The correct way of using API is Webservice in surveyflow: https://www.qualtrics.com/support/survey-platform/survey-module/survey-flow/advanced-elements/web-service/ Or webservice workflow: https://www.qualtrics.com/support/survey-platform/actions-module/web-service-task/ if you don’t want the API in surveyflow that slow your survey down and you don’t have any immediate need of using the API response. Furthermore, a Zapier extension might helps: https://www.qualtrics.com/marketplace/zapier-integration/ Thanks @dxconnamnguyen ! Anyone struggling with this check out these links^^^^^
Hi @LuisaC It is possible to add page breaks and re-organize the questions within a block using the Update Block PUT request. When I look at the response I get from the Get Block GET request, there is one parameter missing that is required in the payload when using the Update Block PUT request. That parameter is ‘LibraryID’, which can be found by going to your Account Settings > Qualtrics IDs > Libraries > My Library: ‘name’ Contrary to what the Update Block documentation says, I was able to get this to work without also having to add the so called required ‘SubType’ and ‘ReferencedBlockID’ parameters which were also missing from the GET request. For reference the only parameters I have in my successful Update Block PUT request payload are:Type Description ID LibraryID BlockElements If that missing parameter isn’t the solution, double check the ID’s and the spelling/formatting of your payload. Hope this helps!
@dxconnamnguyen Definitely not a silly question. What I have learned is that the documentation is not all inclusive, but basically if it exists in the QSF representation of the question, then the GET and POST requests from the question API can handle it. I tried explaining below, but you can probably figure this out just as quickly by experimenting with an example survey where you call Get Questions before adding scoring, then again after adding Scoring + assigning point values with the UI, then one more time after adding a new scoring category also with point values (you should look for “GradingData” in the response each time (hint, it won’t show up until scoring is defined)). Here is my explanation as I have come to understand it (disclaimer: I am not a Qualtrics expert nor claim to be):The ‘scoring category id’ variable I am talking about is actually defined in the Scoring definition schema under ScoringCategories > “ID”. That variable then shows up in the QSF response from the
Tested this myself and wanted to add some additional notes to save future readers some time:The ‘SC_01HL...’ and ‘SC_cV07...’ strings within ‘Grades’ in @vgayraud’s screenshot are scoring category ID’s. I was confused by this at first but If you have used the UI before, you will know that you have to have at least one scoring category before you can start assigning point values to answer choices.The default UI name is “Score” but it will have a scoring category ID tied to it as well, similar to those in the screenshot. I created a question and gave it Score values manually through the UI, then used the Get Questions API call to extract my scoring category ID (each question will have the same ‘GradingData’ piece in the response as well).Note: If you are building an exam from scratch with the API, you can define your scoring category when you first define the survey using the survey definition and scoring definition schemas (links to the documentation for those schemas are in @vgayraud’s
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
Sorry, we're still checking this file's contents to make sure it's safe to download. Please try again in a few minutes.
Sorry, our virus scanner detected that this file isn't safe to download.