Centro Support Center

Contact Us

Create or Edit Salesforce Data with Custom Form

The Centro Forms or Submit Salesforce Form Workflow Step can 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 them to edit and submit data in a modal form by clicking the "Open Form" button. The fields 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 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 the 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 the expected type, and strings and numbers should be in a format they can be parsed to the 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 as visible or hidden on the form 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

Users can immediately be shown the modal form instead of being prompted by an ephemeral message when invoked from a custom button or slash command. This option requires the "Don't send a message" option to be selected and a valid "triggerid" variable to be 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.

See Also

Create Salesforce Forms in Slack Quickstart Guide