Alfresco Integration With SalesForce

  • 0
Alfresco_Integration_with_Salessforce

Alfresco Integration With SalesForce

Tags : 

Introduction:

We will connect two important aspects of the business, Customer Relationship and Customer/Vendor Documents. Basically, we are connecting SalesForce(CRM) and Alfresco (ECM). SalesForce limits storage of document based on the edition subscribed/used by the customer. Also, modules in SalesForce storing documents are silos. So, Alfresco ECM helps to overcome the limit of storage and share documents across modules. Alfresco is complete ECM and provides features needed for Document Management. Started by ECM industry veterans and built on open standards and open source infrastructure, it provides simplicity, power, and flexibility at a lower cost than many alternatives. Alfresco provides document, content, and record management and collaboration software to 1100 enterprise customers in 40 countries.

Benefits of Integrating SalesForce with Alfresco:
The Alfresco Integration for Salesforce offers full document management capabilities to sales teams and other Salesforce CRM users. Integrating Alfresco with SalesForce increases sales productivity by reducing emails, cost, time, and enabling easy accessing to deal document anytime, anywhere even by non-SalesForce users.
Few concrete benefits of such integration are:
  • Better search capability from SalesForce leveraging best search feature of Alfresco.
  • Content limitation in SalesForce based on the edition used by customer limits sales team to upload document and manage it, so Alfresco Integration allows to upload unlimited document leveraging best central respository engine
  • To leverage good features of ECM like Alfresco, where customer wants versioning, workflow management, custom metadata, transforming documents to PDF or  image, tagging, editing with Microsoft office, deletion, collaboration with prospects or partners etc
  • SalesForce have document storage features in Chatter, Notes & attachment, Knowledge base, Libraries, Document, these documents can be stored to Alfresco in more structural leverage all ECM features. SalesForce modules where document is stored are silos so in order to share documents among each other could be possible using Alfresco Rest API
  • Access to content for non-Salesforce users
  • Extend content access to mobile devices
Technical Details:
Alfresco and SalesForce partnership have launched an app in SalesForce connecting Alfresco cloud and then syncing document to on-premise instance using sync feature. But with custom development leveraging CMIS and Rest API features supported by Alfresco, we can connect SalesForce to on-permise Alfresco installation in order have secure documents behind firewall as requested by most of the customers.
Below shows a Basic Connection Architecture:
Architecture_0

  • 0
banner-javascript

Run javascript function as admin privileges

Tags : 

  • In Alfresco, create group, user, add user to group, set permission are allowed only
    to Admin group users.
  • Many times we get a requirement where we need to create group and users dynamically
    on some action.
  • Now javascript API are available to create group but works only for Admin group
    users.
  • I had a requirement to create groups dynamically when rule is executed. But rule was
    executed action taken by non-admin user.
  • So I created custom javascript API to run entire javascript function as Admin
    privileges.
  • For this you have to create one Java class which
    extends BaseScopableProcessorExtension. BaseScopableProcessorExtension class is extended whenever you want to create
    custom javascript API.
  • Register your javascript API in *-context.xml
  • Then use your API in your javascript.
  •     public class RunAsAdminUtil extends BaseScopableProcessorExtension {
          /** 
          * This method runs javascript function with Admin privileges 
          * @param func 
          *
          */ 
          public void runAsAdmin(final Function func) { 
            final  Context cx = Context.getCurrentContext(); 
            final Scriptale scope = getScope();
            RunAsWork raw = new RunAsWork() { 
              public Object doWork() throws Exception {
                func.call(cx, scope, scope, new Object[] {}); return null; 
              } 
            };
            AuthenticationUtil.runAs(raw,
            AuthenticationUtil.getSystemUserName()); 
          } 
        }
    

    Below is the *-contex.xml entry,   runAsAdminUtil Below is the code of javascript where you would be using custom created javascript api to run function with admin privileges
    function main() { if
    (!people.isAdmin(person)) { //if current logged in user is not admin
    run function with admin privileges
    runAsAdminUtil.runAsAdmin(createGroupsDynamically); }else{
    createFolderStructureFromTemplate(); } } var createGroupsDynamically =
    function createGroupsDynamically() { var name =
    document.properties.name; var TEST_READ = name + '_read'; var
    TEST_WRITE = name + '_write'; people.createGroup(TEST_READ);
    people.createGroup(TEST_WRITE); } main();