Articles in this section

Salesforce integration configuration - Lightning

Depending on your Salesforce version, you will need to follow either the guide for Salesforce Lightning (this one), or the guide for Salesforce Classic: Salesforce integration configuration - Classic 

Should any issues arise during setup, please reach out to our support team at support@templafy.com.

 

About the Salesforce integration

A Salesforce integration is available for Templafy which works via a Canvas App in Salesforce. This allows showing a Templafy Create Document on object pages in Salesforce (for example for contract pages, account pages, etc.) which, when clicked, will transfer data about the object to Templafy. This data can then be used to fill out placeholders in templates when creating a document. The finished document can be uploaded as an attachment to the Salesforce object directly from Templafy.

 

Prerequisites 

 
  • System Administrator access to the Salesforce instance for which the integration is to be setup
  • Admin access to the Templafy tenant for which the integration is to be setup 
  • Ensure that you have set up a custom domain for your Salesforce URL. You can check this by going to Settings > Company Settings > My Domain. If not, follow the guide on the page to set one up, wait to receive an email about the domain having been activated, then login to the new domain. Go back to Settings > Company Settings > My Domain and activate the domain for all users.

 

Step-by-step guide for Salesforce Lightning (setup on Salesforce)

  1. Log-in to Salesforce with an account with the System Administrator Profile.

  2. Click the gear icon in the header, then click Setup.

  3. Type "Apps" in the Quick Find box and click App Manager under Apps.lightning_salesforce1.png

  4. Click New Connected App.lightning_salesforce2.png

  5. Fill out the Basic Information with Connected App Name, API Name and Contact Email following the example below. Copy down the API Name, you will need this later.

    lightning_salesforce3.png

  6. Check Enable OAuth Settings under API(Enable OAuthSettings). Set the Callback URL to your Templafy tenant URL. Select and add the Access and manage your data (api) and Perform requests on your behalf at any time (refresh_token, offline_access) scopelightning_salesforce4.png

  7. Enable Canvas, set the Canvas App URL to https://[tenantId].templafy.com/salesforce?tenantId=[tenantId] (where [tenantId] is the customers subdomain), set Access Method to Signed Request (POST), select and add the Layouts and Mobile Cards and Lightning Component locations. lightning_salesforce5.png

  8. Click Save.

  9. Click to Reveal under API (Enable OAuth Settings) copy down the Consumer Secret, you will need to provide this to Templafy later.lightning_salesforce6.png

  10. Click Manage.

  11. Click Edit Policies.

  12. Ensure Admin approved users are pre-authorized is selected under OAuth policies / Permitted Users and select Relax IP restrictions under OAuth policies / IP Relaxation.lightning_salesforce7.png

  13. Click Save.

  14. Click Manage Profiles under Profiles.lightning_salesforce8.pnglightning_salesforce9.png

  15. Check off all user groups (profiles) that should have access to the canvas app. As minimum, Standard User should be checked off. (Add "System Admin when setting up on test tenant").lightning_salesforce10.png

  16. Click Save.

  17. Click the gear icon in the header, then click Developer Console.lightning_salesforce11.png

  18. Click File, then New, then Lightning Component.lightning_salesforce12.png

  19. Fill out the Name and click Submit.lightning_salesforce13.png

  20. Replace the contents with the following (where [ApiName] is the API Name you copied down earlier):lightning_salesforce14.png

<aura:component implements="flexipage:availableForRecordHome,force:hasRecordId,force:hasSObjectName" access="global" >
    <aura:attribute name="parameters" type="String"/>
    <aura:handler name="init" value="{!this}" action="{!c.buildParameters}"/>
    <force:canvasApp developerName="[ApiName]" parameters="{!v.parameters}" width="infinite" height="44" />
</aura:component>
  1. Click File, then Save.

  2. In the sidebar, click Controller.

  3. Replace the contents with the following:lightning_salesforce15.png

({
    buildParameters : function(component, event, helper) {
        var parameters = '{"objectId":"' + component.get("v.recordId") + '","objectType":"' + component.get("v.sObjectName") + '"}';
        component.set("v.parameters", parameters);
    }
})
  1. Click File, then Save and close the window.

  2. Click the App Launcher icon (⠸⠸⠸), then click Sales.

  3. Go to the page of an object of the type you want to set up document creation for.lightning_salesforce16.png

  4. Click the gear icon in the header, then click Edit Page.lightning_salesforce17.png

  5. Find the Lightning component with the name you filled out earlier in the Custom section in the left sidebar.lightning_salesforce18.png

  6. Drag and drop the component to where you want it on the page.lightning_salesforce19.png

  7. Click Save.

  8. Click Activation... and ensure the page is set as the Org Default. If not, click Assign as Org Default, then Save.lightning_salesforce20.png

 

Setup in Templafy

  1. Open the Administration page for the tenant.

  2. Click Settings under Administration.

  3. Make sure Enable Templafy Desktop and Enable Transformation pipeline (requires Templafy Desktop) under Features are enabled.lightning_salesforce21.png

  4. Click Save.

 

After finishing the above steps, please reach out to Templafy and provide your domain and consumer secret.

 

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Article is closed for comments.