Centro Support Center

Contact Us

Sending Centro Slack messages from Salesforce using Flow or Process Builder

Centro supports sending Slack messages from Salesforce using Salesforce Flow or Process Builder. This works on any object, and leveraging logic in Flow or Process builder, allows conditional events to trigger a Slack message in Centro's format. 

Common use cases:

As usual, the format of the message is governed by the object's default Compact Layout. Some objects have specific Centro buttons, such as Email and SMS for those that have an Email field on the object. 

Steps for configuring Salesforce Flow:

In this example, we'll attempt to notify a Slack channel when an Opportunity is set to Won. Note: if you'd like to incorporate other resources in the Slack Message, see this documentation.

  1. Go to Salesforce Setup->Flows
  2. Press "New Flow"
  3. Choose "Record Triggered Flow":
  4. We recommend using Auto-Layout:
  5. In the "Start" block, choose an object and pick Opportunity:
  6. Click "Edit" Next to "Trigger: A record is created". We need to change this to when records are updated:
  7. Now set the Condition Requirements. In this case, we want Opportunity Won (notice the selection for "When to run"):
  8. Now click the "+" button to add the Centro message:
  9. Click the item "Action" under "Interaction":
  10. Now search for Centro in the Action Search box:
  11. Give the Action a label, pick a channel, and change the header message:
  12. Save and Activate the Flow
  13. Try it out!


Steps for Configuring Process Builder

We'll use the same use case above, but instead of Flow we'll use process builder. Note, that Flow has some advantages in that we provide a Slack Channel picker, whereas in Process Builder you'll need to get the Channel ID manually from Slack.

  1. First, start a new Process in Process Builder. Go to Salesforce Settings -> Process Builder
  2. Configure the process to your needs. In the Opportunity Won example, we'll select Opportunity as our object, and select "when a record is created or edited" as our selection to start the process:
  3. Select the appropriate criteria. In this case, when the Conditions are Met, with the Opportunity Stage equaling "Closed Won":
  4. Next in the "Immediate Actions" choose Apex. Find the Apex class "Centro: Send a Record Notification to Slack". Then, add following required variable: "RecordID", "ChannelID", and "Message".
  5. For RecordID: set to the primary object's ID field (see example)
  6. For ChannelID: Set to the Slack Channel ID. You may find this in the URL of the Slack channel. Slack Channel IDs always start with a "C": (This is why using Flow is recommended): 
  7. Message: this is the custom message you want before the block.
  8. Test it out by making the opportunity meet those conditions: