Webform File Upload and Campaign as Salesforce Lead Attachment screenshot

This project is not covered by Drupal’s security advisory policy.

What is this module?

This module serve two purpose:
1. This module will push the attachment files to salesforce and add them to leads.
2. Attaching campaigns to the leads generated by webform. It's a very specific case.

When to use?

File attachment to leads in SF: If you are collecting any file from user in the webform and want to push it to SF as lead attachment then this module is for you.

Campaign attachment: if you are running a campaign and generating leads through that then you probably want to use it.

How to use?

File attachment to leads in SF settings:

Pre-requirements:

1. First make sure you have webform setup with minimum 4 fields(first name, last name, email and company) which is required to create a lead record in SF.
2. We also need at least 1 file field which will be used to push as lead attachment

Setup:

1. Go to '/admin/structure/salesforce/mappings' and make sure all 4 lead fields are properly mapped with SF fields. Make sure the leads are getting generated on webform submission.
2. Now, enable the module and go to webform build tab -->Click on edit button for the file field --> You will see new properties available under "Salesforce Level Settings", There is a checkbox setting as " Use this field to push the file to salesforce leads??". Check this box and this field data would be used at file attachment.

Campaign attachment to leads in SF settings:

Pre-requirements:

1. Same as previous, we need 4 fields to create lead record in SF
2. Go to your SF homepage --> Click on campaign tab (if not available search it) --> Click on the campaign you want to use[You can also automate it as custom entity and pull from salesforce] --> In the URL, you will find campaign ID like: 701Q0000000bgxxxxx --> Copy it and paste it in notepad

Setup:

1. Go to '/admin/structure/salesforce/mappings' and make sure all 4 lead fields are properly mapped with SF fields. Make sure the leads are getting generated on webform submission.
2. Now, if this module is enabled then go to webform build tab -->Click on edit button for any field --> You will see new properties available under "Salesforce Level Settings", There is a textfield setting as "Campaign ID". Paste the campaign ID you copied in your notepad to here.

Possible Future Work

1. Multiple file push to single lead record
2. Custom generated file instead of file field (That was my case, can share the code if needed)
3. Multiple campaign attachment with single lead

Note: Thanks to akarmalkar for sharing the boilerplate code here: File Upload feature is missing

Supporting organizations: 
infrastructure

Project information

Releases