Force.com Canvas Review

  December 23, 2013       Ali Zafar

Last year (2012) salesforce.com introduced the Force.com Canvas framework that enables developers to easily integrate third-party web applications in Salesforce. Here is a short blog by our Salesforce consultant Ali Zafar on what this can mean to you…

  • You can take your new or existing applications and make them available to your users as part of their Salesforce experience.
  • You can preview your canvas application right inside Salesforce – it can be a totally new generation app or a legacy app.
  • The Canvas framework takes care of the single sign on, user details, data access, Chatter social graph and more.
  • You can write your applications on Heroku and have them run inside Salesforce – it seems to provide the best of both worlds.
  • You can handle any size integration with Force.com Canvas, whether it’s a simple informative app or a very complex app.
  • The third-party app that you want to expose as a canvas app can be written in any language. The only requirement is that the app has a secure URL (HTTPS).

Quinton Wall said in his Dreamforce 2012 presentation that “Force.com Canvas is just not a light UI Integration, it’s a Deep Social Integration”.  So let’s have a look at some of the different use cases by example:

UI Integration
If you have a News Reporting app that you want your users to have access to, you need to just create a new Canvas app in Salesforce and give the URL of the web app.
Deep Social Integration
If you have an application like SAP, you can go right into your SAP instance from Salesforce and perform the same operations but it would be a more complex scenario. You can leverage the SAP framework to build the UI that you want to display in Salesforce, then you can use the Force.com Canvas SDK. The Force.com Canvas SDK is an open-source suite of JavaScript libraries and provides simple methods that use existing Salesforce APIs (SOAP API, REST API, Chatter REST API), so you can build a seamless end-user experience inside of salesforce.com. This allows actions completed by users from within the Canvas app to leverage the user’s authorisation/access level and allow changes to be recorded in the audit history as the actual user instead of some arbitrary ‘api user’. Data from the current Salesforce.com page record is even passed automatically in JSON format to the canvas component in SAP, allowing it to display relevant to the Salesforce record context.

Post to Chatter
You can post to a Chatter feed directly from a Canvas app. To demonstrate this I created a Canvas app named as ‘Test App’ in my DE Org.

Post to the Chatter feed from a Canvas app

canvas

In my Chatter feed, it appears as “via Test App”

canvas1

makepositive – a leading UK Salesforce implementation partner are always keen to share our thoughts and best practices through our blog and would love to hear your comments – please leave us your comments on this blog post below.