How to Create a Centro Form Using a Salesforce Platform Event instead of an Object
Centro now supports building forms that are not tied to a standard Salesforce object. Instead, you can bind a form to a Salesforce Platform Event and capture custom event-driven data directly from Slack.
This guide walks you through creating a Platform Event, adding fields, building a Centro Form in Slack, and triggering the form with an emoji reaction.
1. Create a Salesforce Platform Event
1. In Salesforce Setup, search for Platform Events.
2. Click New Platform Event.
3. Enter a name such as Centro Form Platform Event. Note: You may also use the Centro out of the box platform event if you'd prefer not to create one.
When created, Salesforce automatically provides these standard fields:
Created By
Created Date
Event UUID
Replay ID
Add Custom Fields
Add the following custom fields to your Platform Event. In this example, we're capturing Case-like fields, but don't want to create a case quite yet:
Subject (Text)
Description (Long Text)
Message Timestamp (Text)
Channel ID (Text)
Note: Platform Events support only a small set of field types. You cannot add picklists, dependent picklists, or lookup fields.
2. Create a Centro Form in Slack
Next, navigate to the Centro App Home inside Slack.
1. Open Slack and go to the Centro app.
2. Select Form Setup.
3. Click Create New Form.
4. Name your form. For example: Case Platform Event.
Select Your Platform Event
In the Salesforce Object selection field, type the name of your Platform Event. You should see it appear (e.g., Centro_Form_Platform_Event__e).
Once selected, Centro will display the standard and custom fields you created.
3. Add and Configure Form Fields
You can now add fields to the form just like any other Centro Form.
Add Subject → mark as required
Add Description → mark as required
Configure Hidden Merge-Tag Fields
For Message Timestamp and Channel ID, you will likely want these populated automatically.
Move each field to the Hidden Fields section, then enter the Centro merge tags:
[[message_ts]]
[[channelid]]
These values populate automatically when a Slack user triggers the form.
4. Trigger the Form Using an Emoji Reaction
Centro allows you to trigger any form from a global emoji workflow in Slack.
To configure:
In Slack, open the Centro app.
Go to Workflow Setup.
Select Global Emoji Reaction.
Create a new trigger.
Select the emoji you want to use.
Choose the Platform Event–based form you just built.
Click Save.
Now, anytime someone reacts to a Slack message with that emoji, Centro will open the form you created. The user will see:
Subject (required)
Description (required)
Hidden fields containing Message Timestamp and Channel ID
5. Test the Workflow
1. Go to any Slack channel.
2. Type a message.
3. Add the emoji that you configured.
4. Centro will launch your Platform Event–powered form.
When the user submits it, Centro fires the Platform Event into Salesforce with all mapped field values.
Need Help?
If you have questions or want support configuring advanced Platform Event workflows, please contact the Centro team anytime.