Centro Support Center

Contact Us

Create or Edit Salesforce data with custom form

The Submit Salesforce Form Workflow Step can be used to create or edit Salesforce record data in a custom modal form. This step uses the Salesforce Connection of the user who runs the Workflow Step or as a fixed Automation User as indicated when saving the Step. This allows Slack internal or external users (via Slack connect) to modify Salesforce data even if they do not have a login to Salesforce by utilizing the Automation user connection. Warning: this will allow any workflow user to create/edit data in Salesforce as the specified Salesforce user. If the form contains a lookup field the workflow user will be able to search and view the names of internal records using the sharing rules of the connected Salesforce user.

The Submit Salesforce Form step will send a user an ephemeral message only they can see (shown above) allowing the user to edit and submit data in a modal form by clicking the message "Open Form" button. The fields that are displayed to the user are configurable when editing the step. Fields may be displayed to the user, or they can be hidden from the user to set a field value to a default (i.e. for a Record Type or Status field).

Add fields using the "Add Field" picker in the workflow step and move fields in the order they should be displayed or move fields to bottom to hide the field. Set default values for fields by inserting Workflow variables or specifying a constant value using the appropriate data-type formatting. Date fields should be formatted using ISO 8601 format, Picklists should use appropriate API names, lookups should specify a Salesforce Record Id of expected type, and strings and numbers should be in a format they can be parsed to expected length and type. 

Editing existing records and specifying hidden values

To edit an existing Salesforce Record, specify the Record Id value as a hidden field by adding the field and moving it to the bottom of the Workflow step modal. When the Record Id is specified, values will be populated using the existing Salesforce data unless overridden in the Workflow step by a variable. Specifying a Record Type by adding the RecordType field as a hidden value enables Record Type specific Picklist values to be respected.

Filtered Lookups and Picklists

Filtered Lookups and dependent Picklists are supported when dependent field values are provided prior to displaying the modal form (i.e. when editing an existing Salesforce record or when a default field value is set as a displayed or hidden field). Dependent Picklists and filtered Lookups that depend on the user to specify a dependent field value are not supported due to Slack limitations in modals with inputs not context aware of user-specified values in other fields. 

A work-around to this limitation is to use multiple form modals so that dependent field values may be specified in first modal form, save then edit the Salesforce record in a second form to set the filtered or dependent fields. Alternatively the Select Record step may be used to prompt the user to select an existing record (i.e. an Account) that can then be passed as a default value to the Show Form step. The Select Record step may also output all field values so that any field from the user selected record may be used as a default in the form.


See Also

Create Salesforce Forms in Slack Quickstart Guide