AssessmentQuestion
Parent Type
This type extends the Metadata metadata type and inherits its
fullName field.
File Suffix and Directory Location
AssessmentQuestion components have the suffix .AssessmentQuestion and are stored in the AssessmentQuestions folder.
Version
AssessmentQuestion components are available in API version 55.0 and later.
Fields
Field Name | Description |
---|---|
assessmentQuestionVersion |
|
dataType |
|
developerName |
|
displayTextCategory |
|
formulaResponseDataType |
|
name |
|
questionCategory |
|
relatedQuestion |
|
AssessmentQuestionVersion
Stores the question versions for the assessment questions.
Field Name | Description |
---|---|
additionalInformation |
|
description |
|
guidanceInformation |
|
helpText |
|
isActive |
|
name |
|
optionSourceResponseValue |
|
questionText |
|
responseValues |
|
status |
|
versionNumber |
|
Declarative Metadata Sample Definition
The following is an example of an AssessmentQuestion component.
<?xml version="1.0" encoding="UTF-8"?>
<AssessmentQuestion
xmlns="http://soap.sforce.com/2006/04/metadata">
<assessmentQuestionVersion>
<additionalInformation>ParentQuestionDevName AI</additionalInformation>
<description>ParentQuestionDevName Desc</description>
<helpText>ParentQuestionDevName HT</helpText>
<isActive>true</isActive>
<name>ParentQuestionDevName</name>
<optionSourceResponseValue>true</optionSourceResponseValue>
<questionText>ParentQuestionDevName Text</questionText>
<status>Active</status>
<versionNumber>1</versionNumber>
</assessmentQuestionVersion>
<dataType>DateTime</dataType>
<developerName>ParentQuestionDevName</developerName>
<name>ParentQuestionDevName</name>
<questionCategory>Demographic</questionCategory>
</AssessmentQuestion>
The following is an example package.xml that references the previous definition.
<?xml version="1.0" encoding="UTF-8"?>
<Package
xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
<members>*</members>
<name>AssessmentQuestion</name>
</types>
<version>55.0</version>
</Package>
Wildcard Support in the Manifest File
This metadata type supports the wildcard character * (asterisk) in the package.xml manifest file. For information about using the manifest file, see Deploying and Retrieving Metadata with the Zip File.
Usage
Before you retrieve assessment questions, we recommend that you review these considerations.
- When you retrieve an assessment question, you also get the related assessment question version with the status Active..
- The value for the <status> tag in the XML definition must match the status of the related assessment question version.
- If an assessment question has a related assessment question (parent question), the XML definition must include the developer name of the related assessment question.
- If the fields of an assessment question contain values, the XML definition must contain tags with those values when retrieving it.
Before you deploy assessment questions, we recommend that you review these considerations.
- If the Related Question isn’t available in the target org, deploying the assessment question fails.
- If an assessment question with the same developer name exists in the target org, deploying the assessment question updates the values of the other fields in the target org.
- If the <versionNumber> tag is present in the XML definition of an assessment question, deploying creates a version for that question in the target org.
- If the Related Questions aren’t available in target org but available in the package, then deploying the questions inserts the Related Questions in the correct order.
- If the assessment questions are associated with flows of type Discovery Framework Data Capture Flow, then deploy the assessment questions first. After deploying the assessment questions, deploy the flows.