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:
- A pop up dialog 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.
- 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 Dialog for specifying search criteria
To invoke the search dialog for specifying search criteria for a Salesforce object, the syntax is as follows:
/sf @<object name>
example: /sf @account will invoke the following dialog 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 or View Account details) are available via the pull down on the right of the result set. The View option retrieves Account details (in this example) and also allows editing of the Account (if update is enabled for Account in the Chat:Bridge configuration in Salesforce).
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.
|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”=zdev|
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.