surface your existing force.com canvas app in the salesforce1 mobile app

21
Force.com Canvas Admin-Approved, User-Approved, and Personal Apps Unlocked Jay Hurst Senior Product Manager, salesforce.com @extraidea Kari Hotchkiss Senior Quality Engineer, salesforce.com @karihotchkiss

Upload: salesforce-developers

Post on 01-Jul-2015

144 views

Category:

Technology


3 download

DESCRIPTION

Do you have an existing Force.com 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.

TRANSCRIPT

Page 1: Surface Your Existing Force.com Canvas App in the Salesforce1 Mobile App

Force.com CanvasAdmin-Approved, User-Approved, and Personal Apps Unlocked

Jay Hurst

Senior Product Manager, salesforce.com

@extraidea

Kari Hotchkiss

Senior Quality Engineer, salesforce.com

@karihotchkiss

Page 2: Surface Your Existing Force.com Canvas App in the Salesforce1 Mobile App

Safe Harbor

Safe 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 of the assumptions proves incorrect, the results of salesforce.com, inc. could differ materially from the results expressed or implied by the forward-looking statements we make. All statements other than statements of historical fact could be deemed forward-looking, including any projections of product or service availability, subscriber growth, earnings, revenues, or other financial items and any statements regarding strategies or plans of management for future operations, statements of belief, any statements concerning new, planned, or upgraded services or technology developments and customer contracts or use of our 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 or delays in our Web hosting, breach of our security measures, the outcome of any litigation, risks associated with completed and any possible mergers and acquisitions, the immature market in which we operate, our relatively limited operating history, our ability to expand, retain, and motivate our employees and manage our growth, new releases of our service and successful customer deployment, our limited history reselling non-salesforce.com products, and utilization and selling to larger enterprise customers. Further information on potential factors that could affect the financial results of salesforce.com, inc. is included in our annual 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 and others 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 be delivered on time or at all. Customers who purchase our services should make the purchase decisions based upon features that are currently available. Salesforce.com, inc. assumes no obligation and does not intend to update these forward-looking statements.

Page 3: Surface Your Existing Force.com Canvas App in the Salesforce1 Mobile App

Jay HurstSenior Product Manager

Page 4: Surface Your Existing Force.com Canvas App in the Salesforce1 Mobile App

Kari HotchkissSenior Quality Engineer

Page 5: Surface Your Existing Force.com Canvas App in the Salesforce1 Mobile App

Managing your Canvas Applications• Determining which type of Canvas App management to use can be an important decision– How many of you have installed and managed a Canvas

App or Connected App in your Organizations before?– How many have wished that they could roll out applications

to their users with less Administrative management?– How many would like to learn about Personal Canvas

Apps?

Page 6: Surface Your Existing Force.com Canvas App in the Salesforce1 Mobile App

Types of Canvas AppsWhen do I choose which, and why?

Page 7: Surface Your Existing Force.com Canvas App in the Salesforce1 Mobile App

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 different management 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

Page 8: Surface Your Existing Force.com Canvas App in the Salesforce1 Mobile App

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 salesforce.com• 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

Page 9: Surface Your Existing Force.com Canvas App in the Salesforce1 Mobile App

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 from

salesforce.com• 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

Page 10: Surface Your Existing Force.com Canvas App in the Salesforce1 Mobile App

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

Page 11: Surface Your Existing Force.com Canvas App in the Salesforce1 Mobile App

Canvas App Feature Admin-Approved

User-Approved

Canvas Personal App

Admin Installs Canvas App P P

Admin Selects which Users can use the App P

End User sees Approve/Deny Flow P P

Can be Installed by an End User P

Canvas App Handles Auth Flow and Errors P P

Can be used in a PE/GE org P P

Non-Canvas Metadata in Package Included in Install P P

Which App Should I Choose?Decision is based on what the Canvas App is used for, and what the need is

Page 12: Surface Your Existing Force.com Canvas App in the Salesforce1 Mobile App

Developing Different App Types

Page 13: Surface Your Existing Force.com Canvas App in the Salesforce1 Mobile App

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

Page 14: Surface Your Existing Force.com Canvas App in the Salesforce1 Mobile App

DemoAdmin-Approved Apps

Page 15: Surface Your Existing Force.com Canvas App in the Salesforce1 Mobile App

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

Page 16: Surface Your Existing Force.com Canvas App in the Salesforce1 Mobile App

DemoUser- Approved Apps

Page 17: Surface Your Existing Force.com Canvas App in the Salesforce1 Mobile App

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

Page 18: Surface Your Existing Force.com Canvas App in the Salesforce1 Mobile App

DemoCanvas Personal Apps

Page 19: Surface Your Existing Force.com Canvas App in the Salesforce1 Mobile App

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

Page 20: Surface Your Existing Force.com Canvas App in the Salesforce1 Mobile App

Q&A

Page 21: Surface Your Existing Force.com Canvas App in the Salesforce1 Mobile App