---
schema_version: "1"
id: 50d5df402459439594f6b4ace959f90f95b53a22198f94e76b0a8d098035c236
title: Integration Procedure Invocation from Salesforce Flow
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/xcloud/264-0-0/os_integration_procedure_invocation_from_salesforce_flow_55876.md
canonical_url: https://help.salesforce.com/s/articleView?id=xcloud.os_integration_procedure_invocation_from_salesforce_flow_55876.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 4ca94db7f47f8be884000701d200123eeab38bfe2f54fbf5c8b6dc58bfc3e4e3
description: 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.
products:
  - Omnistudio
release: "264"
---
# 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}`