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.
DiscoveryFramework_Prefill Integration Procedure
| 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. |
Steps
| 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 |
GetAssessmentId Omnistudio Data Mapper
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
PreFillAssessment Apex Class
Use the PreFillAssessment class to fetch question and response data related to an Assessment object.
- Namespace
- DiscoveryFrmwrk
- Usage
- The PreFillAssessment class has two methods that do the same thing. The call method is necessary for the class to implement System.Callable.
- Methods
-
- call(action, args)
- omniScriptPreFill(input, output)
call(action, args)
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.
- API Version
- 57.0
- Required Chatter
- No
- Signature
- public static PreFillAssessment call(String action, Map<String,Object> args)
- Parameters
- 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}
- Return Value
- null
- Usage
- See the omniScriptPreFill method usage
omniScriptPreFill(input, output)
The omniScriptPreFill method accepts an Assessment Id and passes question and response data to the AssessmentDataReturned output variable.
- API Version
- 57.0
- Required Chatter
- No
- Signature
- public static PreFillAssessment omniScriptPreFill(Map<String,Object> input, Map<String,Object> output)
- Parameters
- 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}.
- Return Value
- null
- Usage
- 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}