fields (max 5)Chat:Bridge allows for the creation of Salesforce Objects from Slack via Slack Dialogs. This feature provides convenience to those desiring to quickly create a Lead or Case or another object in Salesforce without having to log into the respective Salesforce application. The details of the feature are discussed here.
Configuring Salesforce Objects Creatable from Slack
Slack Dialogs offer convenience of being able to quickly create an object in Salesforce without having to log into Salesforce. However, since these Dialogs are limited to small forms, there are limitations on the number of fields (max 10) and data types that may be configured for this purpose. This feature is not intended to replace the same action in Salesforce, where more complex forms may be created along with a large collection of field types, validations rules, as well as process flows. However, in some scenarios, the convenience of being able to create such objects quickly from Slack has proven to be quite useful.
The configuration involves 2 field sets. The first set represents the Slack Dialog and is limited to no more than 10 fields.
The supported field types (or data types) used in the Slack Dialog are as follows:
The second set consists of additional fields that will not be presented or made visible to the Slack User during the creation. However, these fields may be populated using default values to provide additional data to the object being created, as shown in this example:
Creating a Salesforce Object
From Slack, the /sfnew command allows the Slack User to create preconfigured Salesforce Objects. Once created, you can also post a message from Slack to the Feed of the newly created object.
The /sfnew command requires the Slack User to have the necessary permissions via an assigned Salesforce Profile (or depending on the associated Salesforce User)
The syntax is as follows:
- /sfnew: Lists all the Salesforce Objects that can be created from Slack
- /sfnew OBJECT_NAME: Create a new Salesforce Object of type OBJECT_NAME
|SLACK COMMAND SYNTAX
The /sfnew command without an OBJECT_NAME as parameter results in Slack Modal with a drop-down list with all the Salesforce Objects that are configured to be Creatable from Slack and permissible to the Slack User executing the command.
Once a Salesforce Object is selected from the drop-down, or if you first start with the /sfnew command with an OBJECT_NAME as parameter, Chat:Bridge will evaluate the Salesforce Profile assigned to the Slack User issuing the command to ensure that Create permission on that Salesforce Object is granted via the profile.
The Slack Dialog currently supports the following data types:
- Text: Text input may be used to enter String, Phone, Number, Datetime, URL and Email field types.
- TextArea: TextArea for long descriptive fields.
- Picklist: Drop down Picklist values.
- CheckBox: For Boolean values.
- Select Menu: To lookup for relationships
Some of the fields shown can be populated with a default value, configured via the Chat:Bridge package in Salesforce.
In this example, the following fields were configured to create a new Salesforce Account from Slack:
And the Slack Modal to create a new Salesforce Account is as follows:
Once the Object is created in Salesforce, a confirmation message with a summary of the newly Object is displayed, along with more options such as to send a message to its Feed.
As mentioned earlier, once the Salesforce Object is created, you can send a message from Slack to its Feed, if it allows Feed Items to be posted.