Presence Display Component

Highlight the current status of Teams Users from withing Salesforce on a Lightning Record Page.

This component can show the status for both a single User as well as a list of Users through a Record's related list (such as AccountTeam or OpportunityTeam).

Permissions Required

Permission Description
Customize Application To create and save Lightning pages in the Lightning App Builder

Add Component to Page

To get started, create or edit a Lightning Record Page.

In the Components Toolbox, under the Custom - Managed section grab the Teams Presence component and drag it onto the Lightning page.

To get started, create or edit a Lightning Record Page.

In the Components Toolbox, under the Custom - Managed section grab the Teams Presence component and drag it onto the Lightning page.

Once added, a properties panel will appear on the right.

Property Description
Component Title Set the title of the component when it is rendered.
Single User Details The API field name (or path) of a field that contains the Teams User's email or display name.
Related Records The relationship that will be used to get a list of other Users to display.
User Details (multiple) The API field name (or path) of a field that contains the Teams User's email or display name, on the Related Record.
Sort Method How you would like to sort the list of Users, either strictly alphabetical, or first by status.
DM Button Display Specifies if the DM icon (speech bubble) should appear for the group and/or individual.
Compact Mode Changes the appearance to be a 2 column layout relying a bit more on icons.

Once the component looks good, save the page and activate it if necessary.

Presence Caching

The component updates itself every 10 seconds, and makes N+1 API calls to Microsoft Teams. 1 request to lookup each user's Teams Azure Active Directory ID, another to batch retrieve current status.

In environments where there might be a high volume of users continuously retrieving updates, the Teams API might start throwing errors (it does have limits).

You can enable Platform Cache in Setup for our application. 1MB of Org Cache will support approximately 500 looked up users.  Entries will be cached for 5 minutes (the minimum time we can cache an entry).