Updated: 21 April 2025

📘 How to Post and Refresh Salesforce Records in Microsoft Teams Using Centro

This guide walks you through how to use Salesforce Flow and Centro to automatically post Opportunity records to an Account’s Microsoft Teams chat—and dynamically refresh those records when changes occur in Salesforce.

🎯 Use Case

You want to:

  • Post a new Opportunity record block to a Teams chat linked to the associated Account.

  • Automatically update (refresh) the record block in Teams when Opportunity fields (like Amount or Stage) change.


🧩 Prerequisites

  • Microsoft Teams and Salesforce connected via Centro.

  • Opportunity and Account objects with linked conversations enabled.

  • Centro component installed and configured in your Salesforce org.


🔄 Step 1: Post New Opportunity Records to Teams

Flow Type: Record-Triggered Flow on Opportunity Create

Key Steps:

  1. Run Asynchronously to prevent UI lag.

  2. Get Linked Conversation:

    • Use a "Get Records" element to pull the linked conversation based on the AccountId of the Opportunity.

    • Map the Centro channel ID to a variable (channelId - Text).

  3. Decision Element:

    • Check if the channelId variable is NOT null.

  4. Send Notification via Centro:

    • Use the channelId variable.

    • Attach the Opportunity record using Centro’s "Post Record Details".

    • Optionally include a message.

Outcome: When a new Opportunity is created, a record block is posted to the Account's chat in Teams.


🔁 Step 2: Refresh the Record Block on Update

Flow Type: Record-Triggered Flow on Opportunity Update

Trigger Conditions:

  • When important fields like Amount or Stage are updated.

Key Steps:

  1. Run Asynchronously.

  2. Get Linked Conversation:

    • Link the Opportunity to its existing Centro conversation (created in the first flow).

    • Set both channelId and messageTimestamp variables.

  3. Decision Element:

    • Ensure channelId exists before proceeding.

  4. Send Notification via Centro:

    • Use channelId and messageTimestamp.

    • Enable “Update Message” in the options.

    • Include updated Opportunity details and optional emoji/message changes to confirm updates visually.

Outcome: The original record block in Teams is updated, keeping your team informed in real time.


💬 Need Help?

Reach out to our support team or contact us for personalized assistance with your setup.