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!

  • New Salesforce News Podcast!

    So Anup and I have decided to create a new Salesforce podcast called the ‘Salesforce Posse Podcast’. We’ve just launched our ...
  • O Trailhead, myTrailhead! A reply…

    So Salesforce has just announced pricing for myTrailhead at $25/user/month but only as an add-on to a Salesforce Enterprise license so ...
  • My Tools & Techniques to keep focused

    I’m a trustee of a Charity, Technical Architect at NetStronghold, organiser of London’s Calling, create and support my online Salesforce courses ...
Load More By Francis Pindar
Load More In Development

Check Also

New Salesforce News Podcast!

So Anup and I have decided to create ...

Subscribe via Email

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

My Latest YouTube Video

Books I’m currently reading

From Goodreads

  • Book cover

    The Psychology of Selling: Increase Your Sales Faster and Easier Than You Ever Thought Possible

    Brian Tracy

  • Book cover

    Sapiens: A Brief History of Humankind

    Yuval Noah Harari

  • Book cover

    The Subtle Art of Not Giving a F*ck: A Counterintuitive Approach to Living a Good Life

    Mark Manson

Follow me on Twitter