SlideShare a Scribd company logo
1 of 38
Alfresco for Salesforce
5 November 2013 / 13 November 2013

Will Abson (wabson@alfresco.com)
Jared Ottley (jottley@alfresco.com)
Gregory Melahn (greg.melahn@alfresco.com)

#SummitNow
Agenda
• Part One (Business)
o Overview and Demonstration
• Part Two (Technical)
o How it Works
o Building on Salesforce
o Building on Alfresco
#SummitNow
Part One

#SummitNow
What does the App do?

• Allows Salesforce Users to attach Documents

to Salesforce Objects and have them stored in
Alfresco
o

Four Specific Salesforce Object Types supported
▪ Accounts
▪ Cases
▪ Contracts
▪ Opportunities

• Allows Salesforce Users to Edit, View and
•

Delete the attached Alfresco Documents#SummitNow
Creates Chatter about the Alfresco Documents
Finding the App

• Go to the Salesforce App Exchange
•

https://appexchange.salesforce.com/
Enter some search criteria (e.g. ‘Alfresco’)
o

#SummitNow
The App Exchange Listing

#SummitNow
Installing the App

#SummitNow
Demo

#SummitNow
Demo

#SummitNow
Part Two

#SummitNow
Alfresco and SF Components

Properties Config
Adv. Search Form
Alfresco Share

Apex Classes
VisualForce Pages
Security Profiles

Salesforce Model
Alfresco Repository

Sample Layouts
Salesforce
#SummitNow
Salesforce Model
Salesforce Record

1

Stored in <site>/Salesforce Records

0..N

Salesforce
Attachment

Assoc

Stored in
<site>/documentLibrary/Salesforce
Attachments

Additional Aspects
CRM Account
Document Type

CRM Contract

CRM Case
CRM Opportunity
#SummitNow
Application Packaging
On the Salesforce side
o
o

(??)
Deployed on the AppExchange

On the Alfresco side (MyAlfresco only)
o
o

Repo AMP
▪ salesforce-repo-1.0.0.amp
Share AMP
▪ salesforce-share-1.0.0.amp
#SummitNow
How it Works
Web browser

A
O PI:
C Au
M th
IS +

Salesforce Users

#SummitNow
How it Works
Web browser
Upload:
OAuth +
CORS +
CMIS

A
O PI:
C Au
M th
IS +

Salesforce Users

#SummitNow
How it Works - Downloading a File
Web browser

O
CM Au
t
IS h +

Salesforce Users

1. User clicks Download link for
a file
2. Salesforce-side code checks
the user’s access token is
still valid
o If not valid, the token is
refreshed
3. Salesforce-side code checks
the document is present in
Alfresco, providing nodeRef
o If not present, the user
is forwarded to a ‘page
not found’ page
4. Salesforce-side code access
the content of the file from
Alfresco Cloud via CMIS and
#SummitNow
streams it back to the user
How it Works - Uploading a File
Web browser

OAuth +
CORS +
CMIS

O
CM Au
t
IS h +

Salesforce Users

1. User clicks Attach File button
in their browser, taken to New
Document page
2. User selects file, enters
Document Name and
Document Type (drop-down)
and hits Save
3. Page fires off POST request
to trigger Apex remote action
in Salesforce-side code,
which creates empty content
item in the Document Library
4. Browser does a CMIS PUT
directly against Alfresco
Cloud to upload the content
itself
o This works around
Salesforce request body
#SummitNow
size restrictions
o Access token from
Cloud Sync
OAuth +
CORS +
CMIS

Corporate Users

O
CM Au
t
IS h +

Web browser

Sync

Salesforce Users

Firewall
Remote Office

#SummitNow
Building on Salesforce

Apex

Visualforce

*Does not include SOAP and REST APIs

#SummitNow
CMIS API Challenges

#SummitNow
CMIS API Challenges - No CMIS Client
• Force.com has no concept of libraries
• Install packages from appexchange
• Limited to what to is exposed by developer
• Add classes from other projects
• Count against you code total
• No one has written a CMIS appexchange package
• No one has written CMIS classses that could be added
• Apex Web Callouts to CMIS endpoints
#SummitNow
• Governance Limits
• Installer must approve connecting endpoints
CMIS API Challenges - Tenant Id
• Calls to Cloud CMIS API need tenant id
• CMIS provides no way to discover tenant id
• Two options:
• User provides
• Use REST API
• https://api.alfresco.com
• Apex JSON parser (requires new classes)
• JSON objects: Reserved words
• Limit to home network or ask user input #SummitNow
CMIS API Challenges - Verbosity
• CMIS is Verbose!
• Can reduce a little using filters
• Governance Limits
Example: Alfresco.com
• Alfresco.com site list is 400+ (and growing)
• Document size is 2.5 MB
Options:
• Paging
• CMIS Browser Bindings

#SummitNow
CMIS API Challenges - Parsing XML
• Apex XML parser
Gotcha: DateTime
String dateString = property.getChildElement('value', CMIS_NS).getText();
dateString = dateString.replace('T', ' ');
dateString= dateString.substring(0, dateString.length() - 6);
relatedDoc.creationDate = DateTime.valueOf(dateString);

#SummitNow
CMIS API Challenges - Child Objects
• Lacks support for including child objects
If it did….
Governance Limit Heap Size
Since it doesn’t…
Governance Limit Callout Requests

#SummitNow
CMIS API Challenge - Delete
CMIS API allows delete of relationship using objectId
using:
https://api.alfresco.com/alfresco.com/public/cmis/versions
/1.0/atom/entry?id=assoc:4240216&allVersions=true
Relationship MAY be deleted when the target is removed
in a peer relationship (according to the spec).
Any code should allow for a 404.
Previously the relationship remained and target pointed to
#SummitNow
the archiveStore.
CMIS API Challenges – Secondary
Types
•Lack of support of secondary types
makes the the integration dependent on
Alfresco extensions.
•Secondary type support would allow
client to fallback to base type.

#SummitNow
CMIS API Challenges - Sites folder
Listing documents is achieved using a CMIS getObjectByPath call
•We

know the path of the Salesforce Record item - /Sites/<network-

id>/Salesforce Records/<record-id>

But, the Sites folder may not always be named 'Sites', e.g. 'Sitios'!
•CMIS does not provide a way to specify a QName path, rather than a
name path.
So, we must find out what the sites folder is called, and store this
•This is done when the user selects the site to be used for document
storage.
#SummitNow
CMIS Workbench as Node Browser
org.apache.chemistry.opencmis.binding.spi.type=atompub
org.apache.chemistry.opencmis.binding.atompub.url=https:/
/api.alfresco.com/cmis/versions/1.0/atom
org.apache.chemistry.opencmis.binding.auth.http.basic=fals
e
org.apache.chemistry.opencmis.binding.header.0=Authorizat
ion:Bearer <oauth token>
org.apache.chemistry.opencmis.binding.compression=true
cmis.workbench.folder.includeAcls=false
cmis.workbench.object.includeAcls=false
cmis.workbench.version.includeAcls=false
#SummitNow
Salesforce Governance
10

Total number of callouts (HTTP
requests or Web services calls) in a
transaction

6 MB

Total heap size

10,000
Maximum CPU time on the
milliseconds Salesforce servers
5 MB

File size limit

#SummitNow

http://www.salesforce.com/us/developer/docs/apexcode/
Security Considerations
Salesforce apply strict criteria to apps before they can be
publicly listed on the AppExchange
Partnership with Checkmarx to allow developers to check
for common vulnerabilities in their Apex / Visualforce apps
The AppExchange team are responsible for performing a
final check across your app and any supporting services
For Alfresco this covered the MyAlfresco service
Developers do not have access to the tools used
This feedback process takes (up to) 8 weeks
#SummitNow
Future Ideas
Access Salesforce Content from Alfresco
Salesforce Chatter API (plug)
Avoiding Salesforce Governance limits
Salesforce Canvas Framework
Alfresco Embed

#SummitNow
Add permission set to multiple users
Every user must have the ‘Alfresco Cloud
Document Management User’ permission
set applied to their account.
This can be scripted through the Salesforce
Developer Console.

#SummitNow
Example
User u = [select id from User where <logic here>];
PermissionSet ps = [Select p.Id From PermissionSet p
where p.label = 'Alfresco Cloud Document Management
User'];
PermissionSetAssignment psa = new
PermissionSetAssignment(AssigneeId = u.id,
PermissionSetId = ps.id);
insert psa;

#SummitNow
More information
Documentation
https://appexchange.salesforce.com/servlet/servlet.FileDownload?
file=00P3000000Hd94DEAR

Salesforce App Exchange Listing
https://appexchange.salesforce.com/listingDetail?
listingId=a0N3000000B34XIEAZ

#SummitNow
#SummitNow
Known Issues and Limits
•
•
•
•
•
•
•

We don’t support IE versions prior to IE 10
Maximum of number of documents that can be attached to a single
Salesforce item is 100
Documents start out as V1.1, not 1.0
If you attach a document with the same name as an existing attachment
to the same Salesforce Object, we name the attachment with a ‘-<n>’
suffix (up to three such attachments)
Uploading a document that exceeds the Alfresco quota will fail, but a
Salesforce Chatter entry will still be created (transactional integrity)
The app uses the name of the Salesforce object to create the name of the
folder in Alfresco where the files are uploaded. If you create two
Salesforce objects with the same name, files attached to either object will
be stored in the same folder
Moderated sites that the Salesforce Admin is not yet a member of will still
appear in the Sites dropdown
#SummitNow
Force.com Limitations
No local deployment process, deploy
process is via an external API with only an
Ant task to integrate this into your
workflow
Namespacing
Formats not well documented
The process of certifying an app is opaque
and non-trivial
#SummitNow

More Related Content

What's hot

SharePoint 2013 “App Model” Developing and Deploying Provider Hosted Apps
SharePoint 2013 “App Model” Developing and Deploying Provider Hosted AppsSharePoint 2013 “App Model” Developing and Deploying Provider Hosted Apps
SharePoint 2013 “App Model” Developing and Deploying Provider Hosted Apps
Sanjay Patel
 
Building Apps for SharePoint 2013 by Andrew Connell - SPTechCon
Building Apps for SharePoint 2013 by Andrew Connell - SPTechConBuilding Apps for SharePoint 2013 by Andrew Connell - SPTechCon
Building Apps for SharePoint 2013 by Andrew Connell - SPTechCon
SPTechCon
 
SharePoint 2013 “App Model” Developing and Deploying Provider Hosted Apps
SharePoint 2013 “App Model” Developing and Deploying Provider Hosted AppsSharePoint 2013 “App Model” Developing and Deploying Provider Hosted Apps
SharePoint 2013 “App Model” Developing and Deploying Provider Hosted Apps
Sanjay Patel
 

What's hot (20)

Salesforce Coding techniques that keep your admins happy (DF13)
Salesforce Coding techniques that keep your admins happy (DF13)Salesforce Coding techniques that keep your admins happy (DF13)
Salesforce Coding techniques that keep your admins happy (DF13)
 
SharePoint 2013 “App Model” Developing and Deploying Provider Hosted Apps
SharePoint 2013 “App Model” Developing and Deploying Provider Hosted AppsSharePoint 2013 “App Model” Developing and Deploying Provider Hosted Apps
SharePoint 2013 “App Model” Developing and Deploying Provider Hosted Apps
 
Building Apps for SharePoint 2013 by Andrew Connell - SPTechCon
Building Apps for SharePoint 2013 by Andrew Connell - SPTechConBuilding Apps for SharePoint 2013 by Andrew Connell - SPTechCon
Building Apps for SharePoint 2013 by Andrew Connell - SPTechCon
 
Developer’s Independence Day: Introducing the SharePoint App Model
Developer’s Independence Day:Introducing the SharePoint App ModelDeveloper’s Independence Day:Introducing the SharePoint App Model
Developer’s Independence Day: Introducing the SharePoint App Model
 
What you need to know about Search in SharePoint 2013 Preview - DFW SharePoin...
What you need to know about Search in SharePoint 2013 Preview - DFW SharePoin...What you need to know about Search in SharePoint 2013 Preview - DFW SharePoin...
What you need to know about Search in SharePoint 2013 Preview - DFW SharePoin...
 
Alfresco Webinar: Jive Toolkit
Alfresco Webinar: Jive ToolkitAlfresco Webinar: Jive Toolkit
Alfresco Webinar: Jive Toolkit
 
Lightning web components
Lightning web componentsLightning web components
Lightning web components
 
SPCA2013 - Developing Provider-Hosted Apps for SharePoint 2013
SPCA2013 - Developing Provider-Hosted Apps for SharePoint 2013SPCA2013 - Developing Provider-Hosted Apps for SharePoint 2013
SPCA2013 - Developing Provider-Hosted Apps for SharePoint 2013
 
App Model For SharePoint 2013
App Model For SharePoint 2013App Model For SharePoint 2013
App Model For SharePoint 2013
 
Introduction to lightning components
Introduction to lightning componentsIntroduction to lightning components
Introduction to lightning components
 
Office 365 api vs share point app model
Office 365 api vs share point app modelOffice 365 api vs share point app model
Office 365 api vs share point app model
 
Lightning Components Workshop
Lightning Components WorkshopLightning Components Workshop
Lightning Components Workshop
 
SFDC REST API
SFDC REST APISFDC REST API
SFDC REST API
 
SharePoint 2013 “App Model” Developing and Deploying Provider Hosted Apps
SharePoint 2013 “App Model” Developing and Deploying Provider Hosted AppsSharePoint 2013 “App Model” Developing and Deploying Provider Hosted Apps
SharePoint 2013 “App Model” Developing and Deploying Provider Hosted Apps
 
Deep dive into SharePoint 2013 hosted apps - Chris OBrien
Deep dive into SharePoint 2013 hosted apps - Chris OBrienDeep dive into SharePoint 2013 hosted apps - Chris OBrien
Deep dive into SharePoint 2013 hosted apps - Chris OBrien
 
SharePoint 2013 APIs demystified
SharePoint 2013 APIs demystifiedSharePoint 2013 APIs demystified
SharePoint 2013 APIs demystified
 
Designing for SharePoint Provider Hosted Apps
Designing for SharePoint Provider Hosted AppsDesigning for SharePoint Provider Hosted Apps
Designing for SharePoint Provider Hosted Apps
 
Spring '16 Release Overview - Bilbao Feb 2016
Spring '16 Release Overview - Bilbao Feb 2016Spring '16 Release Overview - Bilbao Feb 2016
Spring '16 Release Overview - Bilbao Feb 2016
 
REST API: Do More in the Feed with Action Links
REST API: Do More in the Feed with Action LinksREST API: Do More in the Feed with Action Links
REST API: Do More in the Feed with Action Links
 
Citrix Mobile Receiver Techtalk
Citrix Mobile Receiver TechtalkCitrix Mobile Receiver Techtalk
Citrix Mobile Receiver Techtalk
 

Viewers also liked

Salesforce Security – An Encryption Guide For The Paranoid
Salesforce Security – An Encryption Guide For The ParanoidSalesforce Security – An Encryption Guide For The Paranoid
Salesforce Security – An Encryption Guide For The Paranoid
Ajeet Singh
 
Strategies To Develop Location Aware Hyperlocal Android Apps
Strategies To Develop Location Aware Hyperlocal Android AppsStrategies To Develop Location Aware Hyperlocal Android Apps
Strategies To Develop Location Aware Hyperlocal Android Apps
Ajeet Singh
 

Viewers also liked (16)

ERP/CRM Integration Series: Integration Salesforce with Alfresco
ERP/CRM Integration Series: Integration Salesforce with AlfrescoERP/CRM Integration Series: Integration Salesforce with Alfresco
ERP/CRM Integration Series: Integration Salesforce with Alfresco
 
Spring Social, Alfresco and Spring-Social-Alfresco
Spring Social, Alfresco and Spring-Social-AlfrescoSpring Social, Alfresco and Spring-Social-Alfresco
Spring Social, Alfresco and Spring-Social-Alfresco
 
Mobile Marketing Mania [Infographic]
Mobile Marketing Mania [Infographic]Mobile Marketing Mania [Infographic]
Mobile Marketing Mania [Infographic]
 
Alfresco Integrations - Alfresco Devcon 2012
Alfresco Integrations - Alfresco Devcon 2012Alfresco Integrations - Alfresco Devcon 2012
Alfresco Integrations - Alfresco Devcon 2012
 
Alfresco- Making Workflow Process Simpler
Alfresco- Making Workflow Process SimplerAlfresco- Making Workflow Process Simpler
Alfresco- Making Workflow Process Simpler
 
Jive, dropbox and other integrations
Jive, dropbox and other integrationsJive, dropbox and other integrations
Jive, dropbox and other integrations
 
Developing for Glass & Alfresco
Developing for Glass & AlfrescoDeveloping for Glass & Alfresco
Developing for Glass & Alfresco
 
Alfresco Rumors: XMPP Enable Alfresco nodes (POC)
Alfresco Rumors: XMPP Enable Alfresco nodes (POC)Alfresco Rumors: XMPP Enable Alfresco nodes (POC)
Alfresco Rumors: XMPP Enable Alfresco nodes (POC)
 
Dreamforce 2016 : Highlights, Hacks and Rumors
Dreamforce 2016 : Highlights, Hacks and RumorsDreamforce 2016 : Highlights, Hacks and Rumors
Dreamforce 2016 : Highlights, Hacks and Rumors
 
CORS - Enable Alfresco for CORS
CORS - Enable Alfresco for CORSCORS - Enable Alfresco for CORS
CORS - Enable Alfresco for CORS
 
Mobile Retail and You | An Infographic
Mobile Retail and You | An InfographicMobile Retail and You | An Infographic
Mobile Retail and You | An Infographic
 
Advantage Dreamforce: In Numbers | An Infographic
Advantage Dreamforce: In Numbers | An InfographicAdvantage Dreamforce: In Numbers | An Infographic
Advantage Dreamforce: In Numbers | An Infographic
 
The Mobile Story 2016 [Infographic]
The Mobile Story 2016 [Infographic]The Mobile Story 2016 [Infographic]
The Mobile Story 2016 [Infographic]
 
Salesforce Security – An Encryption Guide For The Paranoid
Salesforce Security – An Encryption Guide For The ParanoidSalesforce Security – An Encryption Guide For The Paranoid
Salesforce Security – An Encryption Guide For The Paranoid
 
The Mobile Grenade | An Infographic
The Mobile Grenade | An InfographicThe Mobile Grenade | An Infographic
The Mobile Grenade | An Infographic
 
Strategies To Develop Location Aware Hyperlocal Android Apps
Strategies To Develop Location Aware Hyperlocal Android AppsStrategies To Develop Location Aware Hyperlocal Android Apps
Strategies To Develop Location Aware Hyperlocal Android Apps
 

Similar to Alfresco for Salesforce

DEVCON-Alfresco i os mobile application details and design
DEVCON-Alfresco i os mobile application details and designDEVCON-Alfresco i os mobile application details and design
DEVCON-Alfresco i os mobile application details and design
Zia Consulting
 
0910 cagliari- spring surf and cmis - the dynamic duo
0910 cagliari- spring surf and cmis - the dynamic duo0910 cagliari- spring surf and cmis - the dynamic duo
0910 cagliari- spring surf and cmis - the dynamic duo
Symphony Software Foundation
 

Similar to Alfresco for Salesforce (20)

DEVCON-Alfresco i os mobile application details and design
DEVCON-Alfresco i os mobile application details and designDEVCON-Alfresco i os mobile application details and design
DEVCON-Alfresco i os mobile application details and design
 
Mike Taulty MIX10 Silverlight Frameworks and Patterns
Mike Taulty MIX10 Silverlight Frameworks and PatternsMike Taulty MIX10 Silverlight Frameworks and Patterns
Mike Taulty MIX10 Silverlight Frameworks and Patterns
 
Alfresco DevCon 2019: BiDirectional Sync to Other Platforms
Alfresco DevCon 2019: BiDirectional Sync to Other PlatformsAlfresco DevCon 2019: BiDirectional Sync to Other Platforms
Alfresco DevCon 2019: BiDirectional Sync to Other Platforms
 
0910 cagliari- spring surf and cmis - the dynamic duo
0910 cagliari- spring surf and cmis - the dynamic duo0910 cagliari- spring surf and cmis - the dynamic duo
0910 cagliari- spring surf and cmis - the dynamic duo
 
Chris O'Brien - Modern SharePoint development: techniques for moving code off...
Chris O'Brien - Modern SharePoint development: techniques for moving code off...Chris O'Brien - Modern SharePoint development: techniques for moving code off...
Chris O'Brien - Modern SharePoint development: techniques for moving code off...
 
Alfresco Coding mit dem Alfresco SDK (auf Englisch) - Julien Bruinaud, Techni...
Alfresco Coding mit dem Alfresco SDK (auf Englisch) - Julien Bruinaud, Techni...Alfresco Coding mit dem Alfresco SDK (auf Englisch) - Julien Bruinaud, Techni...
Alfresco Coding mit dem Alfresco SDK (auf Englisch) - Julien Bruinaud, Techni...
 
Intro to the Alfresco Public API
Intro to the Alfresco Public APIIntro to the Alfresco Public API
Intro to the Alfresco Public API
 
AWS Community Day Bangkok 2019 - Build a Serverless Web Application in 30 mins
AWS Community Day Bangkok 2019 - Build a Serverless Web Application in 30 minsAWS Community Day Bangkok 2019 - Build a Serverless Web Application in 30 mins
AWS Community Day Bangkok 2019 - Build a Serverless Web Application in 30 mins
 
Best practices in using Salesforce Metadata API
Best practices in using Salesforce Metadata APIBest practices in using Salesforce Metadata API
Best practices in using Salesforce Metadata API
 
Dev day paris020415
Dev day paris020415Dev day paris020415
Dev day paris020415
 
Hands-on Workshop: Intermediate Development with Heroku and Force.com
Hands-on Workshop: Intermediate Development with Heroku and Force.comHands-on Workshop: Intermediate Development with Heroku and Force.com
Hands-on Workshop: Intermediate Development with Heroku and Force.com
 
Relational Won't Cut It: Architecting Content Centric Apps
Relational Won't Cut It: Architecting Content Centric AppsRelational Won't Cut It: Architecting Content Centric Apps
Relational Won't Cut It: Architecting Content Centric Apps
 
Building Content-Rich Java Apps in the Cloud with the Alfresco API
Building Content-Rich Java Apps in the Cloud with the Alfresco APIBuilding Content-Rich Java Apps in the Cloud with the Alfresco API
Building Content-Rich Java Apps in the Cloud with the Alfresco API
 
SFDC Lightning Demo
SFDC Lightning DemoSFDC Lightning Demo
SFDC Lightning Demo
 
Benefits of the CodeIgniter Framework
Benefits of the CodeIgniter FrameworkBenefits of the CodeIgniter Framework
Benefits of the CodeIgniter Framework
 
Connecticut Salesforce Developer Group - Jan 2017
Connecticut Salesforce Developer Group - Jan 2017Connecticut Salesforce Developer Group - Jan 2017
Connecticut Salesforce Developer Group - Jan 2017
 
Our API Evolution: From Metadata to Tooling API for Building Incredible Apps
Our API Evolution: From Metadata to Tooling API for Building Incredible AppsOur API Evolution: From Metadata to Tooling API for Building Incredible Apps
Our API Evolution: From Metadata to Tooling API for Building Incredible Apps
 
Alfresco As SharePoint Alternative - Architecture Overview
Alfresco As SharePoint Alternative - Architecture OverviewAlfresco As SharePoint Alternative - Architecture Overview
Alfresco As SharePoint Alternative - Architecture Overview
 
Intro to Alfresco for Developers
Intro to Alfresco for DevelopersIntro to Alfresco for Developers
Intro to Alfresco for Developers
 
SharePoint Mobile App Development with Xmarin
SharePoint Mobile App Development with XmarinSharePoint Mobile App Development with Xmarin
SharePoint Mobile App Development with Xmarin
 

Recently uploaded

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Recently uploaded (20)

Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 

Alfresco for Salesforce

  • 1. Alfresco for Salesforce 5 November 2013 / 13 November 2013 Will Abson (wabson@alfresco.com) Jared Ottley (jottley@alfresco.com) Gregory Melahn (greg.melahn@alfresco.com) #SummitNow
  • 2. Agenda • Part One (Business) o Overview and Demonstration • Part Two (Technical) o How it Works o Building on Salesforce o Building on Alfresco #SummitNow
  • 4. What does the App do? • Allows Salesforce Users to attach Documents to Salesforce Objects and have them stored in Alfresco o Four Specific Salesforce Object Types supported ▪ Accounts ▪ Cases ▪ Contracts ▪ Opportunities • Allows Salesforce Users to Edit, View and • Delete the attached Alfresco Documents#SummitNow Creates Chatter about the Alfresco Documents
  • 5. Finding the App • Go to the Salesforce App Exchange • https://appexchange.salesforce.com/ Enter some search criteria (e.g. ‘Alfresco’) o #SummitNow
  • 6. The App Exchange Listing #SummitNow
  • 11. Alfresco and SF Components Properties Config Adv. Search Form Alfresco Share Apex Classes VisualForce Pages Security Profiles Salesforce Model Alfresco Repository Sample Layouts Salesforce #SummitNow
  • 12. Salesforce Model Salesforce Record 1 Stored in <site>/Salesforce Records 0..N Salesforce Attachment Assoc Stored in <site>/documentLibrary/Salesforce Attachments Additional Aspects CRM Account Document Type CRM Contract CRM Case CRM Opportunity #SummitNow
  • 13. Application Packaging On the Salesforce side o o (??) Deployed on the AppExchange On the Alfresco side (MyAlfresco only) o o Repo AMP ▪ salesforce-repo-1.0.0.amp Share AMP ▪ salesforce-share-1.0.0.amp #SummitNow
  • 14. How it Works Web browser A O PI: C Au M th IS + Salesforce Users #SummitNow
  • 15. How it Works Web browser Upload: OAuth + CORS + CMIS A O PI: C Au M th IS + Salesforce Users #SummitNow
  • 16. How it Works - Downloading a File Web browser O CM Au t IS h + Salesforce Users 1. User clicks Download link for a file 2. Salesforce-side code checks the user’s access token is still valid o If not valid, the token is refreshed 3. Salesforce-side code checks the document is present in Alfresco, providing nodeRef o If not present, the user is forwarded to a ‘page not found’ page 4. Salesforce-side code access the content of the file from Alfresco Cloud via CMIS and #SummitNow streams it back to the user
  • 17. How it Works - Uploading a File Web browser OAuth + CORS + CMIS O CM Au t IS h + Salesforce Users 1. User clicks Attach File button in their browser, taken to New Document page 2. User selects file, enters Document Name and Document Type (drop-down) and hits Save 3. Page fires off POST request to trigger Apex remote action in Salesforce-side code, which creates empty content item in the Document Library 4. Browser does a CMIS PUT directly against Alfresco Cloud to upload the content itself o This works around Salesforce request body #SummitNow size restrictions o Access token from
  • 18. Cloud Sync OAuth + CORS + CMIS Corporate Users O CM Au t IS h + Web browser Sync Salesforce Users Firewall Remote Office #SummitNow
  • 19. Building on Salesforce Apex Visualforce *Does not include SOAP and REST APIs #SummitNow
  • 21. CMIS API Challenges - No CMIS Client • Force.com has no concept of libraries • Install packages from appexchange • Limited to what to is exposed by developer • Add classes from other projects • Count against you code total • No one has written a CMIS appexchange package • No one has written CMIS classses that could be added • Apex Web Callouts to CMIS endpoints #SummitNow • Governance Limits • Installer must approve connecting endpoints
  • 22. CMIS API Challenges - Tenant Id • Calls to Cloud CMIS API need tenant id • CMIS provides no way to discover tenant id • Two options: • User provides • Use REST API • https://api.alfresco.com • Apex JSON parser (requires new classes) • JSON objects: Reserved words • Limit to home network or ask user input #SummitNow
  • 23. CMIS API Challenges - Verbosity • CMIS is Verbose! • Can reduce a little using filters • Governance Limits Example: Alfresco.com • Alfresco.com site list is 400+ (and growing) • Document size is 2.5 MB Options: • Paging • CMIS Browser Bindings #SummitNow
  • 24. CMIS API Challenges - Parsing XML • Apex XML parser Gotcha: DateTime String dateString = property.getChildElement('value', CMIS_NS).getText(); dateString = dateString.replace('T', ' '); dateString= dateString.substring(0, dateString.length() - 6); relatedDoc.creationDate = DateTime.valueOf(dateString); #SummitNow
  • 25. CMIS API Challenges - Child Objects • Lacks support for including child objects If it did…. Governance Limit Heap Size Since it doesn’t… Governance Limit Callout Requests #SummitNow
  • 26. CMIS API Challenge - Delete CMIS API allows delete of relationship using objectId using: https://api.alfresco.com/alfresco.com/public/cmis/versions /1.0/atom/entry?id=assoc:4240216&allVersions=true Relationship MAY be deleted when the target is removed in a peer relationship (according to the spec). Any code should allow for a 404. Previously the relationship remained and target pointed to #SummitNow the archiveStore.
  • 27. CMIS API Challenges – Secondary Types •Lack of support of secondary types makes the the integration dependent on Alfresco extensions. •Secondary type support would allow client to fallback to base type. #SummitNow
  • 28. CMIS API Challenges - Sites folder Listing documents is achieved using a CMIS getObjectByPath call •We know the path of the Salesforce Record item - /Sites/<network- id>/Salesforce Records/<record-id> But, the Sites folder may not always be named 'Sites', e.g. 'Sitios'! •CMIS does not provide a way to specify a QName path, rather than a name path. So, we must find out what the sites folder is called, and store this •This is done when the user selects the site to be used for document storage. #SummitNow
  • 29. CMIS Workbench as Node Browser org.apache.chemistry.opencmis.binding.spi.type=atompub org.apache.chemistry.opencmis.binding.atompub.url=https:/ /api.alfresco.com/cmis/versions/1.0/atom org.apache.chemistry.opencmis.binding.auth.http.basic=fals e org.apache.chemistry.opencmis.binding.header.0=Authorizat ion:Bearer <oauth token> org.apache.chemistry.opencmis.binding.compression=true cmis.workbench.folder.includeAcls=false cmis.workbench.object.includeAcls=false cmis.workbench.version.includeAcls=false #SummitNow
  • 30. Salesforce Governance 10 Total number of callouts (HTTP requests or Web services calls) in a transaction 6 MB Total heap size 10,000 Maximum CPU time on the milliseconds Salesforce servers 5 MB File size limit #SummitNow http://www.salesforce.com/us/developer/docs/apexcode/
  • 31. Security Considerations Salesforce apply strict criteria to apps before they can be publicly listed on the AppExchange Partnership with Checkmarx to allow developers to check for common vulnerabilities in their Apex / Visualforce apps The AppExchange team are responsible for performing a final check across your app and any supporting services For Alfresco this covered the MyAlfresco service Developers do not have access to the tools used This feedback process takes (up to) 8 weeks #SummitNow
  • 32. Future Ideas Access Salesforce Content from Alfresco Salesforce Chatter API (plug) Avoiding Salesforce Governance limits Salesforce Canvas Framework Alfresco Embed #SummitNow
  • 33. Add permission set to multiple users Every user must have the ‘Alfresco Cloud Document Management User’ permission set applied to their account. This can be scripted through the Salesforce Developer Console. #SummitNow
  • 34. Example User u = [select id from User where <logic here>]; PermissionSet ps = [Select p.Id From PermissionSet p where p.label = 'Alfresco Cloud Document Management User']; PermissionSetAssignment psa = new PermissionSetAssignment(AssigneeId = u.id, PermissionSetId = ps.id); insert psa; #SummitNow
  • 35. More information Documentation https://appexchange.salesforce.com/servlet/servlet.FileDownload? file=00P3000000Hd94DEAR Salesforce App Exchange Listing https://appexchange.salesforce.com/listingDetail? listingId=a0N3000000B34XIEAZ #SummitNow
  • 37. Known Issues and Limits • • • • • • • We don’t support IE versions prior to IE 10 Maximum of number of documents that can be attached to a single Salesforce item is 100 Documents start out as V1.1, not 1.0 If you attach a document with the same name as an existing attachment to the same Salesforce Object, we name the attachment with a ‘-<n>’ suffix (up to three such attachments) Uploading a document that exceeds the Alfresco quota will fail, but a Salesforce Chatter entry will still be created (transactional integrity) The app uses the name of the Salesforce object to create the name of the folder in Alfresco where the files are uploaded. If you create two Salesforce objects with the same name, files attached to either object will be stored in the same folder Moderated sites that the Salesforce Admin is not yet a member of will still appear in the Sites dropdown #SummitNow
  • 38. Force.com Limitations No local deployment process, deploy process is via an external API with only an Ant task to integrate this into your workflow Namespacing Formats not well documented The process of certifying an app is opaque and non-trivial #SummitNow

Editor's Notes

  1. http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_gov_limits.htm