Editar

Compartilhar via


Introduction to activity feeds in Dynamics 365 Customer Engagement

As a developer implementing collaboration scenarios with activity feeds, you should become familiar with the activity feeds terminology, definitions and entity model.

Activity feeds concepts

The following table contains activity feeds definitions.

Term Description
Wall A place in Dynamics 365 Customer Engagement (on-premises) where activity feeds are displayed as short updates.
Record Wall A place in Dynamics 365 Customer Engagement (on-premises) where activity feeds for a record, such as an account or lead, are displayed. In the Dynamics 365 Customer Engagement (on-premises) web application, the record wall is shown as What’s New for the record. The record wall contains posts that are regarding the record or that mention the record. If a record is the system user (user), the wall also contains the posts that are created by the user.
Personal Wall A wall that is personal to a user. In the Dynamics 365 Customer Engagement (on-premises) web application, it is user’s What’s New wall. This wall contains the posts about the records that the user is following, posts that are regarding the user or that mention the user.
Auto Post A post generated by Dynamics 365 Customer Engagement (on-premises) by applying an auto post rule in case of an event, such as creation of an account or closure of a won opportunity. An auto post can be shown on a record wall or personal wall. The auto post text is localized. Note: When creating a new opportunity, an auto post is generated, if one of the following attributes is specified: CustomerId, ParentAccountId or ParentContactId.
Manual Post (User Post) A post created by a Dynamics 365 Customer Engagement (on-premises) user. A manual post can be shown on a record wall or personal wall.
Auto Post Rule A rule that is used by Dynamics 365 Customer Engagement (on-premises) to generate an auto post when an event occurs. For example, a rule may specify to generate an auto post when a new opportunity is created for an account.
Mention A part of a post that refers to a Dynamics 365 Customer Engagement (on-premises) record. One post can have multiple mentions.
Comment A remark that is added on a post. A comment is related to a parent post. It cannot exist without a parent post. If a parent post is deleted, the post’s comments are deleted also.
Follow An action taken by a user on a Dynamics 365 Customer Engagement (on-premises) apps record that enables that user to see the posts about the record on their personal wall. Note: For Dynamics 365 for Customer Engagement (on-premises), the maximum allowed number of records to follow is 5000. The default number of records that the user can follow is 1000. The default value is configurable and can be changed by an Administrator or a user with the permissions to modify the deployment settings.
Unfollow An action taken by a user on a Dynamics 365 Customer Engagement (on-premises) record that stops posts about that record from being displayed on the user's personal wall.
Like An action taken by a user on a post that expresses that the user liked the post. Note:
Unlike An action taken by a user to remove the Like from the post. Note:
Thread or Conversation A collection of posts and all related comments.
View A view of entity records based on a query.

Note

Manual and auto posts that are created programmatically can have up to 2000 characters. Posts created in the Dynamics 365 Customer Engagement (on-premises) web application can have up to 1000 characters. Comments that are created programmatically can have up to 1000 characters, but comments created in the web application are limited to 500 characters.

Activity feeds entities

The following table contains information about the activity feeds entities.

Entity Description
Post Represents an auto post or a manual (user) post.
PostComment Represents a comment on an activity feed post.
PostFollow Represents a post follow that indicates that a user follows a record. Deleting the PostFollow record is an action of “unfollow”.
PostLike Represents that the user liked the post.

Deleting the PostLike record is an action of “unlike”.
msdyn_PostConfig Contains activity feed configuration for an entity and is used to enable or disable an entity for activity feeds.
msdyn_PostRuleConfig Contains activity feed rule configuration for an entity and is used to enable or disable an auto post rule for an entity.
msdyn_PostAlbum Contains user profile images that are stored as attachments and displayed in posts.

Like/Unlike

With Like/Unlike, you can express an immediate opinion about a post. This makes your communication more personable and interactive. Use Like/Unlike to exchange kudos with your co-workers, praise the work of your subordinates and measure the popularity of the posts. An action taken by the Dynamics 365 Customer Engagement (on-premises) users showing that they like a particular post is called Like. An action taken by a Dynamics 365 Customer Engagement (on-premises) user to undo the “Like” on a post is called the Unlike. You can add one “Like” to the post; however, a post maybe “liked” by multiple users. To add a “Like” to a post, create the PostLike record and associate it with the parent Post record. To remove the “Like” from the post, delete the PostLike record.

Mentions

During discussions within a group, you often need to reference a specific person (a Dynamics 365 Customer Engagement (on-premises) user), or a record, such as an account, and share this information with others. In Dynamics 365 Customer Engagement (on-premises) Activity Feeds, this action is called a “mention.” The posts that mention a user can be displayed on the user’s record wall and user’s personal wall (“What’s New” in Dynamics 365 Customer Engagement (on-premises)) apps. The posts that mention a record are displayed on the record’s wall.

To add a mention to a post, use an expression in the following format in the Post.Text attribute:

@[Entity,ID,"Display String"].

Note

There are no spaces following commas in this expression.

The following table describes the parameters in the expression:

Parameter Description
Entity An entity logical name or an entity type code for the record that is mentioned in the post.
ID The ID of the record that is mentioned in the post.
Display String The text that you want to be displayed in the mention, such as a record’s name.

The entity type codes for all default (non-custom) entities are predefined. For more information, see IOrganizationService Entities. To view the entity metadata for your organization, install the Metadata Browser solution described in Browse the metadata for your organization. You can also browse the reference documentation for entities in the Entity Reference.

You can specify multiple mentions in this attribute. To retrieve data contained in the mention, parse the string in the Text attribute to search for the “@[“ characters that separate mentions from other mentions or text.

For additional information about post mentions, see Blog Post: How to do Mentions with Activity Feeds.

Displaying data on the record wall or personal wall

To retrieve posts for displaying on a record wall or a personal wall, you can use the RetrieveRequest message or RetrieveMultipleRequest message. However, to retrieve pages of posts with associated comments and likes in one single call, you can use special activity feeds messages.

To retrieve pages of posts with associated comments and likes for a record wall, use the RetrieveRecordWallRequest message. To retrieve pages of posts with associated comments and likes for a personal wall, use the RetrievePersonalWallRequest message.

The following posts with comments are displayed on the Record Wall:

  • Posts that are regarding a record. The record ID is specified in the Post.RegardingObjectId attribute.

  • Posts that mention a record. The record ID is specified within the Post.Text attribute.

  • For a system user (user) record, the wall also includes the posts that the user created. The Post.RegardingObjectId attribute contains the current user ID.

    The following posts with comments are displayed on the Your (User) Personal Wall (What’s New in Dynamics 365 Customer Engagement (on-premises)):

  • Posts that are regarding you. The Post.RegardingObjectId attribute contains your user ID.

  • Posts that mention you. Your user ID is specified within the Post.Text attribute.

  • Posts that are regarding a record or that mention a record that you follow.

Note

You can only follow the records on which you have read privileges and access rights. If you lose read permissions, a follow is automatically removed. All Dynamics 365 Customer Engagement (on-premises) users automatically follow themselves. You can only see the posts that are regarding the records or mention the records on which you have read privileges and access rights.

If you create the PostFollow record for the account A and set the OwnerId on the PostFollow to the user B, then the user B follows the account A.

For more information about the role-based and record-based security, see, The Security Model of Dynamics 365 Customer Engagement (on-premises).

See also

Activity Feeds Entities
RetrieveRecordWallRequest
RetrievePersonalWallRequest
Configure Activity Feeds
Connect to Yammer
Sample: Collaborate with Activity Feeds
Blog Post: Working with Activity Feed using Microsoft CRM SDK
Blog Post: How to do Mentions with Activity Feeds
Blog Post: Displaying a Contact’s Facebook Picture in Microsoft Dynamics CRM 2011
Blog Post: Data management for Activity Feeds entities
Blog Post: How to Add a Record Wall to a Form
Blog Post: Activity Feeds Solution & Development Environment