---
schema_version: "1"
id: ed2a0672bb417ca3c67c5db6bb9b57137f4ab07f96f90eb577bac05ff65273f1
title: AssessmentQuestion
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/api_meta/meta_assessmentquestion.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_assessmentquestion.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 5aca5e3710af3b22497a6c2e6d7c486f210d9c9507e5612e87d982ad79cb16de
description: Represents the container object that stores the questions required for an assessment.
---
# AssessmentQuestion

Represents the container object that stores the questions required for an assessment.

## Parent Type

This type extends the [Metadata](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/metadata.htm "The base class for all metadata types. You can’t edit this object. A component is an instance of a metadata type.") 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 | 
Field Type

[AssessmentQuestionVersion](#AssesQVer)

Description

The object that stores the question versions for the assessment questions.



 |
| dataType | 

Field Type

string

Description

Required.

The data type of the assessment question.



 |
| developerName | 

Field Type

string

Description

Required.

The developer name of the assessment question. Can contain only underscores and alphanumeric characters and must be unique in your org. It must begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores.



 |
| displayTextCategory | 

Field Type

string

Description

Specifies the category of the display text when the data type is Text Block.



 |
| formulaResponseDataType | 

Field Type

string

Description

Specifies the data type of the question response calculated by a formula.



 |
| name | 

Field Type

string

Description

Required.

The name of the record.



 |
| questionCategory | 

Field Type

string

Description

Required.

Stores the question category.



 |
| relatedQuestion | 

Field Type

string

Description

Specifies the related question. Used to define a question hierarchy.



 |

## AssessmentQuestionVersion​​

Stores the question versions for the assessment questions.

| Field Name | Description |
| --- | --- |
| additionalInformation | 
Field Type

string

Description

The additional details for a UI element, such as the disclosure text.



 |
| description | 

Field Type

string

Description

The description for the assessment question. This text isn’t rendered on the assessment.



 |
| guidanceInformation | 

Field Type

string

Description

The guidance for the assessment question.



 |
| helpText | 

Field Type

string

Description

The text that's added as an info bubble in the UI element related to the assessment question.



 |
| isActive | 

Field Type

boolean

Description

Required.

Indicates whether the current version of the assessment question is set to active (true) or not (false).

The default value is false.



 |
| name | 

Field Type

string

Description

Required.

Name of the assessment question version record.



 |
| optionSourceResponseValue | 

Field Type

boolean

Description

Indicates whether the response value source for an assessment question is configured as custom (true) or sObject in the OmniStudio designer (false).

The default value is false.



 |
| questionText | 

Field Type

string

Description

Required.

The assessment question text. Contains the label for the assessment question that appears on the assessment.



 |
| responseValues | 

Field Type

string

Description

Holds the values to be defined in the picklist, multiselect picklist, or radio buttons.



 |
| status | 

Field Type

string

Description

Required.

Status of the assessment question version. Possible values are Draft, Active, or Archived.



 |
| versionNumber | 

Field Type

int

Description

Required.

The assessment question version number.



 |

## 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](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_meta.meta/api_meta/file_based_zip_file.htm).

## 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..
    
    ![Note](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/images/icon_note.png)
    
    #### Note
    
    If an active assessment question version doesn’t exist for the assessment question, then the latest assessment question version with Status as Draft is retrieved.
- 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.