There are three ways in which you can send messages from Salesforce to Slack channels via Chat:Bridge:

  1. Using Chat:Bridge commands that may be added to a message in a Chatter Post.
  2. Using Chat:Bridge Quick Action for Salesforce Classic or Lightning  (requires adding Slack Quick Action to the page layout from which you will post messages).
  3. Using Chat:Bridge Lightning component.

Chat:Bridge Commands

Posting from a Feed to a Slack Channel

Usage:  /slack:<channel>  (ex:  /slack:sales)
/slack:<@user>          (ex: /slack:@admin)

  • /slack: Static keyword that must be used at the start of the message
  • <channel>: The name of the Slack public or private channel to which the FeedItem will be posted
  • <@user>: Slack user to whom the message is posted

Example:  /slack:support ABCo requesting extension of trial license.  Details attached.  @this.*

Please note that embedded images and HTML tags in message content are currently not supported.  Images may be sent to Slack as attachments

 Including reference to the Salesforce Object in the message

You can reference:

  • Specific data field(s) of the Salesforce Object from which the message is being posted
  • The configured Object Page Layout to share the full context of the Object (fields, related lists, etc.)
  • Summary section of the Object Page Layout (an abbreviation of the full page layout)


Usage:  @this.[ field [ .relatedField ] | * | summary]

  • field: A field associated with the Salesforce Object from where the Feed is posted.  This must be the field name and not field label.
    • This combination can be used several times and the fields will be included in the Slack’s message summary section
    • relatedField: Using dot notation you can reference fields from related objects as long as they have first level and one-to-many relationship.
  • .*: Use .* to include the PDF representation of the configured Salesforce Object Layout

Examples (posting from a Case Feed):

@this.*  – to include the full context of the Case in the message (from the configured page layout)
@this.CaseNumber – to reference the Case Number in the message
@this.Account.Name – to reference the Account Name associated with the Case

To Mention a Slack User or Channel

Usage:  @user or @channel
Example:
/slack:sales @channel @zagile We have a call with the prospect tomorrow morning and will need the demo environment ready.

Chat:Bridge Quick Action

From either Salesforce Lightning or Classic UI, Chat:Bridge provides Slack Quick Action page to make it easier to post messages with Slack public channels.  The Quick Action window eliminates the need for the /slack:<channel> comment.

Depending on the Salesforce object, the Quick Action items may render differently.  For example, in Opportunity, you will see the buttons on the top right (Slack LE). Selecting this Quick Action will result in a pop up.  The Attach Details checkbox is the same as adding @this.* to the message body, and will include Summary and Details associated with the Opportunity, as defined in the page layout for the Slack Integration User profile.

In Salesforce Classic view, it will be rendered as follows:

The Add Fields button on the lower right provides an easy way to select specific object fields that you can embed in the message (emulating the @this.[ field [ .relatedField ] | * ] functionality mentioned above.)

Back  Next