3. Disclaimer
Content and comments from the following presentation are purely and solely the responsibility of the speakers and do
not reflect in any way or involve the thought of: Salesforce.com, Uruguay Salesforce Developer User Group or any
other person involved in the organization of the event.
The images, diagrams and texts from other authors cited were properly authorized.
Join the conversation: #uysdug #salesforcemobile
4. Speakers
Join the conversation: #uysdug #salesforcemobile
Aldo Fernandez
Software Engineer
@aldoforce
Bruno Fagundez
Cloud Hacker
@geekymartian
5. Follow UYSDUG for the latest news
@uysdug / #uysdug
/Uruguay-Salesforce-Developer-User-Group/
www.uysdug.com
Join the conversation: #uysdug #salesforcemobile
6. Join the conversation: #uysdug #salesforcemobile
Salesforce Mobile Developer Week
Worldwide Developer Gathering - April 21-27, 2013
7. Join the conversation: #uysdug #salesforcemobile
Mobile Packs
Build Mobile web and hybrid apps using the language and frameworks you
already know and love.
8. Developing mobile apps to our Users
Join the conversation: #uysdug #salesforcemobile
Authenticate and consume REST services
Standard Objects
Custom Objects
9. About our Users, we already know...
Join the conversation: #uysdug #salesforcemobile
● License type: Salesforce or Salesforce
Platform in most cases
● They are mobile
● They can authenticate to Salesforce using
web login, SOAP API, REST API, etc.
● Mainly they do CRUD operations against
Standard and Custom Objects
10. BUT, what if we want to...
Join the conversation: #uysdug #salesforcemobile
● Allow external Customers to use and interact
with our standard/custom objects?
● Create a mobile app with engaging content,
a great UX, in order to make your Customers
part of your business community?
CUSTOMER PORTAL(flashing lights and confetti here!)
11. About our Customer Portal Users, we
know...
Join the conversation: #uysdug #salesforcemobile
● They use Customer Portal Licenses
● They can register/sign-up using the
Customer Portal Web site
● They can authenticate using Portal web login
and SOAP API
● They are Mobile
12. Regular Users vs Customer Portal
Users
● License type: Salesforce
or Salesforce Platform
● CRUD operations
● Mobile
● Authentication
○ Web Login
○ SOAP API
○ REST API
● License type: Customer
Portal User
● CRUD operations
● Mobile
● Authentication
○ Portal Login
○ SOAP API*
*Special header settings required
Join the conversation: #uysdug #salesforcemobile
REST?
13. Ok, that's easy... right?
Join the conversation: #uysdug #salesforcemobile
● If you try to setup an OAuth authentication
process with a user with Customer Portal
License...
14. OAuth and Customer Portal Licenses
Join the conversation: #uysdug #salesforcemobile
● Currently (April 2013), using OAuth with
Customer Portal License does not work.
● According to insider information, when
Salesforce launch Chatter Communities as
GA, OAuth will be available for Portal Users
● So, for the time being...
16. Enabling RESTful services to Mobile
Customer Portal Users
Join the conversation: #uysdug #salesforcemobile
● First, Customer needs to authenticate using
SOAP API.
● SOAP API was updated to additionally
provide OrgID and PortalID attributes.
● After authentication the platform will provide
a SessionID token.
● Save that SessionID
17. Enabling RESTful services to Mobile
Customer Portal Users
Join the conversation: #uysdug #salesforcemobile
● Include that SessionID in the forthcoming
REST requests' Authentication header:
Authentication: Bearer SessionID
● Submit that request and enjoy a RESTful
experience... from your Mobile!
18. Demo Implementation
Join the conversation: #uysdug #salesforcemobile
● Use a Customer Portal
● Publish VF ApexPages as REST endpoints
● Make those endpoints to return JSONP
callbacks to avoid XSS policy
● Request /login and /register pages passing
user parameters (USE HTTPS!)
● Implement Mobile client to orchestrate the
process.