From Kevin Luptowski: Tips and Use Cases for Running Screen Flows in Slack

Kevin is arguably the world leader in integrating Flow and Slack!

This post is dual-purpose: 1) to educate on how to make a screen flow available in slack and 2) to provide a downloadable example of a real world use case. 

This previous blog post (https://unofficialsf.com/running-screen-flows-in-slack/) provides exceptional detail into how Salesforce screen flows can be sent into Slack, including the required permissions and initial setup steps. This post assumes you have authorized Slack to connect with Salesforce and focuses on the flows and use cases themselves.

In short, Slack screen flows depend on _two_ flows being created: 

  • the first, the actual screen flow that serves as the modal UI for end users in slack.
    • This flow must be activated before the second flow
  • and the second, the “dispatching” flow that sends the screen flow to the Slack channel/user of your choice. 

Example Use Case and Demo Component:

If you have not yet begun to leverage Swarming in your customer service operations, it is an incredibly effective way for customer service agents to get answers faster by bringing in the right team of experts to collaborate and work toward a resolution. Rather than using chatter for that collaboration, Slack allows that team of experts to communicate in near real time in slack channels connected to Swarms, a new standard Salesforce object. 

The general premise of a swarm is simple: an agent is working on a case (or problem, incident or change request!) in Salesforce and needs help. The out of the box “Begin Swarming” flow allows the agent to create a channel in Slack directly from the Service Console, invite team members to the slack channel, and creates a Swarm and Swarm Member object(s) related to the case. The channel in slack serves as the collaborative hub for the team to solve the issue, and contains a button with the option to “Finish Swarming”. The bidirectional aspect of this scenario is unfortunately limited.  Clicking Finish Swarm merely closes the swarm object record. A subsequent Salesforce release included a second flow which would auto close the case as well; however, this process is lacking the ability for members of the slack channel to make additional edits to the case or make free text commentary to summarize their findings. 

This packaged solution aims to supplement the swarming experience by providing a more ample wrap up opportunity. It hinges upon two flows: a record triggered flow on the Swarm object that “dispatches” a separate screen flow to slack.

Upon closure of the swarm, a message is sent into the swarm channel with a button to open a screen flow. The recipient, message, and button are cofnigured within the dispatching flow. The screen flow contains multiple input fields which will then update the record related to the swarm. Once installed, the screen flow is configured to update the following fields:

  • Case
    • Status
    • Case Reason
    • Close Summary Notes (a custom field included in the package; give your users access via the Swarm Wrap Up Slack Flow permission set and add to page layout as desired)
  • Problem
    • Status
    • Root Cause Summary
  • Change Request
    • Status
    • Close Summary (a custom field included in the package; give your users access via the Swarm Wrap Up Slack Flow permission set and add to page layout as desired)
  • Incident
    • Status
    • Resolution Summary

The fields available for input and update can be configured by updating the “wrap up screen” and “update records” elements within the screen flow. See attached video. 

Pre install steps

  • Assumes you’ve enabled the slack to Salesforce integration, swarming, and your user has authenticated the service cloud for slack app

Post install steps

  • Assign “Swarm Wrap Up Slack Flow” Permission Set to swarming users so that they may edit the Case.Close Summary Notes and Change Request.Close Summary fields
    • Add these fields to page layouts if desired
  • Edit the “Swarm Wrap Up Slack Dispatching Flow” so that it points to your authenticated Slack workspace

Videos

Install

Install Unmanaged Package