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. Controlling fields may also need to be included on the form as visible or hidden with a specified default value.
Search Layout for Submit Form
The Submit Salesforce Form launched from Slack honors the Search Layout from the connected Salesforce instance per Object and will display the first two fields configured within the Salesforce Setup. To edit your Search Layout navigate to the Object Manager and choose the Object that needs to be edited. Select Search Layout, select the appropriate profile, navigate to the carrot on the right side, and select edit. Configure the Object Search Results. For additional information, use Salesforce's Edit Your Search Layout help article.
Don't send a message
When invoked from a custom button or slash command users can immediately be shown the modal form instead of being prompted by ephemeral message first. This option requires the "Don't send a message" option is selected and a valid "triggerid" variable is set from the workflow-triggered workflow. This option is only available from webhook-triggered workflows initiated by the Centro app. The triggerid variable is only valid for 3 seconds as specified by Slack API documentation, so it is best practice for the Show Form step to be the first step in the workflow to avoid trigger_expired errors from the Slack API.