Scoring in API | XM Community
Skip to main content

Hi all,

 

I am building a survey from scratch using the API. I would like to add scoring to my questions. I know this can be done manually using the UI, but I would like to know if there is a way to implement this in the API.

 

I have read this forum post many times over and still can’t seem to figure it out.

 

I played around with manually adding in scoring in the UI, and pulled the information using the API.

 

From what I can see, using Get Survey I can obtain the ‘Scoring’ schema, e.g.,:

            'Scoring': {'AutoScoringCategory': None,
'DefaultScoringCategory': 'SC_bxRKOuoFtqDe4IK',
'IgnoreNullValues': True,
'ScoringCategories': e{'Description': '',
'ID': 'SC_bxRKOuoFtqDe4IK',
'Name': 'containment_1'},
{'Description': None,
'ID': 'SC_37SfH89wOX72F9k',
'Name': 'retrieval_2'}],
'ScoringCategoryGroups': y],
'ScoringSummaryAfterQuestions': 0,
'ScoringSummaryAfterSurvey': 0,
'ScoringSummaryCategory': 'SC_bxRKOuoFtqDe4IK'},

Which is followed by the survey flow, etc.

Using Get Question, I can see the GradingData, e.g.:

                                   'DataVisibility': {'Hidden': False,
'Private': False},
'GradingData': i{'ChoiceID': '1',
'Grades': {'SC_bxRKOuoFtqDe4IK': '1'},
'index': 0}],
'Language': a],

 

But, this is all after manually adding the survey category IDs in the UI. I tried using ‘Scoring’ schema in the Make Survey payload by randomly generating an ID following the format given in the scoring definition SC_na-zA-Z0-9]{11,15} but this also didn’t work.

 

Is there a way to directly write the IDs (and thus, the scoring) in the API?

 

I would really appreciate any pointers! Please help!!

Be the first to reply!

Leave a Reply