Loading
Feature Disruption - Service Cloud VoiceRead More
Feature degradation | Gmail Email delivery failureRead More
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Integration Procedure Invocation from Salesforce Flow

          Integration Procedure Invocation from Salesforce Flow

          To call an Integration Procedure from a Salesforce Flow, create a Salesforce Flow component by defining a class using the Salesforce Developer Console, as shown in the following example. Note that the class must have the @InvocableMethod annotation.

          When calling IntegrationProcedureService.runIntegrationService, be sure to replace the namespace with omnistudio, vlocity_cmt, vlocity_ins, or vlocity_ps.

          global with sharing class IntegrationProcedureInvocable {
           @InvocableMethod(label = 'Integration Procedure')
           global static List < IntegrationProcedureOutput > runIntegrationServiceInvocable(List < IntegrationProcedureInput > input) {
            System.debug(LoggingLevel.Error, JSON.serialize(input));
            IntegrationProcedureOutput result = new IntegrationProcedureOutput();
            Map<String, Object> ipInput = new Map<String, Object> ();
            Map<String, Object> ipOptions = new Map<String, Object> ();
            result.output = JSON.serialize(
             namespace.IntegrationProcedureService.runIntegrationService(
             input[0].procedureAPIName,
             ipInput,
             ipOptions));
            System.debug(LoggingLevel.Error, JSON.serialize(result));
            return new List < IntegrationProcedureOutput >
             {
              result
             };
           }
           global class IntegrationProcedureInput
           {
            @InvocableVariable(label = 'Procedure Name') global String procedureAPIName;
            @InvocableVariable(label = 'Input') global String input;
           }
           global class IntegrationProcedureOutput
           {
            @InvocableVariable(label = 'Output') global String output;
           }
          }

          After defining the class, you can use the resulting flow component in the Salesforce Flow Designer to call Integration Procedures. Drag the component from the list to the flow and set its properties as follows.

          General Settings: Set Name and Unique Name to descriptive names for the instance of the component in the flow.

          Input Settings

          • Procedure Name: Specify the Integration Procedure to be run using this format: Type_SubType (note the underscore).

          • Input: For each input variable required by the Integration Procedure, choose Variable and specify the name of the input variable using the following format: {!variableName}

          Output Settings: For each variable that is returned by the Integration Procedure, choose Variable and specify the name of the output variable using the following format: {!variableName}

           
          Loading
          Salesforce Help | Article