0

I work at a company that runs summer programs. One of our vendors is sending us approximately 1,000 student grade reports as PDFs. The files will all be named consistently (i.e. John Doe Grade Report.pdf). There is only one file per student. We have a custom student object in our Salesforce implementation with various other data tracked. My question has two parts:

1) Can we bulk-upload these PDFs to Salesforce and associate them with the particular student record? For example, can John Doe Grade Report.pdf get attached to John Doe's record, Jane Doe Grade Report.pdf get attached to Jane Doe's record, etc.

2) Can we write a mass-email that pulls in these reports as an attachment. It would look something like this, ideally:

Dear {Name Merge Field},

Your grades are attached. Thank you.

Attachment Name Grade Report.pdf

The attachment would pull the PDF attachment from the particular field we make in the custom student object.

Is there any way to (somewhat) easily do this? We're not opposed to diving into Apex code a bit if needed or pull in an App Exchange app if this isn't possible in Salesforce alone.

2 Answers 2

0

1) Can we bulk-upload these PDFs to Salesforce and associate them with the particular student record? For example, can John Doe Grade Report.pdf get attached to John Doe's record, Jane Doe Grade Report.pdf get attached to Jane Doe's record, etc.

YES - You can use Data Loader to upload attachments to Salesforce. Before uploading attachments, note the following:

If you intend to upload via the Bulk API, verify that Upload Bulk API Batch as Zip File on the Settings | Settings page is enabled.

To upload attachments: Confirm that the CSV file you intend to use for attachment importing contains the following required columns (each column represents a Salesforce field): 1. ParentId - the Salesforce ID of the parent record. This will be Salesforce ID of a Student Record. 2. Name - the name of the attachment file, such as testPDF.pdf. 3. Body - the absolute path to the attachment on your local drive. Ensure that the values in the Body column contain the full file name of the attachments as they exist on your computer. For example, if an attachment named testPDF.pdf is located on your computer at C:\Export, Body must specify C:\Export\testPDF.pdf.

2) Can we write a mass-email that pulls in these reports as an attachment. It would look something like this, ideally:

YES- This will involve a apex code.

  1. If you want to send an email to a Student when attachment is inserted into SFDC then you need to write a trigger code. Trigger code can contain a logic to send an email to Student Record.
  2. The another possible solution will be to write a Batch apex class, which will run on a daily basis. It will identify all the attachments which are uploaded on that day, It will find out the associated students and send email to those student records along with their PDF as an attachment.
0

To address your questions:

1. Bulk-uploading PDFs to Salesforce and associating them with specific records:

Yes, you can achieve this by using Salesforce's Data Loader or Data Import Wizard to bulk upload the PDF files and associate them with the respective student records. You'll need a unique identifier in your PDF filenames that matches with a field in your custom student object (e.g., student name, student ID). This unique identifier will be used to map the PDFs to the correct student records during the upload process.

You can utilize the Mass File Upload AppExchange application to streamline the bulk upload process of PDFs and associate them with the corresponding student records in Salesforce. This application simplifies the task, saving time and ensuring data accuracy. You can learn more about it, including a demo video and test drive, at https://appexchange.salesforce.com/appxListingDetail?listingId=82cf236b-1ee8-4ea7-aebf-fd0c89fb93bd

2. Sending mass emails with attached PDFs from Salesforce:

You can accomplish this by creating a custom email template in Salesforce that includes merge fields for the student's name and the attachment field containing the PDF. Then, you can use Salesforce's Mass Email feature to send emails to your recipients. However, Salesforce's native Mass Email feature does not support attaching files directly from object records.

To attach PDFs dynamically from the custom student object, you may need to write custom Apex code. One possible approach could involve creating a Visualforce email template with custom controller logic to retrieve the PDF attachments from the student records and attach them to the outgoing emails. Alternatively, you could explore integration with an external document management system that allows you to link files to Salesforce records and then include download links in your mass emails.

Disclaimer: I work at Satrang Technologies, the publisher of this Mass File Download ad Mass File Upload AppExchange App.

Thanks, Nikita

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .