Skip to main content
Skip table of contents

Searching Salesforce Objects from Slack with Chat:Bridge

Chat:Bridge allows users to search Salesforce objects, both standard and custom, from Slack.

For a Salesforce object to be searchable from Slack:

  • It must be configured as Searchable via Chat:Bridge package configuration option – Salesforce Objects searchable and updatable from Slack
  • Fields to be used in search criteria and search results must be configured via the Chat:Bridge package configuration
  • Fields to be used in search criteria and search results must be accessible to both the Slack Integration user and the Slack User executing the search command from Slack.

Searching Salesforce objects from Slack

Chat:Bridge provides two modes to search Salesforce objects from Slack:

  1. A Slack Modal view comprising of up to 10 configurable fields that can be used to both specify the search criteria, as well as, provide the specification for the result set.
  2. Command line search that allows the user to select from available and accessible metadata for a given object and specify custom criteria for the search.

Both modes are described below.

Using Search Slack Modal for specifying search criteria

To invoke the search Slack Modal for specifying search criteria for a Salesforce object, the syntax is as follows:

/sf @<object name>

example: /sf @account will invoke the following Slack Modal where specific criteria can be specified in the fields below to look for Account(s) matching the criteria.  As mentioned earlier, the fields populating the form are configurable via the Chat:Bridge Salesforce package configuration.

The result of execution of this search will be displayed as follows:

Further actions (Send Message to the Account, View Account details, Link the Account to the current Slack Channel and Share the Account with the Slack channel) are available via the pull down on the right of the result set.

The fields returned in the search result set are the same as those specified in the search criteria.

Using Command Line for specifying search criteria

The command line mode allows you to choose your own field set to specify the search criteria.  The syntax is as follows:

/sf @OBJECT field1=value1 field2=value2: Searches for Salesforce Objects configured as Searchables with the word OBJECT in its name, using the field=value combinations as search criteria to filter the search results.

Examples:

SLACK COMMAND SYNTAX
/sf @account industry=banking employess=500
/sf @account “account name”=”acme corporation” “owner”=smith

Quotes can be used for object names, fields or values with more than one word.

For example, the following command searches for all the “Account” objects and returns the possible matches filtered using the criteria specified on the command line.  More than one possible match may be returned in the result set.  Up to 10 results will be retrieved from the search and will be sorted by their Name Field.

SLACK COMMAND SYNTAX
/sf @account “account type”=prospect “account owner”="admin user"

To assist with the command line syntax, Chat:Bridge allows retrieval of searchable fields

These are fields that are accessible to the Slack Integration user, as well as, the Slack user performing the query.


JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.