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
|
Step-by-step guide for Salesforce Lightning (setup on Salesforce)
-
Log-in to Salesforce with an account with the System Administrator Profile.
-
Click the gear icon in the header, then click Setup.
-
Type "Apps" in the Quick Find box and click App Manager under Apps.
-
Click New Connected App.
-
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.
-
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) scope
-
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.
-
Click Save.
-
Click to Reveal under API (Enable OAuth Settings) copy down the Consumer Secret, you will need to provide this to Templafy later.
-
Click Manage.
-
Click Edit Policies.
-
Ensure Admin approved users are pre-authorized is selected under OAuth policies / Permitted Users and select Relax IP restrictions under OAuth policies / IP Relaxation.
-
Click Save.
-
Click Manage Profiles under Profiles.
-
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").
-
Click Save.
-
Click the gear icon in the header, then click Developer Console.
-
Click File, then New, then Lightning Component.
-
Fill out the Name and click Submit.
-
Replace the contents with the following (where [ApiName] is the API Name you copied down earlier):
<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>
-
Click File, then Save.
-
In the sidebar, click Controller.
-
Replace the contents with the following:
({
buildParameters : function(component, event, helper) {
var parameters = '{"objectId":"' + component.get("v.recordId") + '","objectType":"' + component.get("v.sObjectName") + '"}';
component.set("v.parameters", parameters);
}
})
-
Click File, then Save and close the window.
-
Click the App Launcher icon (⠸⠸⠸), then click Sales.
-
Go to the page of an object of the type you want to set up document creation for.
-
Click the gear icon in the header, then click Edit Page.
-
Find the Lightning component with the name you filled out earlier in the Custom section in the left sidebar.
-
Drag and drop the component to where you want it on the page.
-
Click Save.
-
Click Activation... and ensure the page is set as the Org Default. If not, click Assign as Org Default, then Save.
Setup in Templafy
-
Open the Administration page for the tenant.
-
Click Settings under Administration.
-
Make sure Enable Templafy Desktop and Enable Transformation pipeline (requires Templafy Desktop) under Features are enabled.
-
Click Save.
After finishing the above steps, please reach out to Templafy and provide your domain and consumer secret.
Comments
0 comments
Article is closed for comments.