Surface Your Existing Canvas App in the Salesforce1 Mobile App

  • View

  • Download

Embed Size (px)


Do you have an existing Canvas application that you would like to optimize for mobile? Join us to learn from our experience in enabling the Salesforce1 Mobile App for an existing canvas app. Using our app as a real-world example, we'll deep dive into design considerations for loading the existing app on a mobile device, implementation decisions and execution, technologies we used, and issues we encountered along the way.

Text of Surface Your Existing Canvas App in the Salesforce1 Mobile App

  • 1. CanvasAdmin-Approved, User-Approved, and Personal Apps UnlockedJay HurstSenior Product Manager, HotchkissSenior Quality Engineer,

2. Safe HarborSafe harbor statement under the Private Securities Litigation Reform Act of 1995:This presentation may contain forward-looking statements that involve risks, uncertainties, and assumptions. If any such uncertainties materialize or if any ofthe assumptions proves incorrect, the results of, inc. could differ materially from the results expressed or implied by the forward-lookingstatements we make. All statements other than statements of historical fact could be deemed forward-looking, including any projections of product or serviceavailability, subscriber growth, earnings, revenues, or other financial items and any statements regarding strategies or plans of management for futureoperations, statements of belief, any statements concerning new, planned, or upgraded services or technology developments andcustomer contracts or use ofour services.The risks and uncertainties referred to above include but are not limited to risks associated with developing and delivering new functionality for our service,new products and services, our new business model, our past operating losses, possible fluctuations in our operating results and rate of growth, interruptions ordelays in our Web hosting, breach of our security measures, the outcome of any litigation, risks associated with completed and any possible mergers andacquisitions, the immature market in which we operate, our relatively limited operating history, our ability to expand, retain, and motivate our employees andmanage our growth, new releases of our service and successful customer deployment, our limited history reselling products, and utilizationand selling to larger enterprise customers. Further information on potential factors that could affect the financial results of, inc. is included in ourannual report on Form 10-K for the most recent fiscal year and in our quarterly report on Form 10-Q for the most recent fiscal quarter. These documents andothers containing important disclosures are available on the SEC Filings section of the Investor Information section of our Web site.Any unreleased services or features referenced in this or other presentations, press releases or public statements are not currently available and may not bedelivered on time or at all. Customers who purchase our services should make the purchase decisions based upon features that are currently, inc. assumes no obligation and does not intend to update these forward-looking statements. 3. Jay HurstSenior Product Manager 4. Kari HotchkissSenior Quality Engineer 5. Managing your Canvas Applications Determining which type of Canvas Appmanagement to use can be an important decision How many of you have installed and managed a CanvasApp or Connected App in your Organizations before? How many have wished that they could roll out applicationsto their users with less Administrative management? How many would like to learn about Personal CanvasApps? 6. Types of Canvas AppsWhen do I choose which, and why? 7. Different Types of Canvas App There are three different types of Canvas Apps Admin Approved End User Approved Personal Canvas Apps Each type requires a different setup on the Developer side, and a differentmanagement from the Administrator side The app choice drives: User experience with the approval screen Admin experience with the management Developer decision tree when the Canvas App Loads A Canvas App can support one or more of the types 8. Admin-Approved Canvas Apps This option allows the administrator to specify which users can use the app The admin is pre-approving specific users for the app Admin selects specific users by approving Profiles and Permission Sets for the app The Canvas App will always receive an HTTP POST from POST contains the signed request and other app information The Canvas App can instantly return the correct content to the end user The end user will never see an Accept/Deny screen Any user without admin approved access who tries to load the app will see an error 9. User-Approved Canvas Apps This option allows the end users to approve or deny access to the app The admin still must install or create the Canvas App If the app has not been approved by the user, the app will receive an HTTP GET GET will contain a URL parameter _sfdc_canvas_authvalu with a value of user_approval_required Canvas App must detect this and push the user into an OAuth flow to approve the app Once the app has been approved, the app can use the Canvas JavaScript SDK to: getContext() Returns the app context refreshSignedRequest() Returns the signed request through JavaScript repost() Does a new POST of the signed request to your app The end user will see an Accept/Deny screen if The app has never been approved The access has been revoked or expired If the user denies access, the Canvas App must handle the error messaging to the end user 10. Canvas Personal Apps This option allows the end users to install the Canvas App into the org Only the Canvas specific metadata information is installed The admin can choose to not allow this for the org The admin can later install the full app and turn it into a Admin-Approved or User-Approved App The user must discover the app and be taken into the standard OAuth Approve/Deny flow Approving the app will kick off the install process If the app has been installed already, the user is granted access The app will only appear on the Chatter Tab location If the access is revoked to the app, it will be removed from the Chatter Tab The Canvas App must detect that it is a personal app The signed request will contain information that app is a personal app Canvas App can determine which content to display 11. Which App Should I Choose?Decision is based on what the Canvas App is used for, and what the need isCanvas App FeatureAdmin-ApprovedUser-ApprovedCanvasPersonal AppAdmin Installs Canvas App P PAdmin Selects which Users can use the App PEnd User sees Approve/Deny Flow P PCan be Installed by an End User PCanvas App Handles Auth Flow and Errors P PCan be used in a PE/GE org P PNon-Canvas Metadata in Package Included in Install P P 12. Developing Different App Types 13. Admin-Approved Flow User opens Canvas App Salesforce determines if user has access If no access, access error thrown Salesforce generates signed request JSON is base64 encoded HMAC-SHA256 with the canvas consumer secret used to generate a key Key and base64sting are combined and sent as a POST Canvas App accepts the POST HMAC-SHA256 with the canvas consumer secret used to generate a key Key is compared to the key sent in signed request Canvas App chooses to display content 14. DemoAdmin-Approved Apps 15. User-Approved Flow User opens Canvas App Salesforce determines if user has previously approved If not previously approved salesforce does a GET with URL parameter Canvas App accepts the GET and then pushes the user through an OAuth flow If the user denies the access Canvas App displays error Once app is approved, Canvas app issues getContext, refreshSignedRequest, or repost If previously approves, salesforce generates signed request and does a POST Canvas App accepts the POST Canvas App chooses to display content 16. DemoUser- Approved Apps 17. User-Approved Flow User discovers the app and clicks a link to get the app Link is hosted somewhere by the Canvas App Link goes to the standard OAuth Flow If the app is not installed, the canvas metadata is installed User gets an email when install is complete If the app is installed approval is completed User goes to the Chatter Tab If there is an app installed, and the user has approved, the app will appear in the Chatter list User opens the Canvas App Salesforce generates signed request and does a POST Canvas App accepts the POST Canvas App chooses to display content 18. DemoCanvas Personal Apps 19. Wrapup/What Have We Learned? Today we learned the different types of Canvas Apps What types of Canvas Apps can you create What are the differences between the app types When should I use which pp type We also walked through the code and flows of the different app types Admin-Approved User-Approved Canvas Personal Apps 20. Q&A