+ Start a Discussion
Jeremy MasonJeremy Mason 

Process Builder: Creating Campaign Member on 'Campaign Status'

Hello, 

I'm trying to add all campaign members with status of "SQL" to a parent campaign called, "All SQLs". It looks pretty straightforward, but I don't know if it works. 

Here is what I did: 

1. Object is "Campaign Member" and set to execute when created or edited
2. Only one condition, campaign member status is "SQL"
3. Action type is "Create a Record". Record type is "Campaign Member". Set object variables are "Campaign ID", which is where I want the member to be assigned, and "Status" is "SQL". 

Need I do anything more to scan my system for members of any campaign with status "SQL" and add them to this campaign ID with a status of "SQL"? 
   

Mabye the better question is how long should I wait to know if it worked or where do I go to see if my flows in PB have found any matches...? 

Thank you,

Jeremy
Best Answer chosen by Jeremy Mason
Jason Curtis NBSFDGJason Curtis NBSFDG
Jeremy, try creating your flow without updating the status on the campaign you are inserting into. That it what is causing me an issue--don't have a workaround yet.

All Answers

Jason Curtis NBSFDGJason Curtis NBSFDG
Jeremy, I did a quick prototype based on your logic and this worked well. For existing campaign members of your child campaign that you want added to your parent campaign you'll need to "edit" them to populate the parent campaign.
One thing, you can dynamically associate the child parent id's based on the camp member's campaign and then the parent camp id on that record.
The main question I have though is are you trying to keep the parent and child campaigns perfectly in sync? What about if a member is deleted, do you need to track that?
Jeremy MasonJeremy Mason
Thanks, Curtis. Just an FYI to all of those newbs like me, I ran into an error (below post), because I think a Campaign Member ID is required, which seems odd. I want to create a new campaign member every time someone hits the status, so I'm not sure a specific ID will work. 

Anyone have any ideas? 

Encountered unhandled fault when running process Add_campaign_members/30170000000TT6p exception by user/organization: 00570000002DK0Z/00D70000000JVf7
Errorcaused by element : FlowRecordCreate.myRule_1_A1
caused by: UPSERT --- UPSERT FAILED --- ERRORS : (REQUIRED_FIELD_MISSING) Attempted to add a campaign member where either the member id 'null' or the campaign id '70170000000W5Q4' is null. --- for SFDC record with ID : null, (REQUIRED_FIELD_MISSING) Attempted to add a campaign member where either the member id 'null' or the campaign id '70170000000W5Q4' is null. --- for SFDC record with ID : null,


An error occurred at element myRule_1_A1.
UPSERT --- UPSERT FAILED --- ERRORS : (REQUIRED_FIELD_MISSING) Attempted to add a campaign member where either the member id 'null' or the campaign id '70170000000W5Q4' is null. --- for SFDC record with ID : null, (REQUIRED_FIELD_MISSING) Attempted to add a campaign member where either the member id 'null' or the campaign id '70170000000W5Q4' is null. --- for SFDC record with ID : null, .

This report lists the elements that the flow interview executed. The report is a beta feature.
We welcome your feedback on IdeaExchange
Flow DetailsFlow Name: Add_campaign_members
Type: Workflow
Version: 2
Status: ACTIVE
 
Flow DetailsStart time(GMT): Wed Jun 17 14:22:27 GMT 2015
End time(GMT): Not Yet Finished
Duration: 0 seconds
 
Decision: myDecision 
Record Create: myRule_1_A1Salesforce Error ID: 218932797-16736 (294654785)
 
Jason Curtis NBSFDGJason Curtis NBSFDG
Jeremy, can you post some screenshots of how your flow is setup? That might help pinpoint the problem.
Jeremy MasonJeremy Mason
Thanks!!! Does this work, please? Lead ID not present, since Leads will not be candidates. 

slide 1

slide 2

slide 3
Jason Curtis NBSFDGJason Curtis NBSFDG
Hmmm, good news is I've been able to replicate the problem. When I did a prototype yesterday I didn't notice that although I was only adding members from a child campain to a parent campaign when the status was "SQL", on the parent campaign the status was "Sent" because I hadn't set "SQL" as a member status value. When I did set it as a value my flow started failing. I'll look into a little more.
Jason Curtis NBSFDGJason Curtis NBSFDG
Jeremy, try creating your flow without updating the status on the campaign you are inserting into. That it what is causing me an issue--don't have a workaround yet.
This was selected as the best answer
Jeremy MasonJeremy Mason
Good info. I will try removing the status change element. Maybe I can create a “capture” campaign for MQLs and one for SQLs and automate score increases from membership in those campaigns.
Jeremy MasonJeremy Mason
Mr. Curtis, you are a god-man of the Salesforce universe. I am in your debt, sir.