salesforce for twitter and facebook - setup guide v4.6

42
Salesforce for Twitter and Facebook – Setup Guide Force.com Labs AppExchange Package: Version 4.6 Updated: June 2012

Upload: praveen-kumar

Post on 08-Nov-2014

485 views

Category:

Documents


3 download

DESCRIPTION

setting a salesforce environment to twitter and facebook integration set up

TRANSCRIPT

Page 1: Salesforce for Twitter and Facebook - Setup Guide v4.6

1

Salesforce for Twitter and Facebook – Setup Guide

Force.com Labs AppExchange Package: Version 4.6

Updated: June 2012

Page 2: Salesforce for Twitter and Facebook - Setup Guide v4.6

© Copyright 2011 salesforce.com, inc. All rights reserved. Salesforce for Twitter and Facebook, V4 – Page 1

Table of Contents Overview ...................................................................................................................................... 2 

New Features: Salesforce for Twitter and Facebook, Version 4.6 ............................................ 2 Salesforce for Twitter and Facebook, Version 4 – Features Added .......................................... 2 Salesforce for Twitter and Facebook, Version 3 – Features Added .......................................... 3 

Installing the Salesforce for Twitter and Facebook AppExchange Package ........................ 4 The Setup Page ........................................................................................................................... 6 

Authorizing a Bit.ly account ....................................................................................................... 6 Adding a Knowledge Base URL ................................................................................................ 6 

Setting up Twitter Accounts, Facebook Fan Pages, and Twitter Searches .......................... 6 Authorizing Your Facebook Fan Page(s) .................................................................................. 6 Authorizing your Twitter Account(s) ........................................................................................ 11 

Twitter Searches ....................................................................................................................... 13 Creating Twitter Searches ....................................................................................................... 13 Running Twitter and Facebook Fan Page Searches ............................................................... 16 Manual Searches .................................................................................................................... 16 Automating Searches .............................................................................................................. 17 Using an Apex Wrapper Class to Automate Twitter Searches ................................................ 18 

The Salesforce for Twitter and Facebook Homepage ........................................................... 20 The Social Agent Page ............................................................................................................. 22 Auto-Associate Twitter Contacts or Leads to a Campaign ................................................... 23 Finding a Contact’s Twitter Username ................................................................................... 24 Get Author Info .......................................................................................................................... 25 

Updating a Twitter Conversation using Get Author Info .......................................................... 25 Updating a Twitter Contact or Lead using Get Author Info ...................................................... 25 

Adding Conversations to your Case Layout .......................................................................... 26 Setting up Knowledge Integration ........................................................................................... 27 Automatic Agent Signatures .................................................................................................... 31 Enabling Salesforce for Twitter and Facebook for non-Administrator Profiles .................. 35 Twitter Contributors ................................................................................................................. 37 Languages and Translation ..................................................................................................... 39 

Translation ............................................................................................................................... 39 Supported Character Sets ....................................................................................................... 39 

Changes and Updates .............................................................................................................. 40 Deprecated Fields ................................................................................................................... 40 Updated Salesforce API: Now 19.0 ......................................................................................... 40 

Further Information ................................................................................................................... 41 About OAuth ............................................................................................................................ 41 

Page 3: Salesforce for Twitter and Facebook - Setup Guide v4.6

© Copyright 2011 salesforce.com, inc. All rights reserved. Salesforce for Twitter and Facebook, V4 – Page 2

Overview

Salesforce for Twitter and Facebook allows your company to interact with customers and prospects in the real-time world of social media. Salesforce for Twitter and Facebook can be used to enhance your customer service and support, generate new leads, and help you better understand your customers and prospects. It can also be used to monitor your company or brand’s online footprint, including customer and market sentiment, market visibility, and overall impact.

New Features: Salesforce for Twitter and Facebook, Version 4.6

UI upgrades Facebook Fan page authorization changes

Salesforce for Twitter and Facebook, Version 4 – Features Added

Facebook Integration o Authorize Facebook Fan pages in your Salesforce org with just two clicks o Automatically and manually scan the Facebook Fan page for new posts and comments o Automatically (and manually) create Cases, Contacts, Leads, and Person Accounts for

users posting on your Facebook Fan page o Enhanced functionality, including:

Selectively post your own Facebook Fan Page posts to your Chatter feed, using the #ch hashtag

Reply to Facebook Fan Page posts with one click using prewritten, customizable messages.

Reply to Facebook Fan Page posts with automatically shortened URLS to Salesforce Knowledge Articles or other websites

Setup Page Centralized setup page: enter a bit.ly username and API key once Agent Homepage Salesforce for Twitter and Facebook has two tabs: “Salesforce Social,” and

“Social Agent,” which has the same functionality, but lacks links to admin activities like the Scheduled Searches page, the Setup page, and so on.

Page 4: Salesforce for Twitter and Facebook - Setup Guide v4.6

© Copyright 2011 salesforce.com, inc. All rights reserved. Salesforce for Twitter and Facebook, V4 – Page 3

Salesforce for Twitter and Facebook, Version 3 – Features Added

Integration with Salesforce Knowledge: Attach Articles to Cases, and reply to tweets with links to Articles in your Salesforce Knowledgebase

Integration with Salesforce Chatter o Post outgoing Tweets to your Chatter profile with one click o Promote Twitter Conversations on Chatter, and ask your Chatter followers for help and

advice Message Templates:

o Standardize your customer responses: Reply to Tweets with one click using prewritten, customizable messages.

Twitter Monitor: Selectively repost your own tweets to your Salesforce Chatter feed, using the #ch hashtag

Person Accounts – Enabled: o Install Salesforce for Twitter and Facebook in any application with Person Accounts

enabled o Automatically create Person Accounts when you bring Twitter Conversations into your

org o Perform any and all actions available on Contacts and Leads on Person Accounts

Bulk Update Contacts, Leads, and Person Accounts using “Get Author Info”: Select up to 100 Contacts, Leads, or Person Accounts, and update their Twitter information with one click.

Install in PE orgs: Salesforce for Twitter and Facebook can now be installed in PE orgs Group ownership of Twitter Accounts: Allow only members of a Salesforce group to post

using a specific Twitter Account – Agents, Social Media Gurus, Administrators, etc.

Page 5: Salesforce for Twitter and Facebook - Setup Guide v4.6

© Copyright 2011 salesforce.com, inc. All rights reserved. Salesforce for Twitter and Facebook, V4 – Page 4

Installing the Salesforce for Twitter and Facebook AppExchange Package In order to leverage the benefits of the Salesforce for Twitter and Facebook application, you must first install it into your salesforce.com instance. To install the Salesforce for Twitter and Facebook AppExchange Package:

1) Visit Salesforce for Twitter and Facebook AppExchange listing and click “Get it Now” 2) Select your environment type (Production or Sandbox) 3) When prompted, log in with your administrator user account. 4) You will be presented with the list of items in the Salesforce for Twitter and Facebook

AppExchange package, including Apps, Objects, and Code. Click Continue.

5) Step 1: Approve Package API Access. You must approve the package to use the API to access

certain objects. 6) Step 2: Select Security Level. We recommend selecting “Admin Access Only” at first until you

are ready to roll the functionality out to all appropriate roles. If you select “Grant Access to All Users,” any user who logs in will be able to see Salesforce for Twitter and Facebook objects and tabs.

7) Step 3: Install Package. You are now ready to do the installation. Click Install.

Page 6: Salesforce for Twitter and Facebook - Setup Guide v4.6

© Copyright 2011 salesforce.com, inc. All rights reserved. Salesforce for Twitter and Facebook, V4 – Page 5

8) You will see the following message. This means the installation is in progress. You will receive an email notification once it is completed.

9) Deploying the package. Unless you set the package to “deployed,” only Sysem Administrators

will be able to use Salesforce for Twitter and Facebook. To set the package to “Deployed,”

10) Select the “Salesforce for Twitter and Facebook” app from the Force.com apps picklist in the upper right hand corner. You should see a new set of tabs including the Twitter Conversations, Twitter Searches, and Twitter Accounts tabs.

11) Enable the Salesforce for Twitter and Facebook application: Navigate to the “Salesforce Social” tab, and click the “Setup” link. Click “Save.”

Salesforce for Twitter and Facebook is now installed in your org! To Begin: Get started by authorizing a Facebook Fan Page or Twitter Account, by creating a Twitter Search, and by automating searches in your org. You can further customize the application by adding buttons, links, and images to your layouts and related lists, and by setting permissions.

Page 7: Salesforce for Twitter and Facebook - Setup Guide v4.6

© Copyright 2011 salesforce.com, inc. All rights reserved. Salesforce for Twitter and Facebook, V4 – Page 6

The Setup Page To access the Salesforce for Twitter and Facebook Setup page, click on “Setup” from the “Salesforce Social” tab. Before using the application, you must navigate to this page, and click the “Save” button.

Authorizing a Bit.ly account In version 4, you only need to add a bit.ly name and API key once, instead of for each Twitter Account. To add a Bit.ly account in version 4, simply navigate to the “Salesforce Social” tab, and click on the “Setup” link. Then edit, and add your bit.ly username and API key.

Adding a Knowledge Base URL This field allows you to enter a baseURL for your Knowledge Articles. To learn more about enabling Knowledge in your org, visit the section titled “Set up Knowledge Integration”

Setting up Twitter Accounts, Facebook Fan Pages, and Twitter Searches Authorizing Your Facebook Fan Page(s) Beginning with release 4.6.2, the process for Granting Access in Salesforce for a Facebook Fan Page has changed, including a new user friendly User Interface. With this update Salesforce now only performs authorization for pages using the Admin User for the Fan Page, not the Facebook Page Admin like prior releases.

Admin User: Uses a standard Facebook user account with Administrator privileges to maintain the Facebook Page. This is a new required step as of release 4.6.2 release.

Page Admin: This is the person whom created the Facebook Fan Page.

Before setting up a Facebook Fan Page in Salesforce.com, you must have both active Facebook User account and Facebook Fan Page. The new process involves a linkage between the two accounts. To create a new Facebook Fan Page go to facebook.com and clicking the “Create a Page” link. Once you have an active Facebook Fan Page, you can authorize it in Salesforce.com. NOTE: You can only authorize a Facebook Fan Page Administrator in order to authorize any pages that user owns, or administrates. You cannot pull in posts from a Facebook User’s fan page. TIP: When setting up the first time, it is recommended to use two separate browsers, as you will be switching back and forth between Page Admin and Admin User.

Page 8: Salesforce for Twitter and Facebook - Setup Guide v4.6

© Copyright 2011 salesforce.com, inc. All rights reserved. Salesforce for Twitter and Facebook, V4 – Page 7

Setting up your Facebook Fan Page for Oauth All steps below are required for successfully performing the “Grant Facebook Access”

1. Identify an existing Facebook user, or create a new Facebook user ([email protected]) that will be used to associate to the Facebook Page (aka Fan Page). This will be known as the User Admin going forward.

2. Create, or login to a Facebook Page as the Page Admin. 3. Navigate to the desired Facebook Page as the User Admin and “Like” the page 4. If you’re not already logged in, login as this Facebook Page Admin

a. Select Manage > Settings b. Select Manage Admins

c. Input the name or email of the User Admin d. At the password prompt, enter the password for the Facebook Page Admin to confirm

that the user being associated is authorized to access e. A notification will be sent with the subject “<Page Admin email> made you an

administrator of the Page <Facebook Fan Page name>” 5. In Salesforce, add the User Admin (Step 1) in Social Setup

a. Click on the Facebook link

Page 9: Salesforce for Twitter and Facebook - Setup Guide v4.6

© Copyright 2011 salesforce.com, inc. All rights reserved. Salesforce for Twitter and Facebook, V4 – Page 8

b. Select the New button

c. Enter the name of the User Admin > Save

i. NOTE: The name of the user in Salesforce must exactly match the name of the User Admin in Facebook.

d. Click into the name just created e. Click the button “Grant Facebook Access” f. You will be navigated to a Facebook Login screen

i. Login with your User Admin credentials g. You will be prompted to Allow access

Page 10: Salesforce for Twitter and Facebook - Setup Guide v4.6

© Copyright 2011 salesforce.com, inc. All rights reserved. Salesforce for Twitter and Facebook, V4 – Page 9

h. This will forward to a Manage Facebook Pages within

Salesforce

i. Check the box next to the page then click the Add button j. At this point the Facebook integration has been successfully validated, as evidenced

by the following: Facebook User Detail & Facebook setup page that shows both the Facebook Page & User validation check.

Page 11: Salesforce for Twitter and Facebook - Setup Guide v4.6

© Copyright 2011 salesforce.com, inc. All rights reserved. Salesforce for Twitter and Facebook, V4 – Page 10

k. To collect social searches refer to the section, Running Twitter and Facebook Fan

Page Searches Customize The fields on the Facebook Fan Page allow you to control your interactions with this Facebook Fan

Page 12: Salesforce for Twitter and Facebook - Setup Guide v4.6

© Copyright 2011 salesforce.com, inc. All rights reserved. Salesforce for Twitter and Facebook, V4 – Page 11

Page in your Salesforce org. You can fill them in now, or save and authorize, and return to customize them later.

1) Unknown Users: Create a new Contact, Lead, or Person Account for each new Post or Comment, if we don’t already have one for that Facebook User.

2) Run Case Association Logic: This will create a Case for the original Conversation created by each new Post on Facebook, and associate that Conversation, and any subsequent Conversations associated with Comments (replies to the first Post), to the Case.

3) Add Posts with #ch to Chatter – posts by the Facebook Fan Page, containing #ch, will be posted to the Chatter feed of the owner of the Fan Page record in Salesforce.

Other Facebook Considerations Facebook will occasionally require a Fan Page’s OAUTH be reset. When this happens, you will see an error when trying to send messages to or retrieve messages from Facebook. If this happens, you can follow these steps to reset your authorization.

- Navigate to the Fan Page in Salesforce, and click “Revoke Facebook Access” - Navigate to the User Admin in Salesforce, and click “Revoke Facebook Access”

a. Now, authorize the User Admin in Salesforce as above. You will see the page is already selected when you’re shown the list of Fan Pages. Click to continue, and you will be reauthorized.

Note: To deauthorize a user, simply navigate to the Facebook User, and click “Revoke Facebook Access.” This will revoke the Users’ authorization, but will not revoke authorization for any validated fan pages

Authorizing your Twitter Account(s) Before setting up a Twitter Account in Salesforce.com, you must be sure that you have an active Twitter username. You can create a new Twitter username by going to twitter.com/signup. Once you have an active Twitter username, you can create a Twitter Account in Salesforce. Setting up a Twitter Account You can authorize as many Twitter Accounts in Salesforce.com as are necessary. You can only authorize a Twitter Account once per org.

1) Create: Navigate to the “Twitter Accounts” tab and click the “New” Button Enter the required fields (see example image):

a. Name: provide a logical name for your Twitter login (ex: “Cirrus Help”)

Page 13: Salesforce for Twitter and Facebook - Setup Guide v4.6

© Copyright 2011 salesforce.com, inc. All rights reserved. Salesforce for Twitter and Facebook, V4 – Page 12

b. Username: The Twitter username for this login. (if your username is @cirrus_help, enter cirrus_help in the Username field)

c. Password: Twitter has deprecated user/password in favor of the more secure OAuth protocol. Salesforce for Twitter and Facebook automatically fills in this field with a ‘deprecated’ message; Do not enter anything in this field.

d. Click Save

2) Customize: The fields on the Twitter Account allow you to control your interactions with this Twitter Account in your Salesforce org. You can fill them in now, or save and authorize, and return to customize them later.

a. Enable Auto-Case Creation: Automatically create Cases for @mentions to this Twitter Account, if there isn’t already a Case, and if this @mention isn’t already associated to another Case.

b. Apply Case Association Logic to Tweets: Use threading logic. c. Time to Keep Assoc. After Case Close: After closing a Case, how long should we

continue to associate new conversations to this record? Set to 0 (minutes) if none. d. Only Associate Matching Usernames: This will prevent Tweets from being

automatically associated to cases that are not originated by the Tweet's Author e. Unknown Twitter Usernames: Create a new Contact/Lead/Person Account if there

isn’t already one associated with this username. f. Get Max Tweets Incl. Previous Results: When searching for tweets previous results

are filtered out from the new results, by turning this option 'On' the search will bring all results up to the maximum allowed by twitter.

g. Post Tweets with #ch to Chatter: Tweets by this Account, containing “#ch” will be automatically posted to the Chatter feed of the Salesforce User set as the “Owner” of this Account in Salesforce (see the Owner field on the Account record)

3) Authorize:

a. Click “Grant Twitter Access.” This will take you to a Twitter-generated login page. b. Log in with the correct Twitter Account’s name and password. This will log you into

Twitter.com and prompt Twitter.com to provide Salesforce for Twitter and Facebook with an authentication token. Note: If you are logged in as another Twitter user, you will need to click “Sign Out” before entering your name and password.

c. You will be redirected to Salesforce. Congratulations! Your Twitter Account is now OAuthed, and you can access Twitter securely from Salesforce.com.

Page 14: Salesforce for Twitter and Facebook - Setup Guide v4.6

© Copyright 2011 salesforce.com, inc. All rights reserved. Salesforce for Twitter and Facebook, V4 – Page 13

Twitter Searches When a Twitter search is executed, it will create a Twitter Conversation record for each Tweet matching the selected search terms. The application will attempt to link the Twitter Conversation (the tweet) to an existing Contact or Lead – in that order – by matching the username of the Tweet to the Twitter Username field on a Contact or Lead. If the application is unable to find a matching Contact or Lead for the incoming tweet, it will follow the selection of the “Unknown Twitter username” field.

Creating Twitter Searches

1) Research: Visit http://search.Twitter.com and test your search phrase to be sure it returns relevant results. You may need to edit your searches several times to obtain the most focused results, and to exclude any irrelevant ones . Visit the Twitter Search Operators page (also linked from the Salesforce for Twitter and Facebook homepage) for detailed information on creating Twitter searches. For example: in the image below we are searching for tweets mentioning the fictional company Universal Telco with a negative sentiment – denoted by this symbol: “ :( “

Copy your search phrase (highlighted above) into your clipboard.

2) Create: From the Salesforce for Twitter and Facebook homepage, click “Create new Searches.”

Page 15: Salesforce for Twitter and Facebook - Setup Guide v4.6

© Copyright 2011 salesforce.com, inc. All rights reserved. Salesforce for Twitter and Facebook, V4 – Page 14

a. Click the “New” button to create a new Twitter Search.

3) Customize: Set the following fields: a. Twitter Search Name: Choose a descriptive name (i.e. “Telco Negative Sentiment”) b. Twitter Keyword Search: Your search phrase. Input your copied text (from step 2). c. Unknown Twitter Usernames: This picklist directs the application to automatically

create Leads, create Contacts, or do nothing – based on your Twitter Search results. The choices will affect your incoming tweets as following:

i. Do nothing: If the Twitter Username on an incoming Tweet does not match the Twitter Username field on an existing contact or lead, Salesforce for Twitter and Facebook will only create a Twitter Conversation. No further action will be taken.

ii. Create Contact: If the Twitter Username on an incoming Tweet does not match the Twitter Username field on an existing contact or lead, Salesforce for Twitter and Facebook will create a new Contact and associate the Twitter Conversation to this Contact.

iii. Create Lead: If the Twitter Username on an incoming Tweet does not match the Twitter Username field on an existing contact or lead, Salesforce for Twitter and Facebook will create a new Lead and associate the Twitter Conversation to this Lead.

d. Order: Specify the relative importance of this search to other search term, starting with 1 as the Search of highest importance. Order is used to determine which Search

Page 16: Salesforce for Twitter and Facebook - Setup Guide v4.6

© Copyright 2011 salesforce.com, inc. All rights reserved. Salesforce for Twitter and Facebook, V4 – Page 15

to associate Twitter Conversation to, when an incoming tweet matches multiple search terms.

e. Campaign: You may leave this field blank. If you add the name of an existing, active Campaign, any Contacts or Leads created by this search will be automatically associated with the Campaign. A Contact or Lead can only be associated with one Campaign. If a Previous Twitter Search has already associated this Contact or Lead with a Campaign, a new Search will not associate it with a different Campaign. Note:

i. If you do not see the Campaign field on your Twitter Search, you may need to add the Campaign lookup to your Twitter Searches Page Layout

ii. You must choose “Create Contact” or “Create Lead” in the Unknown Twitter Usernames picklist to use this feature.

iii. The Twitter Search will be automatically deactivated if the Campaign it is associated to is deleted or otherwise inactivated. You will need to remove the Campaign from the Twitter Search lookup before activating the Search again. Note:

f. Active: If this field is checked, you can execute this search. If it is unchecked, it cannot be selected for searching, and will not be run by automated polling.

g. Owner: The owner of the search. All search results for this search will be assigned to the owner of the Twitter search record. You can make a Queue the Search Owner.

h. Get max tweets incl. previous results: When searching for tweets, previous results are automatically filtered out. By checking this box, you will direct Salesforce for Twitter and Facebook to automatically bring in all search results, up to the limit allowed by Twitter. This feature is only required for high-volume users, and should be left unchecked for most installations.

4) Save: Click “Save” You can now schedule and execute this Twitter Search. See “Automating Searches” to learn how to automatically execute your searches.

Page 17: Salesforce for Twitter and Facebook - Setup Guide v4.6

© Copyright 2011 salesforce.com, inc. All rights reserved. Salesforce for Twitter and Facebook, V4 – Page 16

Running Twitter and Facebook Fan Page Searches You can run your searches manually, or have Salesforce.com search Twitter and your Facebook Fan Page, automatically bringing in your results.

Manual Searches The following steps explain the process for manually executing Twitter and Facebook Fan Page Searches. You can also automatically run your Searches at intervals of 10 minutes or greater. See “Automating Searches” for more information. To manually execute a Twitter Search:

1) Navigate to the Salesforce for Twitter and Facebook homepage and click “Get Conversations”

2) On the “Get Conversations” page, select the searches to run

3) Click “Run Selected Search(es)” 4) Your results will be displayed by

channel, and overall.

5) To view more details, navigate to the Twitter Conversations tab.

If you would like to run a scheduled job to execute all searches, we have provided an Apex wrapper class. It will allow you to programmatically execute Twitter Sarches from tools such as Boomi or the Kronkit AppExchange Package.

Page 18: Salesforce for Twitter and Facebook - Setup Guide v4.6

© Copyright 2011 salesforce.com, inc. All rights reserved. Salesforce for Twitter and Facebook, V4 – Page 17

Automating Searches Salesforce for Twitter and Facebook version 2 allows you to schedule your Twitter Searches to run automatically at specified times. This allows you to control the flow of new Tweets, Contacts, and Leads into your salesforce.com CRM, making it easier for your representatives or support agents to handle Tweets in a timely and effective manner. To schedule an automated Twitter Search:

1. Navigate to the Salesforce for Twitter and Facebook homepage and click on the “Scheduled Searches” link. You will be redirected to the Scheduled searches page (below).

o All Active Twitter Accounts and Twitter Searches automatically appear on this list. If you automate a search, you can still run it manually, as often as required.

o If you do not explicitly schedule a Twitter Search, it will not be executed unless you run it manually.

o For more on manual searches, see “Manually Executing Twitter Searches.”

2. Click on the “Time Interval” dropdown to the right of the search and select your desired time interval. You can select a granularity of up to 15 minutes.

o Scheduled Searches are run using scheduled Apex jobs. By default, each Salesforce org contains 10 Scheduled Apex jobs per AppExchange application. The number of

Page 19: Salesforce for Twitter and Facebook - Setup Guide v4.6

© Copyright 2011 salesforce.com, inc. All rights reserved. Salesforce for Twitter and Facebook, V4 – Page 18

Apex Jobs a search uses is based on the search frequency. The “Requests Used” column displays the number of jobs used by each Scheduled Search.

3. You can also choose to Delete Ignored Tweets (Twitter Conversations with Status = “Ignored”) o Tweets are set to “Ignored” by clicking the “Ignore” button on the Conversation’s

detail page. You can add this button by editing the Conversation’s layout. Note: If you require your searches to run more often, you will need to create a custom Visualforce page using an Apex Wrapper class. For more information on creating custom searches, see “Using an Apex Wrapper Class to Automate Twitter Searches”.

Using an Apex Wrapper Class to Automate Twitter Searches For more granular scheduling or to automate more accounts or searches you can setup an external schedule to call an apex class in the Salesforce for Twitter and Facebook package. You can then programmatically execute searches from your own scheduling service or use tools such as Boomi or the Kronkit AppExchange Package. The name of the Apex wrapper class is called “AutomationWrapper”.

The automation wrapper has two methods for getting new tweets. Getting Tweets from Twitter Accounts: Integer doGlobalSearchAccount (Id taId, Integer Page)

Returns: Integer : Next page to be queried if any, or 0 if no more pages are available. Params:

taId: ID of the Account to be searched for DM’s, Replies and Statuses Integer: Page number to be queried.

Getting Tweets from Twitter Searches: Integer doGlobalSearchKeyword (Id tsId, Integer Page)

Returns: Integer : Next page to be queried if any, or 0 if no more pages are available. Params:

tsId: ID of the Search Keyword to be searched for matches Integer: Page number to be queried.

To search all pages these methods must be called until they return 0. This means it will have reached the end of the results.

Page 20: Salesforce for Twitter and Facebook - Setup Guide v4.6

© Copyright 2011 salesforce.com, inc. All rights reserved. Salesforce for Twitter and Facebook, V4 – Page 19

To find out how many records where created , you can query the results object: public class Result {

public Integer casesCreated public Integer caseCommentsCreated public Integer contactsCreated public Integer leadsCreated public Integer conversationsCreated public String xml

}

Page 21: Salesforce for Twitter and Facebook - Setup Guide v4.6

© Copyright 2011 salesforce.com, inc. All rights reserved. Salesforce for Twitter and Facebook, V4 – Page 20

The Salesforce for Twitter and Facebook Homepage From the Salesforce for Twitter and Facebook homepage, you can easily access the rest of the application, including the Setup Guide, the Twitter Scheduling center, and the Troubleshooting Log. You can also Tweet directly from this page.

From the “What’s happening?” field, you can send a Tweet directly to Twitter.com, and it will be displayed on the Twitter feed of the user set to “Send Tweet As” – and/or on the selected Facebook Fan Page. You can send tweets from this text field as any Twitter Account or Facebook Fan Page to which your Salesforce user has access.

Page 22: Salesforce for Twitter and Facebook - Setup Guide v4.6

© Copyright 2011 salesforce.com, inc. All rights reserved. Salesforce for Twitter and Facebook, V4 – Page 21

Sidebar Links The links on the left hand side of the Salesforce for Twitter and Facebook homepage link to the objects and functionality comprising the Salesforce for Twitter and Facebook application.

Manage Twitter Accounts: Click on this ink to view and manage your Twitter Accounts. The Twitter Account object is a Salesforce for Twitter and Facebook object that stores the Twitter Login credentials you will use to execute Twitter searches and send tweets from Salesforce.com. It can also be used to store your bit.ly login credentials.

Create New Searches: Click on this link to view and manage your Twitter Searches. The Twitter Search object is used to define search terms for keywords you are monitoring on Twitter. For example, you might define a “Competitors” Twitter Search containing the names of your primary competitors. When you execute this Twitter Search, the results of the search will be stored as Twitter Conversation objects. The Twitter Conversation object stores Tweets which have been brought into your Salesforce org as the results of Twitter Searches. It also stores the results of @Replies and Direct Messages to your Twitter Account or Accounts. Additionally, if you Tweet directly from the Twitter.com website using a Twitter Account stored in salesforce.com, Salesforce for Twitter and Facebook will pull in those tweets so you have a complete history of your Tweets in Salesforce.com.

Schedule Searches: Click on this link to set up automated searches in your org. Automated searches are discussed in further detail in the section titled “Automating Searches.”

Get Tweets: Click on this link to manually run any saved searches, or to search for @Replies and @Mentions to any saved Twitter Account. Manual searches are discussed in further detail in the section titled “Manually Executing Twitter Searches.”

Review Setup Guide: Click on this link to access a copy of this setup guide.

Dashboard & Analytics: Click on this link to view a set of predefined Dashboards and Analytics related to the Salesforce for Twitter and Facebook application. You can edit these reports or create new reports related to your Salesforce for Twitter and Facebook usage, as necessary. For more information on Dashboards, Reports, and Analytics in Salesforce.com, see the “Help & Training” link at the top right hand of any Salesforce page.

Troubleshooting Log: The troubleshooting log contains a record of all manual and automated searches that were run in Salesforce for Twitter and Facebook, with a list of the number of records created as a result of each search, by type. It will also display any resulting errors. Note: To see the Troubleshooting Log link, your Salesforce user profile must have “Read” and

Page 23: Salesforce for Twitter and Facebook - Setup Guide v4.6

© Copyright 2011 salesforce.com, inc. All rights reserved. Salesforce for Twitter and Facebook, V4 – Page 22

“Write” Permissions on the “Documents” object.

Twitter Performance status: Click here to view a Twitter-generated page displaying Twitter’s current performance status worldwide.

Twitter search operators: Click here to learn more about creating and editing Twitter searches to obtain your desired results.

The Social Agent Page The Salesforce for Twitter and Facebook Agent page is a limited version of the main administrator tab (“Salesforce Social”). The Agent tab is not added to the application by default, and will need to be added to a tabset manually. This tab only allows outbound messages, and does not contain links to Setup, Get More Conversations, etc.

Restricting Access to the Social Agent Page You can restrict or allow access to Visualforce pages and tabs on a per-profile basis. If you want your agents to be able to send messages, but do not want them to easily access the setup page, troubleshooting logs, etc, simply remove the “Salesforce Social” tab from their user profile, and ensure they’ve been granted access to the Agent Page. To entirely restrict access, navigate to their profile (“Standard User” etc) and remove access to the “Saelsforce Social” page.

Page 24: Salesforce for Twitter and Facebook - Setup Guide v4.6

© Copyright 2011 salesforce.com, inc. All rights reserved. Salesforce for Twitter and Facebook, V4 – Page 23

Auto-Associate Twitter Contacts or Leads to a Campaign With Salesforce for Twitter and Facebook, you can now automatically add Cases or Leads created by a search to any ongoing Campaign. Once you set the Campaign on the Twitter Search record, any new Contacts or Leads found by this search will be associated with the selected campaign, whether your search is run automatically or manually. To activate this feature:

1. Create a Search on the Twitter Search tab, or use an existing search. 2. Select 'Create Contact' or 'Create Lead' in the 'Unknown Twitter Username' dropdown.

Your search will not create new Contacts (or Leads) without this selection. 3. On the Twitter Search record, fill in the "Campaign" field with any existing, active Campaign. 4. Once you've added a Campaign, to your Twitter Search, click Save. From this point on, any

Cases or Leads created by this search will be associated with this Campaign. To stop auto-associating Contacts or Leads to a Campaign: Simply edit your Twitter Search and clear the Campaign field. All previously associated Contacts or Leads will remain associated to the Campaign, but new Contacts or Leads found by this search will not be associated. Note:

You must choose “Create Contact” or “Create Lead” in the Unknown Twitter Usernames picklist to use this feature.

If you do not see the Campaign field on your Twitter Search, you may need to add the Campaign lookup to your Twitter Searches Page Layout

If you have associated a Campaign to a Twitter Search, the Twitter Search will be automatically deactivated if the associated Campaign is deleted or otherwise inactivated. You will need to remove the Campaign from the Twitter Search lookup before reactivating the Search.

Page 25: Salesforce for Twitter and Facebook - Setup Guide v4.6

© Copyright 2011 salesforce.com, inc. All rights reserved. Salesforce for Twitter and Facebook, V4 – Page 24

Finding a Contact’s Twitter Username The Find Twitter Username feature allows you to search Twitter for a Contact or Lead's Twitter Username, and add that Username to the record - all without leaving Salesforce. You will then be able to import any public information on that Twitter Username into your Lead or Contact. To add this functionality to Leads or Contacts

o Go to any Contact or Lead record, and click on the "Edit Layout" button at the top right of the detail page.

o Go to the "Buttons" section, and add the "Get Twitter Username" button to the layout. If you haven't already done so, you may also add the "Get Author Info" button at this time.

o Click "Save" to return to the record.

To import a Twitter Username: o Click "Get Twitter Username" at the top of the record.

o You will now see a Search page with a list of Twitter Search results for this Lead or Contact's name. T

o The default Search is based only on the first and last name of the Contact or Lead. You may modify your search to view different results; searching here will not affect the original record.

o When you locate the correct Twitter Username, simply click the "Link" button to add the Twitter Username to your Contact or Lead in the "Twitter Username" field. The page will refresh, and the username will now be appended to the record.

Notes:

o You can only link Twitter accounts to Contacts or Leads that are not already associated to existing Twitter accounts.

o If you do not see the "Twitter Username" field, simply click on the "Edit Layout" button at the top right of the detail page, go to the "Fields" section, and add the "Twitter Username" button to the layout.

o If you see this error after clicking "Find Twitter Username": An error occurred while retrieving the information for the following Twitter user: (yourUser ): You may not have your Remote Sites configured correctly. See the “Adding Remote Sites” section. Note that version 1 used “http” for all Remote Sites, while version 2 uses “https.”

o If you receive a message about difficulty connecting to Twitter, Twitter may be experiencing a temporary downtime.

Page 26: Salesforce for Twitter and Facebook - Setup Guide v4.6

© Copyright 2011 salesforce.com, inc. All rights reserved. Salesforce for Twitter and Facebook, V4 – Page 25

Get Author Info

Updating a Twitter Conversation using Get Author Info

When a conversation is updated by clicking "Get Author Info," the Contact or Lead associated with the conversation is also updated. The following fields are updated on the parent Contact or lead.

o Image__c – the user’s Twitter image o User_Bio__c – the Contact or Lead’s Twitter User description o Twitter_Location__c – The user’s Twitter Location information. o Follower_Count__c – this user’s number of Twitter followers o Following_Count__c – the total number of Twitter Accounts this user is following. o User_Status_count__c – this user’s total status updates (Tweets) o User_Creation_Date__c – the creation date of this Twitter username. o Author_Real_Name__c – this user’s first name and last name as recorded in Twitter o Author_URL__c – this Twitter user’s website o User_Last_tweet__c –date of the last tweet saved. This will be modified if it is

greater than or equal to the date of the last tweet saved.

Updating a Twitter Contact or Lead using Get Author Info

When ‘Get Author Info’ is clicked on a contact or lead, only the Contact or Lead will be updated. To preserve a clear timeline, the child Conversations will not be updated. These fields are updated on a Contact or Lead when you click the “Get Author Info” button:

o Twitter_Bio__c – the Contact or Lead’s Twitter User description o Twitter_Creation_Date__c – the creation date of this Twitter username. o Twitter_Follower_Count__c – this user’s number of Twitter followers o Twitter_Following_Count__c – the total number of followed Twitter Accounts o Twitter_Location__c – The user’s Twitter Location information. o Twitter_Status_Count__c – this user’s total status updates (Tweets) o Twitter_Last_Tweet__c –date of the last tweet saved

Page 27: Salesforce for Twitter and Facebook - Setup Guide v4.6

© Copyright 2011 salesforce.com, inc. All rights reserved. Salesforce for Twitter and Facebook, V4 – Page 26

Adding Conversations to your Case Layout

You can now reply directly to Conversations - or simply send an outbound reply - from a Case or Account. To use this feature:

Add the Conversations Related List to the Account, Case, Lead or Contact: o Go to the Account layout, either by going to Setup > Accounts > Page Layouts, or by

drilling into any Account record and clicking the "Edit Layout" link at the top right hand of the screen.

o Go to the Related Lists section, and drag the "Conversations" related list into the layout.

Add the "Reply" button to the Conversations related list: o On the Conversations related list in the Account Page Layout Setup view, click on the

wrench icon. o Go to the "Buttons" section o Select "Reply" and click to add it to the Selected Buttons section o Click OK

Save your changes to the Account layout: Click "Save" at the top left hand of the Account

Page Layout Setup view. You should now see the "Reply" button at the top of the Conversations related list. Clicking here at any time will pop up the “Reply” page. From this page, you will be able to edit and send outbound messages.

Page 28: Salesforce for Twitter and Facebook - Setup Guide v4.6

© Copyright 2011 salesforce.com, inc. All rights reserved. Salesforce for Twitter and Facebook, V4 – Page 27

Setting up Knowledge Integration With Salesforce for Twitter and Facebook v4 you can answer Twitter and Facebook questions with links to Articles in your Salesforce Knowledge base. By answering questions with Knowledge Base link, you improve your customer service response times and leave your agents time to solve the most challenging issues. This is more cost-effective while providing a higher level of customer support and ultimately, customer satisfaction. Salesforce Knowledge To reply to Tweets or Facebook Fan Page posts with links to Knowledge Articles, you first need to have Knowledge set up in your Salesforce org. Click here for more information on Salesforce Knowledge, or simply search for “Knowledge” in the Help & Training guide in your Salesforce org. When setting up Knowledge, be sure your Social Agents are using Knowledge licenses, and be sure to add the Articles Related List to your Case Layout.

You will also need to be publishing Knowledge Articles to your public Knowledge base. You can install this Force.com Labs application to quickly and easily publish your Articles to a customizable public Site. Set up bit.ly Most Knowledge Sites will have a fairly long BaseURL. (http://www.yourKnowledgeSite.com/Your_Article_title...). To conserve space in your Tweets, you’ll want to automatically shorten Article URLs . To do this, you need to set up Bit.ly integration in your org.

1. Go to your bit.ly account (or sign up, if you don’t have one) and get your API key:

Page 29: Salesforce for Twitter and Facebook - Setup Guide v4.6

© Copyright 2011 salesforce.com, inc. All rights reserved. Salesforce for Twitter and Facebook, V4 – Page 28

2. Go the Setup page and fill in the bit.ly username and API Key fields.

Set up your Knowledge Base URL

1. Navigate to the Salesforce for Twitter and Facebook tab and click the “Setup” link on the right-hand side of the page

2. On the setup page, click Edit, and then enter the Base URL of your Salesforce Knowledge site. It should look something like this: http://www.yourKnowledgeSite.com - Do not enter a trailing slash. - Do not enter the Article type (“Article,” “FAQ,” etc) - this will be added to the URL automatically by the application. - If your Knowledge base is stored in a separate section on your main site (“mySite.com/knowledgeBase”) be sure you enter that in the Base URL as well.

3. Click Save Attach an Article to a Case

1. Navigate to a Case created by an inbound Tweet or Facebook Fan Page, and click the “Find Articles” button on the Articles related list.

Page 30: Salesforce for Twitter and Facebook - Setup Guide v4.6

© Copyright 2011 salesforce.com, inc. All rights reserved. Salesforce for Twitter and Facebook, V4 – Page 29

2. On the Find Articles for Case screen (image below), select the appropriate Article. You can also filter or search if the correct Article is not automatically displayed.

3. Select “Attach and Go to Case” - or simply “Attach to Case” if you want to continue attaching Articles.

Reply using Salesforce Knowledge

1. Back on the Case, click the “Reply” button on the Conversations Related List to reply to the Conversation attached to this Case).

2. On the Reply page, you will now see a new section and dropdown. Only Articles available in your Public Knowledge Base will appear in this dropdown. Articles private to your internal users, or visible only in Portals will not.

Page 31: Salesforce for Twitter and Facebook - Setup Guide v4.6

© Copyright 2011 salesforce.com, inc. All rights reserved. Salesforce for Twitter and Facebook, V4 – Page 30

3. Select the Article you want to forward. The link will be automatically shortened, and the title of the Article and shortened URL will be appended to the text field.

4. Click Send. You’re now using Knowledge to respond to customers in Twitter and Facebook.

Page 32: Salesforce for Twitter and Facebook - Setup Guide v4.6

© Copyright 2011 salesforce.com, inc. All rights reserved. Salesforce for Twitter and Facebook, V4 – Page 31

Automatic Agent Signatures Salesforce for Twitter v4 uses Merge Templates to make messages available with just one click - complete with author names, signatures, or any other available field. Here’s how:

1. Ensure you have downloaded and installed the latest version of Salesforce for Twitter from the AppExchange.

2. Add a “Social Signature” page to the User object: a. Go to Setup > App Setup > Customize > Users > Fields and add a new User Custom Field

of type Text.

b. Name it something like “Social Signature.” The field can be any length.

Page 33: Salesforce for Twitter and Facebook - Setup Guide v4.6

© Copyright 2011 salesforce.com, inc. All rights reserved. Salesforce for Twitter and Facebook, V4 – Page 32

c. Click save. You should now see a line like this under User Custom Fields

d. Go to any Agent’s User profile (Setup > Administration Setup > Users) and add a value in the Social Signature field:

3. Set up the Merge Template. a. Go to Setup > Personal Setup > Email > My Templates and select the “Salesforce for

Twitter and Facebook” folder

Page 34: Salesforce for Twitter and Facebook - Setup Guide v4.6

© Copyright 2011 salesforce.com, inc. All rights reserved. Salesforce for Twitter and Facebook, V4 – Page 33

b. Click to create a new template of type “Text”

c. Your new “Social Signature” field can be found under “Sending User” / “Custom Fields” - just copy/paste the Merge Field Value into your field.

d. Be sure you set this template to “Available For Use”

Page 35: Salesforce for Twitter and Facebook - Setup Guide v4.6

© Copyright 2011 salesforce.com, inc. All rights reserved. Salesforce for Twitter and Facebook, V4 – Page 34

4. Go to a Case generated by Twitter - or simply to a Twitter Conversation you’ve brought into Salesforce, and click to Send a Tweet - or simply go to the homepage.

5. Select the Template (by name), and click “Insert.” The signature will be unique for each Agent, but your messaging will remain consistent across all Agents.

Page 36: Salesforce for Twitter and Facebook - Setup Guide v4.6

© Copyright 2011 salesforce.com, inc. All rights reserved. Salesforce for Twitter and Facebook, V4 – Page 35

Enabling Salesforce for Twitter and Facebook for non-Administrator Profiles While installing the Salesforce for Twitter and Facebook AppExchange application, you may choose to make the application available to Administrators only, or to all profiles. In general, it’s better to begin with Administrator access only, and then extend functionality to other user profiles as necessary. To enable access to Salesforce for Twitter and Facebook for non-administrator profiles:

1) Navigate to Setup | Administration Setup | Profiles

2) Edit one of the profiles that need access to the Salesforce for Twitter and Facebook application.

3) In the “Custom Apps Settings”, select the “Salesforce for Twitter and Facebook” app as visible.

4) Under Custom Tab settings, set the default tab settings for the Twitter Conversation, Twitter

Account, and Twitter Search objects to “Default On”

5) Set the Profile Custom Object Permissions to Read, Create, Edit, and Delete (optional) for the

Twitter Accounts, Twitter Conversations, and Twitter Searches objects.

Page 37: Salesforce for Twitter and Facebook - Setup Guide v4.6

© Copyright 2011 salesforce.com, inc. All rights reserved. Salesforce for Twitter and Facebook, V4 – Page 36

6) Save your changes to the profile.

7) Scroll down to the “Enabled Visualforce Page Access” Related List on the profile

8) Click Edit and add all pages beginning with “Twitter” to the Enabled Visualforce Pages section.

9) Repeat steps 2 to 8 for each profile you want to grant access to the Salesforce for Twitter and

Facebook application.

Page 38: Salesforce for Twitter and Facebook - Setup Guide v4.6

© Copyright 2011 salesforce.com, inc. All rights reserved. Salesforce for Twitter and Facebook, V4 – Page 37

Twitter Contributors Twitter Contributors is a new Twitter feature which allows multiple users to contribute tweets to a single Twitter feed. This allows you to personalize Tweets. Contributed tweets will appear on the main Twitter feed (in this case, @SalesforceApp), and will be personalized as by a particular user – in this case, the tweet was contributed by @LNIngram.

1) Enable Contributors on twitter.com: You need to set up this feature on Twitter before you can enable or use Contributors in Salesforce for Twitter and Facebook. You may need to contact Twitter to have this feature enabled for your Twitter username. Once Twitter has enabled Contributors for your account, you will see an additional “Business” link in your Settings screen. Select Contributors, and add any account as a Contributor.

Page 39: Salesforce for Twitter and Facebook - Setup Guide v4.6

© Copyright 2011 salesforce.com, inc. All rights reserved. Salesforce for Twitter and Facebook, V4 – Page 38

2) Enable Contributors for this Twitter Account in Salesforce: Edit the selected Twitter Account, and check the “Contributors Enabled” checkbox. Resave. Note: once you have checked this checkbox, you will be unable to see the Twitter Account in the Accounts dropdown on the Salesforce for Twitter and Facebook homepage until you enable the Contributing accounts.

3) Edit the Twitter Account page layout: Add the “Contributors” related list to the Twitter Account object. For more information on editing layouts, and on suggested layout selections and fields, see “Updating Page Layouts.”

4) Add Contributor Account: On the Contributors related list, click the “Add Contributor” button. You will see a popup requiring:

a. Username: The Twitter username (“SalesforceApp”) b. User: The user who will be Contributing to this account. Note that only this user will

be able to post tweets to the main feed as by this user. c. Tweet as Main Account: If this checkbox is checked, this Contributing user will also

be able to send tweets as the main Twitter Account – for example, as SalesforceApp as well as by a user.

5) Validate (OAuth) the Contributor Account: From either the Contributor’s detail page, or from the Related List on the Main Twitter Account, click “ Validate.

a. You will be taken to a Twitter-generated login page. Log in with the correct Twitter Account’s name and password. This will prompt Twitter.com to provide Salesforce for Twitter and Facebook with an authentication token. Note: If you are logged in as another Twitter user, you will need to click “Sign Out” before entering your name and password.

b. When you click “Allow,” you will be returned to a Salesforce login page. Log in again with your Salesforce login. Note: If you are in a sandbox, you will need to edit the URL from “login.salesforce.com…” to “test.salesforce.com…” and go to that URL before logging in again.

6) Edit the Contributor, and add an associated Salesforce User. The Contributor and the main account will not appear on the Salesforce for Twitter and Facebook homepage if you do not add a user. Once you have added a user, that user will only be able to tweet as this account – not as the main account, unless you also check “Tweet as Main Account” on the Contributor’s profile.

Note: Once you have added a Contributor account to a main account, only Contributors will be able to Tweet as the Main Account (if you’ve checked “Tweet as Main Account” on the Contributor itself. If you want to make the Main Account generally available to other users, you will need to add a separate Main Account, without Contributors.

Page 40: Salesforce for Twitter and Facebook - Setup Guide v4.6

© Copyright 2011 salesforce.com, inc. All rights reserved. Salesforce for Twitter and Facebook, V4 – Page 39

Languages and Translation Translation

Salesforce for Twitter and Facebook is available in all languages supported by Salesforce.com. Each user will see Salesforce for Twitter and Facebook in the language set on his or her user profile.

To change your User language:

1) Edit your user profile (available under Setup > My Personal Settings) 2) Change your language. You do not need to change your locale to view the application in

your language of choice. 3) Click Save, and return to Salesforce for Twitter and Facebook.

Supported Character Sets Salesforce for Twitter and Facebook supports all foreign language character sets in both incoming and outgoing Tweets – including Japanese, Hebrew, and all European character sets. Note: that if your browser or operating system does not support a specific character set, you will be unable to view that character set in Salesforce for Twitter and Facebook, or on Twitter.com.

Page 41: Salesforce for Twitter and Facebook - Setup Guide v4.6

© Copyright 2011 salesforce.com, inc. All rights reserved. Salesforce for Twitter and Facebook, V4 – Page 40

Changes and Updates Deprecated Fields

Twitter Account detail page: Password field o This field is required, and therefore must remain on the layout. However, we

recommend removing the password, and using OAuth instead (See above). We've added guidance text to the field. A user creating a new Twitter Account will be directed to the Help Text (explaining the change), and once you've OAuthed, the Password field will now contain explanatory text.

Twitter Conversation detail page: "Send Twitter Message" button o This button has been deprecated in favor of a similar button directly on the Tweets

related list. It will not appear in the layout for new installations. We recommend removing it from your layout if it remains in your Twitter Conversation detail page from a previous installation.

Bit.ly username/API Key: Moved to Setup o

Updated Salesforce API: Now 19.0 Salesforce for Twitter and Facebook is now using version 19.0 of the Salesforce API. If you have any Apex Classes extending current Salesforce for Twitter and Facebook functionality, be sure to update their API version to 19.0.

Page 42: Salesforce for Twitter and Facebook - Setup Guide v4.6

© Copyright 2011 salesforce.com, inc. All rights reserved. Salesforce for Twitter and Facebook, V4 – Page 41

Further Information About OAuth

OAuth is an Open Standard protocol allowing a user to grant a third party site (like Salesforce for Twitter and Facebook) access to their information stored with another service provider (Twitter), without sharing their password. By using OAuth, you grant Salesforce for Twitter and Facebook access to specific resources on your Twitter Account on Twitter.com (Tweets, Direct Messages and @mentions), without making your password visible on the Twitter Accounts page or storing it anywhere in Salesforce.com. You will need to complete OAuth for each Twitter Account and Facebook Fan Page you add to Salesforce.com.