Merge Salesforce files (PDF, DOCX) with APEX

Last updated Jul 28 2020

In this video, we will show you how to Perform a custom merge to Salesforce files with APEX (using the FormTitan API).

Following are the steps:

* Before starting, please note that:
- your API needs to be enabled.
- the Salesforce button should be enabled, on your form document template.
- If you are merging the Word template and PDF template, make sure that the output for the word template is PDF.

1- Class setup


2- Setup email data to send to FormTitan. 
This will determine where the merged document link will be sent to, the email subject and body.


3- Setup an object to update in Salesforce -  this will run after the merge process is done.


4-  Construct the list of records and forms to you'd like to merge.
In this instance, sending 5 accounts, and 3 contacts for merge.


5- Build the request object.


6- Finally build and send the Http request to TITAN.



CommentsLogin Required
Didn’t find what you were looking for?
Try the following for assistance or Use the Search box.