---
schema_version: "1"
id: a1e18280d1f38585153accf251fe5f505de86c603e52bbe52abce198be3fd81b
title: Using the Process.PluginRequest Class
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexcode/apex_plugin_request.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_plugin_request.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 7b2d261a2f00a3ae6a23f12f98082e412dcb56bf937971d2cbd5e256221d2c17
description: The Process.PluginRequest class passes input parameters from the class that implements the interface to the flow.
---
# Using the Process.PluginRequest Class

The Process.PluginRequest class passes input parameters from the class that implements the interface to the flow.

![Tip](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/images/icon_note_tip.png)

#### Tip

We recommend using the @InvocableMethod annotation instead of the Process.Plugin interface.

- The interface doesn’t support Blob, Collection, and sObject, data types, and it doesn’t support bulk operations. After you implement the interface on a class, the class can be referenced only from flows.
- The annotation supports all data types and bulk operations. After you implement the annotation on a class, the class can be referenced from flows, processes, and the Custom Invocable Actions REST API endpoint.
- Legacy Apex actions aren’t supported in auto-layout in Flow Builder. Legacy Apex actions are only available to be added in free-form in Flow Builder. Existing actions can be edited in both auto-layout and free-form mode.
- You can customize how invocable actions created with @InvocableMethod appear in Flow Builder by using the InvocableActionExtension metadata file. Control parameter order, add picklists, create custom headers, and build partial custom property editors.

This class has no methods.

Constructor signature:

Process.PluginRequest (Map<String,Object\>)

Here’s an example of instantiating the Process.PluginRequest class with one input parameter.

 Map<String,Object\> inputParams = new Map<String,Object\>();
            string feedSubject = 'Flow is alive';
            InputParams.put('subject', feedSubject);
            Process.PluginRequest request = new Process.PluginRequest(inputParams);     

## Code Example

In this example, the code returns the subject of a Chatter post from a flow and posts it to the current user's feed.

global Process.PluginResult invoke(Process.PluginRequest request) { 
        // Get the subject of the Chatter post from the flow
        String subject = (String) request.inputParameters.get('subject');
        
        // Use the Chatter APIs to post it to the current user's feed
        FeedPost fpost = new FeedPost(); 
        fpost.ParentId = UserInfo.getUserId(); 
        fpost.Body = 'Flow Update: ' + subject; 
        insert fpost; 

        // return to Flow
        Map<String,Object\> result = new Map<String,Object\>(); 
        return new Process.PluginResult(result); 
    } 

    // describes the interface 
    global Process.PluginDescribeResult describe() { 
        Process.PluginDescribeResult result = new Process.PluginDescribeResult(); 
        result.inputParameters = new List<Process.PluginDescribeResult.InputParameter>{ 
            new Process.PluginDescribeResult.InputParameter('subject', 
            Process.PluginDescribeResult.ParameterType.STRING, true) 
            }; 
        result.outputParameters = new List<Process.PluginDescribeResult.OutputParameter>{ }; 
        return result; 
    }
}