Tutorial: Embedding a flow in a Chatter action

You can add your flow as a custom Chatter action in Salesforce, by cloning and editing the ManyWhoFlow Visualforce page to create a new page, and invoking the flow as a custom action. The flow can be added to publisher layouts that appear on global pages (like the Home tab and the Chatter tab), as well as object-specific pages that have a feed, like the Account page or the Contacts page.

If you want to try out the instructions, use a flow you already have or create a new Salesforce flow as shown in the following procedures.

Creating a new Salesforce flow

This is what our canvas will look like, once we are done:

If you need to take a closer look, click on the images to enlarge them. Have a question? Click the Support button on the bottom right-hand corner of this page to ask.

Note: This is the same flow used in Tutorial: Embedding flows as Salesforce console components. You can reuse the flow if you have it available.
  1. Click LOG IN to login to the Boomi Flow Drawing Tool and click New Flow.
  2. Select Flows in the sidebar, and click New Flow. 
  3. From the drop-down Which Service should be used for authentication? menu, select Salesforce and click Continue. This opens the Flow: New Flow screen. (Note: Since we are using the Salesforce service for authentication, we do not need to import it separately into the flow.)
  4. In the Name field, type a name for your flow (Example: Salesforce Chatter action).
  5. Select Any user that can login with the selected identity service can run this flow from the Access drop-down menu.
  6. Select None from the Social feed for collaboration drop-down menu.
  7. Click Start Building! This opens the canvas where we will build our flow.
  8. Drag a Load element from the sidebar to the canvas.

    This opens a configuration panel on the right.
  9. In the configuration panel, type Load Case in the Name field.
  10. Click New Data Action.
  11. Click Select or create a new value.
  12. Click Create a new Value.
  13. Type Case in the Name field.
  14. Select Object in the What kind of Value is this? field.
  15. Click Select a Type.
  16. Enter Case in the Search field and select the Case associated with the Salesforce Service.
  17. Click Save.
  18. Select Salesforce.com Case Binding for the Where will the data be sourced from? field.
  19. Click Edit Filter. You will now configure which Case object should be loaded from Salesforce.
  20. Select Get the data based on a unique identifier for the Which type of filter should be used? field.
  21. Click Select or create a new Value.
  22. Enter notification in the Search bar and select SalesforceNotificationRecordId. (This will contain the unique identifier for the Case record in Salesforce).
  23. Click Save.
  24. Click Apply Filter.
  25. Click Apply Data Action.
  26. Click Save Database Load.

    This is what the canvas looks like now:
  27. Drag a Step element to the canvas.
  28. In the Configuration Panel, type The Case in the Name field.
  29. Type Case Subject: in the content editor.
  30. Click Insert Value.
  31. Select Case/Subject from the Value menu and click Ok.

    This inserts the Case/Subject value in the editor.
  32. Click Save Step.

    This is what the canvas looks like now:
  33. Hover your mouse on Start. The mouse pointer changes from a crossbar to a hand.
  34. Drag an arrow from Start to Load Case.
  35. In the Configuration Panel, type Go in the Name field, and click Save Outcome.
  36. Hover your mouse on Load CaseThe mouse pointer changes from a crossbar to a hand.
  37. Drag an arrow from Load Case to The Case.
  38. In the Configuration Panel, type Loaded in the Name field, and click Save Outcome.
  39. Click the Publish icon on the right-hand-side menu to publish your flow. You will be using the Flow ID in the following procedures.

Here is how to add a Chatter action to a Case:
  1. Click Create in the Setup screen of your Salesforce org.
  2. Click VisualForce Pages from the Develop menu, and select the ManyWhoFlow page.
  3. Click Clone to clone the page.
  4. Change the Label to ManyWhoFlowCase and the Name to flowcase.
  5. Click Quick Save to save the page.
  6. Delete the comments warning us to not change the code of the page. This is not the original Visualforce page, but a clone.
  7. In the first line, change value of standardController to Case. This is what the first line of code is:
    After the change, this is what the first line will look like:
  8. Click Quick Save to save the page.
  9. In the section where the code is passing input values into the page, change object-id to id. There are three places in the code where this change needs to be made. (In the picture, they are Ln 104, Ln 105, and Ln 110.)
  10. Click Quick Save to save the page.
  11. We will hardcode the Flow ID where the ManyWho engine is being initialized. Replace the term flowID with the ID of your flow within single quotes (‘). (Example: ’15c021f1-884a-4794-8f52-0035f9755063’). (In the picture, it is Ln 161.)
  12. Click Save to save the page.
  13. In the Build section, click Customize and select Cases.
  14. Click Button, Links, and Actions.
  15. Click New Action.
  16. Select Custom Visualforce in Action Type.
  17. Select ManyWhoFlowCase [flowcase] as the Visualforce Page.
  18. Type Test Case in the Name and Label field.
  19. Click Save.
  20. Click Cases and select the record you want to have available as a Chatter action. The page layout of the Case record needs to be edited to show the Chatter action. (Test Case – Created in Step 18.)
  21. Click the Edit Layout icon.
  22. In the Case Layout section, select Quick Actions, and drag the Test Case button in the Quick Actions in the Salesforce Classic Publisher section of the Case Sample page. Where you place the button, determines where it shows up on the page.
  23. Click Cases and select the record you want to have available as a Chatter action.


Let us see how a flow works as a Chatter action.

  1. From the Salesforce Sales console, select Cases.
  2. Click a case number to select a case.
  3. Click More and select Test Case to run the flow.
    This is what the Feed will look like:

    You can see the content of the Step element created when we built the flow earlier: