AssessmentResponses Class
Use this class to store dynamic assessment responses Public Sector Solutions in the Assessment and AssessmentQuestionResponse standard objects.
To save assessment responses from the runtime Omniscript on the Omni Assessment Task page to the AssessmentResponses class, implement the VlocityOpenInterface interface.
Specify the implemented Apex class name in the Remote Actions section of the OmniScript page. A Remote Action calls the specified Apex class and its method to save the assessment form in the Assessment and AssessmentQuestionResponse Salesforce objects.
This screenshot shows the Apex class name and its method as specified in the Omniscript Remote Action Properties section:

Public Sector and Dynamic Assessment permission sets are required to use this Apex class.
For more information on the VlocityOpenInterface interface, see OmniStudio Foundation Guide.
The following is a method for AssessmentResponses.
-
storeResponses(input, output, options)
Stores the assessment responses.
Stores the assessment responses.
public static void storeResponses(Map<String,Object> input, Map<String,Object> output, Map<String,Object> options)
-
input:
Type: Map<String,Object>
Contains the context ID, assessment response in JSON format, and extra payload details from configurations from Vlocity OmniScript.
-
output:
Type: Map<String,Object>
Reserved for future use.
-
options:
Type: Map<String,Object>
Contains the assessment name and assessment status that are configured in OmniScript.
Type: Void