DiscoveryFramework_Prefill Integration Procedure
IndustriesSettings
Industries Object Access by Community License
Access Industries Features Deployed Using Managed Packages
Previous Versions
The DiscoveryFramework_Prefill Integration Procedure calls a Omnistudio Data Mapper and an Apex class. To customize the prefill flow, edit the steps of the DiscoveryFramework_Prefill Integration Procedure. Open the OmniStudio app, go to the Integration Procedures page, expand the DiscoveryFramework/Prefill Integration Procedure, and open the highest version.
| Required Editions |
|---|
| Available in: Lightning Experience in Enterprise, Professional, and Unlimited editions where a Financial Services Cloud Growth license is enabled or in Enterprise and Unlimited editions where the Health Cloud license is enabled. |
To ensure access to this Integration Procedure, see Security for Omnistudio Data Mappers and Integration Procedures.
Note
| Component Name | Type | What it does | What it calls |
|---|---|---|---|
| GetAssessmentId | Omnistudio Data Mapper Extract Action | Fetches the Id of the most recent Assessment record related to the specified ContextId, which is an AccountId. | GetAssessmentId Omnistudio Data Mapper Extract |
| GetAssessmentData | Remote Action | Fetches the Assessment record object. | DiscoveryFrmwrk.PreFillAssessment Apex class |
| AssessmentData | Response Action | Returns the Assessment record data to the entity that called this Integration Procedure. | Nothing |
The GetAssessmentId Omnistudio Data Mapper Extract fetches the ID of the most recent Assessment record related to the specified ContextId, which is an AccountId.
Settings
| Tab | Setting | Value |
|---|---|---|
| Extract | Object | Assessment |
| Extract | Extract Output Path | Assessment |
| Extract | Filter | AccountId = ContextId ORDER BY LastModifiedDate DESC LIMIT 1 |
| Output | Extract JSON Path | Assessment:Id |
| Output | Output JSON Path | RemoteActionAssessmentId |
Use the PreFillAssessment class to fetch question and response data related to an Assessment object.
DiscoveryFrmwrk
The PreFillAssessment class has two methods that do the same thing. The call method is necessary for the class to implement System.Callable.
call(action, args)
The call method accepts an Assessment Id and passes question and response data to the AssessmentDataReturned output variable. It follows the syntax required for a class that implements System.Callable.
57.0
No
public static PreFillAssessment call(String action, Map<String,Object> args)
action
Type: string
Set the action value to omniScriptPreFill
args
Type: Map<String,Object>
The first two names in the name-value pairs must be input and output. The input must specify an Assessment Id. The output must be null. For example: {“input”: “0U3RO0000000Aai0AE”, “output”: null}
null
See the omniScriptPreFill method usage
The omniScriptPreFill method accepts an Assessment Id and passes question and response data to the AssessmentDataReturned output variable.
57.0
No
public static PreFillAssessment omniScriptPreFill(Map<String,Object> input, Map<String,Object> output)
input
Type: Map<String,Object>
Set the input parameter to {“input”: “idString”}, where the idString is the Id of an Assessment object. For example: {“input”: “0U3RO0000000Aai0AE”}
output
Type: Map<String,Object>
In the input, set the output parameter to {“output”: null}.
null
The data passed to the AssessmentDataReturned variable includes questions and their responses. The key for each question is the developer name of the question. For example:
1{
2 "AssessmentDataReturned": {
3 "RespondentName": "Arthur, King of the Britons.",
4 "RespondentGoal": "To seek the Holy Grail.",
5 "SwallowAirspeed": "An African or European swallow?"
6 }
7}