您在此处:
从 Omnistudio 资产调用外部服务
您可以从 OmniScript 和 FlexCard 中的 Omnistudio 集成程序调用外部服务的注册操作。
要使用 Omnistudio 集成程序调用外部服务的注册操作,请先创建实施System.Callable接口的自定义 Apex 类。使用方法和参数创建类,然后调用外部服务 API。例如:
public with sharing class RemoteActionClass implements System.Callable
{
public Object call(String action, Map<String,Object> args)
{
Map<String,Object> inputMap = (Map<String,Object>) args.get('input');
Map<String,Object> outputMap = (Map<String,Object>) args.get('output');
Map<String,Object> options = (Map<String,Object>) args.get('options');
action == 'methodName'
Object result = Call External Services API;
outputMap.put('result', result);
return outputMap;
}
}
然后,使用集成程序,通过远程操作调用外部服务可调用操作。
