Discovery Framework
How to build a questionnaire whose questions depend on the answers, where the answers are stored and which record they are tied to.
How do you build a questionnaire in Salesforce whose questions change with what the client answers, and where are the answers stored? This page explains Discovery Framework: its objects, conditional questions, versions, how a questionnaire is tied to a record, and its limits.
What Discovery Framework is
Discovery Framework is a data model for collecting and validating client information through questionnaires, in line with the company’s policies. Help suggests it for needs analysis and digital client onboarding. The forms are built with OmniStudio, Salesforce’s declarative tool for guided processes, specifically with Omniscripts: step-by-step forms that support branching and display logic.
In Financial Services Cloud it is available in Enterprise, Professional and Unlimited Editions. The feature also exists in other industry clouds, such as Health Cloud or Public Sector Solutions.
To use it, a user needs the Discovery Framework Platform User permission. In Financial Services Cloud it comes with the FSC Sales, FSC Service or Financial Services Cloud Extension permission sets, which also include the permission set license (PSL) and full access to the objects. PSLs are explained in Permission Set Licenses. On top of that, whoever designs the forms needs the OmniStudio Admin permission set, and whoever fills them in, OmniStudio User.
There is a technical prerequisite: Discovery Framework works only with the OmniStudio standard objects model, from Spring ’22, and with the Managed Package Runtime option turned off.
The objects
A question is defined once and reused across forms. An answered questionnaire is an assessment: an Assessment record with its responses.
| Object | What it stores |
|---|---|
| Assessment Question | The question: name, data type, category |
| Assessment Question Version | The text and values of each version |
| Assessment Question Set | A reusable set of questions |
| Assessment Question Assignment | The link between question and set |
| Assessment | The header of an assessment |
| Assessment Question Response | Each response |
The response is a child of Assessment: the reference defines it as a master-detail relationship, with Assessment as the master object. And the response does not point to the question, but to the version of the question that was answered.
The question’s data type decides which Omniscript element represents it: Checkbox, Currency, Date, Radio, Select, Text Area, File or Formula, among others. A file uploaded in a File question is attached to the Assessment record. By default, the Enhanced Questions setting creates the question and its first version at once; if it is turned off, the version is created by hand.
Conditional questions
A question can point to another through the Related Question field. The referenced question is the parent and the new one its child. Help illustrates it with a yes-or-no question that has one child for “yes” and another for “no”. The hierarchy allows one level only.
The hierarchy does not show or hide anything by itself. Visibility is configured in the Omniscript, with each element’s Conditional View property. The Show Element if True condition renders the element only when the condition holds. For a Radio or Select question, the condition compares against the option’s name, for example “Yes”. This page reads it this way: the hierarchy documents the relationship and the Omniscript decides when it shows.
A detail with consequences: when an element is hidden, OmniStudio sets its contents to null in the form data. A validation that depends on that field will find it empty.
Versions
An active version cannot be changed: to change a question you create another version. Only one version is active at a time, and when a new one is created the previous one becomes Archived. Help presents this history as a way to track changes for auditing purposes.
The Omniscript does not update itself. When a question in the form gets a new active version, you open it, click Edit Form and then OK, so that it picks up the latest version. If an assessment was submitted with an inactive version, the Assessment component does not show its responses.
How a questionnaire is tied to a record
Assessment has standard lookup fields to Account, Contact and Case. The reference describes AccountId as the account for which the assessment was taken. With Person Accounts, an individual client is an account, so that is the client’s field.
In the interface, the Assessment component is added to the record page with Lightning App Builder. Help supports it on Account, Contact, Case, Application Form and Dispute Item, among others. From its Assessment Library tab, an agent starts or resumes an assessment on the client’s behalf; the Assessments tab gathers the assessments related to the record.
The opportunity appears in neither list: no standard Assessment field points to Opportunity, and the component is not among the supported record pages.
That same step sets the status. If none is given, the assessment stays In Progress; to mark it Completed you assign Assessment.AssessmentStatus in the save element.
Questionnaires outside Salesforce
From Assessment Library, an agent can send several assessments by email to contacts. The recipient can be a registered user of an Experience Cloud site, Salesforce’s portal product, or an unauthenticated guest, and receives a link to complete them. For this you turn on External User Assessments in Assessment Settings and choose the flow that sends the email. Configuring it requires the Industries Assessment PSL.
The send travels in an assessment envelope, the set of assessments addressed to one user, with an expiration date that cannot exceed 30 days.
Internal users can save a half-finished assessment with Save For Later, if Save Assessment As Draft is turned on. Experience Cloud users do not have that option.
Example: a health questionnaire on a life insurance application
An insurer wants a health questionnaire for its life insurance applications. The client is a person account and the agent fills in the questionnaire with them.
- Activation. The administrator turns on Discovery Framework in General Settings and turns off Managed Package Runtime.
- Parent question. Creates “Have you been hospitalised in the last five years?”, of type Radio, with the values Yes and No, one per line.
- Child questions. Creates “Reason for the hospitalisation”, of type Text Area, and “Discharge date”, of type Date. On both, Related Question points to the parent.
- Set. Gathers the three in a Health set to reuse them.
- Form. From Assessment Questions clicks Select Questions, places the questions in a step and clicks Build Omniscript.
- Condition. On each child configures Show Element if True with the condition parent equals Yes.
- Status. In the save element assigns Completed to
Assessment.AssessmentStatus. - Component. Adds the Assessment component to the account page.
The result: if the client answers “No”, the two children are not shown. If they answer “Yes”, they appear. On submission, the assessment is Completed and appears in the Assessments tab of the client’s account.
When to use it
- Yes, when questions must be versioned, reused across forms and each response kept tied to the exact version that was answered.
- No, for a one-off form with no need for history. This page then proposes a Flow screen flow, which guides the user through screens without OmniStudio.
- Not possible without OmniStudio on the standard objects model.
The criterion, this page’s proposal: if a year from now someone will need to know exactly which question was answered, the questionnaire belongs in Discovery Framework.
If the form has to decide which documents to request, the Document Matrix element uses Business Rules Engine decision tables.
Limits and considerations
| Aspect | Limit |
|---|---|
| Question hierarchy | One level only |
| Nested repeat blocks | Not supported |
| Active version | One per question, not editable |
| Prefill | Not on File or Formula questions |
| Save as draft | Not for Experience Cloud users |
| Send expiration | 30 days at most |
Prefill fills questions with responses from earlier assessments.
Before using it in production
- Confirm that OmniStudio uses the standard objects model and turn off Managed Package Runtime.
- Assign Discovery Framework Platform User, through FSC Sales, FSC Service or Financial Services Cloud Extension, and OmniStudio Admin or OmniStudio User according to the role.
- Design conditional questions with a single level of hierarchy and configure their Conditional View in the Omniscript.
- Review the validations that depend on hidden questions, because their value arrives null.
- After activating a new version of a question, update every Omniscript that uses it with Edit Form.
- Assign
Assessment.AssessmentStatusin the save element so that assessments end up Completed.
Official sources
- Manage Every Aspect of Questionnaire-Driven Information Collection — Salesforce Help (opens in a new tab)
- Discovery Framework — Salesforce Help (opens in a new tab)
- Discovery Framework Editions and Permissions — Salesforce Help (opens in a new tab)
- Discovery Framework and Assessments Prerequisites — Salesforce Help (opens in a new tab)
- Create Assessment Question Categories, Questions, and Question Sets — Salesforce Help (opens in a new tab)
- Supported Data Types for Assessment Questions — Salesforce Help (opens in a new tab)
- Save Assessment Questions to an Omniscript Form — Salesforce Help (opens in a new tab)
- Customize a Discovery Framework Omniscript — Salesforce Help (opens in a new tab)
- Conditionally Display Omniscript Elements — Salesforce Help (opens in a new tab)
- Considerations for Working with Discovery Framework and Assessments — Salesforce Help (opens in a new tab)
- Manage Assessments with the Assessment Component for Discovery Framework — Salesforce Help (opens in a new tab)
- Save and Resume Draft Assessments in Discovery Framework — Salesforce Help (opens in a new tab)
- Configure External User Assessments — Salesforce Help (opens in a new tab)
- Discovery Framework Data Translation — Salesforce Help (opens in a new tab)
- Discovery Framework — Industries Common Resources Developer Guide (opens in a new tab)
- Assessment — Industries Common Resources Developer Guide (opens in a new tab)
- AssessmentQuestion — Industries Common Resources Developer Guide (opens in a new tab)
- AssessmentQuestionVersion — Industries Common Resources Developer Guide (opens in a new tab)
- AssessmentQuestionSet — Industries Common Resources Developer Guide (opens in a new tab)
- AssessmentQuestionAssignment — Industries Common Resources Developer Guide (opens in a new tab)
- AssessmentQuestionResponse — Industries Common Resources Developer Guide (opens in a new tab)