What is Salesforce Canvas?

  • Canvas enables you to easily integrate a third-party application in Salesforce.
  • Canvas is a set of tools and JavaScript APIs that you can use to expose an application as a canvas app.
  • You can take your new or existing applications and make them available to your users as part of their Salesforce experience.
  • 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).

Canvas Tools

  • authentication: If your application requires authorization, you can implement it by using a signed request or OAuth 2.0.
  • context: API support that enables you to retrieve context information about the environment in which the canvas app is running.
  • cross-domain XHR: JavaScript support for cross-domain XML HTTP requests back to the Salesforce domain.
  • resizing: Methods that support the ability to resize your canvas app.
  • events: provide a JavaScript-based way to send and receive events canvas apps. Use events to enable communication between multiple canvas apps on a single page.
  • visualforce component: that lets you expose your canvas app on a Visualforce page.
  • Canvas Apps in the Chatter Feed: Lets you expose your canvas apps as feed items.
  • Canvas in the Salesforce App: Makes your canvas apps available in the Salesforce app.

Signed Request

  • The server defines a /signedrequest endpoint configured to respond to POST requests.
  • This is the endpoint (Canvas App URL) you specified in the Canvas parameters of your Connected App.
  • When loading your Canvas app, your Salesforce instance will post encoded data to that endpoint including contextual information (logged in user, current object, ...), and an authenticated session id that your app can use to make API calls to your Salesforce instance.

Creating App in Heroku

Pushing code into App in Heroku

                  
                  implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId" 
                  access="global" 
                    force:canvasApp developerName="AccountPositionApp
                 

              

Resources