Updated: 15 July 2025

How to: Sync Slack Thread Replies to Salesforce Case Comments

Overview

This guide walks you through how to configure your Centro setup so that replies in a Slack thread are automatically logged as Case Comments in Salesforce.




🔁 Slack Setup: Create a Workflow Step

  1. Go to your Slack Workflow Builder.

  2. Add the “Reply to Salesforce Record” block.

  3. Select “Platform Event”.

  4. Give the API name a unique value (e.g., Case_Reply_Comment).





⚙️ Salesforce Setup: Create Two Flows


1. Case Creation Flow
  • Trigger Type: Platform Event

  • Purpose: Post new Case record to a Slack channel

  • Key Settings:

    • Hardcode the Slack Channel ID

    • Enable Starter Thread, Post Record Details, Link to Channel, and Link Thread

    • Customize messages or formatting as needed



2. Platform Event → Case Comment Flow


  • Flow Type: Platform Event-Triggered Flow

  • Triggered on: Centro Platform Event


Inside this flow:

  • Start Element: Select the platform event and define the trigger

  • Key Variables Used:


    • API Name → to determine flow behavior

    • Message Text → to store the reply content

    • Value → maps to the Case ID (record ID)





📌 Decision Logic

Use a Decision element to check the API Name. For example:

  • If API Name = Case_Reply_Comment, then proceed to create a Case Comment.




📝 Create Case Comment

  • Use a Create Records flow element:


    • Object: CaseComment

    • Parent ID: Set to the Value (i.e., Case ID)

    • Comment Body: Set to Message Text

    • Optional: Create a formula to include the Slack username or email


Example formula: TEXT(Message_Text) & " - by " & TEXT(Slack_Username)

✅ Final Touches



  • Optionally set the IsPublished field to true or false depending on whether comments should be visible externally.

  • Test your setup by replying to a linked thread in Slack and confirming the comment appears on the Case in Salesforce.






❓Need Help?



If you run into any issues or have questions about your setup, reach out to the Centro support team