24
SOCIAL CONNECTED Functionality and API

Functionality and API. Talk Goals How do I set this up? What can I do with it? Where is this going?

Embed Size (px)

Citation preview

Page 1: Functionality and API. Talk Goals How do I set this up? What can I do with it? Where is this going?

SOCIAL CONNECTEDFunctionality and API

Page 2: Functionality and API. Talk Goals How do I set this up? What can I do with it? Where is this going?

Talk Goals

How do I set this up? What can I do with it? Where is this going?

Page 3: Functionality and API. Talk Goals How do I set this up? What can I do with it? Where is this going?

Timeline

OpenID (2005) OAuth 1.0, 2.0 (2007-present) Sitecore 6.5 (April 2011) Social Connected v1.0 (October 2011)

Sign In, Content Messaging Social Connected v1.1 (March 2012)

Goal messaging, Tweet This tracking, Sitecore support

Social Connected v1.2 (July 2012) Instant feedback, one-step campaigns

Page 4: Functionality and API. Talk Goals How do I set this up? What can I do with it? Where is this going?

Installation

Available at sdn.sitecore.net/products

Package install Update package available (v1.0/v1.1-

>v1.2) No config file changes required.

Page 5: Functionality and API. Talk Goals How do I set this up? What can I do with it? Where is this going?

Facebook Setup

Defining the App http://developers.facebook.com/apps App Name App ID App Secret Domains Login URL

Create Application Item at /sitecore/social/applications/default

Page 6: Functionality and API. Talk Goals How do I set this up? What can I do with it? Where is this going?

Facebook Login

Setup: Add sublayout, “Login with Facebook” Disabled XHTML validation on item.

Functionality: User logged in? Link FB to user’s

account. User not logged in?

Find a match in extranet or sitecore, if available.

Else, create new account

Page 7: Functionality and API. Talk Goals How do I set this up? What can I do with it? Where is this going?

Login API

Two method calls : ConnectUserManager.LoginUser ConnectUserManager.AttachUser

MatchUser pipeline can also modify matching logic.

Page 8: Functionality and API. Talk Goals How do I set this up? What can I do with it? Where is this going?

Customizable Sublayout

Image, text can be customized Or, create your own sublayout to call

login API

Page 9: Functionality and API. Talk Goals How do I set this up? What can I do with it? Where is this going?

Personalization

Extensive information from Facebook, including: Email, birthdate, education, profile details (religious,

political, marital, etc.), all current likes and interests.

Option to query off line. Convenience methods for gender, interests.

Page 10: Functionality and API. Talk Goals How do I set this up? What can I do with it? Where is this going?

Walkthrough 1

Creating the Facebook application Enabling login Creating a Facebook test account Adding personalization

Page 11: Functionality and API. Talk Goals How do I set this up? What can I do with it? Where is this going?

Goal Messaging

Send targeted message to visitor’s Facebook page.

Goals and Messages must be published.

No code option: Attach Goal to Item Code option:

GoalUtil.RegisterEventParameters Fire goal from code Send token replacement values

Page 12: Functionality and API. Talk Goals How do I set this up? What can I do with it? Where is this going?

Opt In/Opt Out

Can be implemented through the API: PublishPreferenceManager.SetPreference(Me

ssageId, Sitecore.Context.User, Preference); Config option to disallow messages by

default.Social.AllowPublishByDefault

But Goal to Message navigation is tricky.

Can be implemented through the Rules Engine. This allows using a single profile option.

Page 13: Functionality and API. Talk Goals How do I set this up? What can I do with it? Where is this going?

Walkthrough 2

Linking a goal to a content item Creating a goal message Triggering the message Rules engine interface

Page 14: Functionality and API. Talk Goals How do I set this up? What can I do with it? Where is this going?

Token Replacement

Goal text:My favorite Beatle is $favoriteBeatle!

Code:var parameters =

new Dictionary<string, string>();

parameters["favoriteBeatle"] = "value to display";

GoalUtil.RegisterEventParameters(

"Beatles Poll Entered", parameters);

Page 15: Functionality and API. Talk Goals How do I set this up? What can I do with it? Where is this going?

Walkthrough 3

Triggering a goal from the API. Sending a goal message with token

replacement.

Page 16: Functionality and API. Talk Goals How do I set this up? What can I do with it? Where is this going?

Content Messaging

Does not require DMS Messages bound to content items. Sent to FB at publish, or manually Campaigns for tracking back traffic. Display of downstream social

actions. Published from CRM server.

Domain name can be set in configuration.

Page 17: Functionality and API. Talk Goals How do I set this up? What can I do with it? Where is this going?

Walkthrough 4

Creating a Facebook page. Create Account for page Creating a content message Message created on publish Show Like/Share capture

Page 18: Functionality and API. Talk Goals How do I set this up? What can I do with it? Where is this going?

Like/Tweet Analytics

Customizable sublayout Assign engagement value to

Likes/Tweets. Assign campaign for capturing

responses.

Page 19: Functionality and API. Talk Goals How do I set this up? What can I do with it? Where is this going?

Config Files

Two config include files: Sitecore.Social.config

Commands Pipelines Networks Content and API hooks Functional Settings

Sitecore.Social.Profile.Mapping.config Config files have good comments!

Page 20: Functionality and API. Talk Goals How do I set this up? What can I do with it? Where is this going?

Configuration Options

Allow/Disallow profile fields Enable offline polling of status

changes Disable goal messages unless

explicit opt-in Set link domain Set message caching Setup offline querying for FB status

changes .

Page 21: Functionality and API. Talk Goals How do I set this up? What can I do with it? Where is this going?

Pipelines

CreateSocialMessage Customize to add logging or capture meta-data.

ReadSocialMessage Determines messages linked to current item. Customize to filter messages.

BuildMessage Creates markup, does token replacement. Customize to extend custom markup.

PublishMessage Manages handoff to social network. Customize for logging, or for opt-out logic.

Page 22: Functionality and API. Talk Goals How do I set this up? What can I do with it? Where is this going?

Conclusions

Active pace of new features. 3rd party login simplified Extends “customer engagement”

into Social Networking space Personalization extended, and given

more to work with. Documentation is incomplete. A tool

like Refelctor or DotPeek is a must.

Page 23: Functionality and API. Talk Goals How do I set this up? What can I do with it? Where is this going?

Questions?

Page 24: Functionality and API. Talk Goals How do I set this up? What can I do with it? Where is this going?

Thank you!

Dan SolovaySenior Developer, Velir Studios

Email: [email protected]: @DanSolovayBlog: www.dansolovay.com