How to add Campaign Members using Salesforce1 app — without coding!!!

KK Ramamoorthy
my journey with salesforce1 platform
6 min readSep 22, 2015

Photo credit: Stereolist.com / Foter / CC BY-NC-ND

One of the pet peeves of Salesforce1 app users is that it doesn’t support adding campaign members to campaigns. Added to that, although you could view the campaign members, out of the box, the related list for campaign members would only display the ‘Status’ field. There is the work around for displaying the key fields of campaign members in the related list as documented in this KB article — https://help.salesforce.com/HTViewSolution?id=000198720&language=en_US

In this blog, I am providing a way of adding campaign members using Salesforce1 without coding. The high level approach here is to use a combination of quick actions and process builder process to achieve our objective.

It is assumed that you have basic working knowledge of process builder and quick actions. If not, please get yourself up to speed here — https://developer.salesforce.com/trailhead/business_process_automation/process_builder

The high level approach is to create custom fields on campaigns object and use these custom fields in a quick action to update the campaign record. Then use process builder to use the value from these custom fields to create the campaign members.

Step 1
Create three custom fields (Campaign Contact, Campaign Lead and Campaign member status) in the ‘Campaign Object. Make sure that you don’t place these fields in any page layouts. Please check the screenshots for the field type and required pick list values.

Campaign Contact:

Campaign Lead

Campaign Member

Step 2
Create a quick action of type ‘Update Record’ on the campaign object using the menu Setup->Customize->Campaigns->Buttons, Links and Actions->New Action. Call it ‘Add Member’.

If required, you can use your own icon for this action. You will have to upload this icon as a static resource (Setup->Build->Develop->Static Resources->New) before being able to use it in quick action. You can download free icons from the google material design site — https://www.google.com/design/icons/.

Step 3
Once you create the quick action, you can use the layout editor of the quick action to place the following fields on the layout

Step 4
Using the ‘Predefined Values’ section of the quick action, preset the custom status field value to ‘Sent’ or any other value to meet your requirement

Step 5
Using the page layout editor, place this quick action in your page layout(s) for Campaigns . Note that you will place this quick action in the ‘Actions in Salesforce1 Action Bar’ section

Step 6
Create a new process builder step. Call it ‘Campaign Processes’ for example. This process will be on the ‘Campaign Object’.

Step 7
Add a decision criteria for checking if the the custom ‘Campaign Contact’ field is ‘Not Null’ and ‘Has Changed’. See screenshot below

Step 8
Add an immediate action of type ‘Create Record’ for object ‘Campaign Members’. This step will create the campaign members with Contact ID as the ‘Custom contact’ selected by the user and the ‘Status’ as the custom status field value chosen by the user. Please see screenshots below

Step 9
Add another immediate action to clear the values of the custom fields. You can do this by executing an action of type ‘Update Record’ on campaign object

Step 10
Add another decision criteria to the ‘false’ branch of the decision criteria in step 7. Here you will create similar actions for the ‘Lead custom field’.

Step 11
Add an immediate action step to the ‘true’ branch of the decision criteria created above. This action of type ‘Create Record’ on ‘Campaign Members’ object

Step 12
Add another immediate action to clear the values of the custom fields. You can do this by executing an action of type ‘Update Record’ on campaign object

Step 13
Save and Activate your process. Your process should look like below

Step 14
You are all set now. Your users should be able to add campaign members using Salesforce1.

Some caveats to note:

  • You will still need custom development to ‘edit’ the campaign member records. The above process will only let you add new members
  • I haven’t tested this in a production environment. Please use at your own risk while implementing in your landscape.

Summary

Salesforce1 app let’s you perform many functions on the go. However, not all functionality of the full Salesforce site is available in Salesforce1 app, yet. This gap is continuing to reduce with every release and until then, we can use the other capabilities of the platform to achieve some of these functionality.

Now, the fine print.. At the time of writing this blog, I am employed with Salesforce as an Architect. However, any code samples and declarative approach provided here are purely for experimental purposes and comes with no warranty or support. Matter of fact, all opinions and approach provided in this blog are purely my own and has nothing to do with my employer. It is assumed that you have the right Salesforce configuration and coding skills and will use the ideas presented here as you see fit, in your landscape. The primary purpose of this article is just to share the knowledge and my own experience. Nothing more, nothing less. Use this approach at your own risk

Originally published at kksfblog.wordpress.com on September 22, 2015.

--

--

KK Ramamoorthy
my journey with salesforce1 platform

Digital Tinkerer @awscloud; Love tech; it pays my bills as well, gadgets lover, handyman! Opinions are mine, not necessarily that of my employer