Social influence Score as an Image (using Klout)

Social Image example in SalesforceI originally presented this in a session at Dreamforce 2012. Its a little application to allow you to view a users/customers social influence as an image based on their twitter handle/address. It uses Klout a social influence system and Klout scores are marked out of 100. The higher the score the more influential the person is.

My example showed how you could add the feature using a simple formula field in Salesforce, but at the end of the day its an image so can be added to more or less anything.

I used it to demonstrate how easy it is to show a customers social influence within Salesforce using just a simple formula field and how you could use their social score to rank support calls or identify who your most influential customers are for marketing etc.

To use it all you have to do is pass a couple of parameters into a url and the image will be returned eg:

Social Influence score

The URL is made up of the following parameters:

  • NetworkScreenName; The twitter handle/name you want the score for, so in my case this is: radnip
  • NetworkPlatform; The platform you want to use at the moment it only supports Twitter but the Klout API does support other networks including LinkedIn etc but at the time of writing it only supports twitter so this should be: twitter
  • KloutAPIId; This is your Klout API key which you can get from the Klout website at its free to register. But please note that your key will be potentially visible in the URL, for an internal CRM solution like Salesforce this usually is low risk but please be aware of the implications if someone else uses your Key!
  • (optional) monthChange; This allows you to see how the score has changed over the past month (eg: Social Influence with month change shows that the score has increased by 0.073 over the past month). Set this to equal 1 if you want to see the month change.

So your link should look something like this with the month Change:

or without the month change:

(WARNING: Do not copy the API key in the URL its just an example, it may look like it works but its an incorrect API key!).

The Social Image application runs on Heroku which is a massively scalable development platform. The scores are cached for up to 24hrs so if you see a slightly different score to Klout thats why, but if they are different they are usually only one point out. The reason its cached is so that the app doesn’t hammer the Klout APIs.

Using SocialImage in Salesforce:
To use the social Image in Salesforce you need to have two fields in Salesforce. One holding the twitter handle and the other as a formula field to hold the score. For example you could add the field on Salesforce Cases or Contact records, both work in the same way:

First create a field to store the twitter handle (in my case I called it ‘Twitter’ so the API name is ‘Twitter__c’, next create a TEXT formula field and add the following:

IMAGE(''+Twitter__c+'&NetworkPlatform=twitter&KloutAPIId=3abgffbxzyg7sufuvpjqajs8', '')

Again as above change the KloutAPIId to your API Id. You can then add the field to list views or reports. As the score is an image you won’t be able to order the column by the score as its an image. If you want better functionality check out the Salesforce Kred appExchange application.

That’s it, any questions please let me know!

  • How secure are your #Salesforce AppExchange Apps?

    If you work in a regulated industry like banking or even if you don’t, understanding the risk that your IT systems ...
  • The #IndiaDreamin adventure!

    In 2017 I was presenting at IndiaDreamin one of the largest Salesforce community events in the world. Check out my video of the journey!
  • How to start a career in Salesforce

    I get a lot of questions asking how to start a career in Salesforce. First off is you need to set ...
Load More By Francis Pindar
Load More In Development

Check Also

How secure are your #Salesforce AppExchange Apps?

If you work in a regulated industry like ...

Subscribe via Email

Enter your email address to subscribe and receive notifications of new posts by email.

My Latest YouTube Video

Upcoming Events

  1. London’s Calling 2019

    8 March @ 8:30 am - 8:00 pm

Follow me on Twitter

Currently reading

From Goodreads

  • Book cover

    Your Baby Week By Week: The ultimate guide to caring for your new baby

    Caroline Fertleman

  • Book cover

    How to Bake

    Paul Hollywood

  • Book cover

    Saving Bletchley Park: How #socialmedia saved the home of the WWII codebreakers

    Sue Black