Vlocity Facts #56 || Different Ways to Call Apex Class in DataMappers
If we need to call a apex class from omnistudio we need to follow these steps Apex Class should be global with sharing to follow all the sharing settings. The Apex Class must implement the Callable or PackageName.VlocityOpenInterface,[vlocity_cmt.VlocityOpenInterface] interface. You must override the invokeMethod, which takes the following parameters String methodName Map<String, Object> input Map<String, Object> output Map<String, Object> option Create apex class with above details Now we can call this apex class in 2 ways in DataMapper We can call this apex in DataMapper by using FUNCTION() FUNCTION('apexClassName','methodName',%Input%) This approach we can do if we are having the vlocity_cmt package or managed package. We can create a custom metadata record from Setup -> Custom metadata -> search for "Function Definition" and click on "Manage Function Definitions" Create new rec...