Your organization relies on a valuable web application, but data silos hinder efficient workflows. Rebuilding the app within Salesforce is time-consuming and unnecessary. Introducing Salesforce Canvas, your bridge to seamless integration. Salesforce Canvas is a powerful framework that integrates third-party web applications and offers seamless integration, a unified user experience, and enhanced functionality. Key use cases include replicating app functionality, custom search tools, document generation, and complex calculations. This blog focuses on Canvas authentication methods, including Signed Request and OAuth 2.0, detailing setup and testing processes for each.
What is Salesforce Canvas?
Canvas is a powerful framework equipped with tools and JavaScript APIs. It empowers you to transform your existing web application into a Canvas App, seamlessly integrated within the Salesforce interface. Think of it as a plug-and-play solution, eliminating the need for costly and time-consuming redevelopment.
Before diving into Canvas, consider simpler alternatives if authentication and deep communication are not crucial. However, for seamless integration with robust data exchange and authentication, Salesforce Canvas is the champion. Let's explore its capabilities and build a bridge between our web application and Salesforce. But before that let’s explore some of the use cases.
Scenario 1: Replicate Java/Node App Functionality in Salesforce
Imagine your enterprise thrives on a custom web app built with Java or Node. Now, you want to harness its functionality directly within Salesforce, eliminating context switching and boosting efficiency. Canvas makes this possible! Seamlessly integrate your app as a Canvas App, providing users with familiar features without leaving the Salesforce interface.
Scenario 2: Supercharge search with a custom tool
Need a robust, custom search tool integrated within Salesforce? Canvas steps in once again. Embed your search tool as a Canvas App, empowering users to uncover relevant information quickly and efficiently, all within the familiar Salesforce environment.
Scenario 3: Streamline document generation with seamless integration
Tired of manual document generation processes? Leverage Canvas to integrate your document generation tool seamlessly. Users can create and access crucial documents directly within Salesforce, streamlining workflows and saving valuable time.
Scenario 4: Simplify complex calculations with an integrated tool
Dealing with intricate calculations that hinder your team's progress? Canvas provides the answer. Integrate your complex calculator tool as a Canvas App, allowing users to perform calculations directly within Salesforce, eliminating data transfer and ensuring accuracy. In this blog, major focus is to explore the authentication mechanism of Canvas Apps which is pre-requisite of configuring SF Canvas in detailed.
There are 2 ways of authentication –
Canvas Previewer – Salesforce provides a tool to preview the Canvas before publishing to the required locations. Navigate to Setup & search for Canvas Previewer.
Pre-requisite – Create 2 orgs, named them as Canvas source & Canvas consumer. Consider org “Canvas Source” an application hosting platform & org “Canvas Consumer” is the place where connected apps will get created.
Perform below steps in respective ORG as mentioned -
When using OAuth with Canvas, there are 2 options User-agent flow & Web server flow. We are going to implement the demo for user agent flow, we are going to use the same 2 orgs.
Perform below steps in respective ORG as mentioned -
Choosing the right authentication method for your Canvas app depends on several factors. Here's a breakdown: