When setting up an Attachment object mapping, you have the option to map which PDF template to send to Salesforce.
Let’s take it step by step.
If you have no object mapping created, all you have to do is click on Add primary object.
You have to look for Attachment in the Salesforce object dropdown.
Once selected, the rest of the fields will be automatically preselected based on the Salesforce object: Parent ID, File name & Body.
For the Body Salesforce field, you have several options to choose from: Custom value, Lookup result, PDF submission, Query result and Lookup relationship. In this article, we are going to focus on PDF submission.
If you want to map Body Salesforce field to a PDF submission, you will have to have an email notification set up with a PDF attached to it. Otherwise, there will be no option to choose from.
For this article, we have set up an Application form that has an email notification created, with 2 PDFs attached to it: the standard PDF and the form layout PDF.
When going back to set up the Attachment object, for the Body field – PDF submission, you have an additional dropdown, with the text Select a PDF template. Once clicked, it will open up all the email notifications that you have created on the form with the PDFs that are attached to it.
For example, in our scenario, we have an email notification with the subject “You received a submission for Application form” with 2 PDFs attached to it: Submission PDF and Application form. In this case, when opening the “Select a PDF template dropdown”, you will be able to see each email notification with its subject in order to be easily identifiable and every PDF that is attached to that email notification.
If you have more than one email notification with PDF attachments to it, you will be able to identify which PDF you want to map as each email notification will appear with its subject (You received a submission… or Confirmation email, in our scenario), together with the PDFs that are attached to each email notification.