XML for Activities

Last modified: July 07, 2010

Applies to: Office 2007 | Outlook 2010 | SharePoint Server 2010

The Microsoft Outlook Social Connector (OSC) XML schema allows an OSC provider to define activities. Activity information can include the social network where the activity feed items originated, details of each activity feed item (such as owner, type, and publish date of the activity), and the template to display the activity. To support showing activities on the People Pane, a social network’s OSC provider must implement and return the correct activities XML.

This topic contains example scenarios that show the OSC provider extensibility API calls that an OSC provider implements and the OSC makes to obtain activities information. Information is expressed in XML strings that conform to the OSC provider XML schema.

For an example of activity feed XML, see Activity Feed XML Example. For more information about synchronizing friends’ activities, see Synchronizing Friends and Activities. For a complete definition of the OSC provider XML schema, including which elements are required or optional, see Outlook Social Connector Provider XML Schema.

  • Scenario 1—OSC gets a list of activities for friends of the Outlook user, and details about the friend owner of each activity:

    1. An OSC provider that supports showing activities of friends from the social network site, and allowing the OSC to cache friends’ activities, indicates that to the OSC by using the getActivities and cacheActivities elements. getActivities and cacheActivities are child elements of the capabilities element.

    2. The OSC provider implements the ISocialProvider::GetCapabilities and ISocialProfile::GetActivitiesOfFriendsAndColleagues methods.

    3. The OSC calls ISocialProvider::GetCapabilities to check the value of the following elements: getActivities to verify that the OSC provider supports showing activities from the social network, and cacheActivities to verify that the provider supports caching friends’ activities.

    4. The OSC calls ISocialProfile::GetActivitiesOfFriendsAndColleagues to get the activitiesCollection parameter string, which contains a list of activities for friends of the Outlook user. The activitiesCollection string complies with the XML schema definition for the activityFeed element in the XML schema.

    5. Based on the XML schema definition for activityFeed, the OSC can further parse the activitiesCollection string to find out the type, publish date, and other information about each activity, and how to display the activity.

    6. For each activity in the activitiesCollection string, the OSC can pass the value specified in the ownerID element (which is a child element of the activityDetails element for each activity in the activitiesCollection string) as the userId parameter to call the ISocialSession::GetPerson method. This returns an ISocialPerson object for that friend owner of the activity.

    7. For each activity in the activitiesCollection string, the OSC can call ISocialPerson::GetDetails to get details, in the details parameter, for the friend owner. These details can include firstName, lastName, and emailAddress. The details parameter conforms to the XML schema definition for the person element.

  • Scenario 2—OSC dynamically synchronizes activities for a person selected in the People Pane:

    1. An OSC provider that supports on-demand synchronization of activities indicates that to the OSC by using the getActivities and dynamicActivitiesLookupEx elements. The OSC provider also sets the hashFunction element. All three elements are child elements of capabilities.

    2. The OSC provider implements the ISocialProvider::GetCapabilities and ISocialSession2::GetActivitiesEx methods.

    3. The OSC calls ISocialProvider::GetCapabilities to check the value of getActivities and dynamicActivitiesLookupEx to verify that the OSC provider supports on-demand synchronization of activities. The OSC also notes the value of the hashFunction element supported by the OSC provider.

    4. When the Outlook user selects another user in the People Pane, selects another item in the Outlook explorer window, or opens an Outlook inspector window, the OSC refreshes the People Pane to let the Outlook user see the latest activities of the selected person. The OSC encrypts the person’s SMTP address by using the hash function specified in the hashFunction element, forming an XML string that conforms to the XML schema definition for the hashedAddresses element.

    5. The OSC calls ISocialSession2::GetActivitiesEx, providing this XML string of the hashed address as the hashedAddresses parameter, to get a current collection of activities for that person in the activities parameter. The activities parameter string complies with the XML schema definition of the activityFeed element.

    6. Based on the XML schema definition for activityFeed, the OSC further parses the activities string to find out the type, publish date, and other information about each activity, and how to display the activity.

You can find more information about specifying XML for activities in the following topics of this section:

Show: