Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
AssessmentQuestion
Parent Type
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.
1<?xml version="1.0" encoding="UTF-8"?>
2<AssessmentQuestion
3 xmlns="http://soap.sforce.com/2006/04/metadata">
4 <assessmentQuestionVersion>
5 <additionalInformation>ParentQuestionDevName AI</additionalInformation>
6 <description>ParentQuestionDevName Desc</description>
7 <helpText>ParentQuestionDevName HT</helpText>
8 <isActive>true</isActive>
9 <name>ParentQuestionDevName</name>
10 <optionSourceResponseValue>true</optionSourceResponseValue>
11 <questionText>ParentQuestionDevName Text</questionText>
12 <status>Active</status>
13 <versionNumber>1</versionNumber>
14 </assessmentQuestionVersion>
15 <dataType>DateTime</dataType>
16 <developerName>ParentQuestionDevName</developerName>
17 <name>ParentQuestionDevName</name>
18 <questionCategory>Demographic</questionCategory>
19</AssessmentQuestion>The following is an example package.xml that references the previous definition.
1<?xml version="1.0" encoding="UTF-8"?>
2<Package
3 xmlns="http://soap.sforce.com/2006/04/metadata">
4 <types>
5 <members>*</members>
6 <name>AssessmentQuestion</name>
7 </types>
8 <version>55.0</version>
9</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
- 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.
- 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.