Question

Salesforce > Mailchimp Update Zap Help

  • 11 January 2022
  • 11 replies
  • 104 views

I inherited Zapier from a much more technically learned colleague and am at a bit of a loss as to the best way to fix some holes in the original Zaps he set up and their performance.

We have SalesForce and MailChimp, and wanted Zapier to trigger every time a new Contact was added or a Contact was edited in SalesForce, and push those changes/new contacts into a MailChimp audience. 

Originally, we thought this had been achieved with a single Zap, an Add/Change action triggered by an updated record in SalesForce. I subsequently discovered this was only revising existing Contacts, and adding new Contacts to MailChimp if a previously newly created SalesForce contact was then edited.

I simply duplicated that Zap and made the Trigger for the new Zap “new record” rather than “updated record”. Great. Sorted. 

However, we’ve also now realised that since several fields on a SalesForce Contact are pulling through information from the associated Organisation record, they aren’t triggering the Zaps when they’re edited. One of these fields is quite important and does need to update on MailChimp, because it is essentially “lead status”, and defines what type of marketing the Contacts associated with a particular Organisation receive.

Long story short, then, what I need is a Zap that triggers when a change is made to an Organisation in SalesForce, looks up all the associated contacts, and pushes those changes through to those contacts on MailChimp. I’ve approached a member of the Zapier support team, and they didn’t have any ideas (other than regular, manual bulk updates to MailChimp) and pointed me here. 

Unfortunately, I have absolutely no idea what that looks like, or how to build that Zap. The last Zap I created was literally a slightly altered duplicate of an existing, working Zap. I’ve never built one from scratch. Can I mildly alter a duplicate of my existing Zap to have a different Trigger (Organisation object change rather than Contact Change/New Contact) and different Action steps between that Trigger and the “Add/Update subscriber in MailChimp” step? If so, what do the actions need to be?

If that’s not possible and I need a new Zap built from scratch, what does that need to look like?

And if that’s not possible, I’ll have to look at SalesForce itself and see whether I can

  1. reverse the Dependency between Contact and Organisation on those fields, so that it’s a Contact level change rather than an Organisation level change
  2. make it so that they are “related” but not “dependent” in some way? basically find a way to make the change in that field Trigger the Zap
  3. look at making these new, custom fields at Contact level rather than Organisation level, which is the absolute last resort… because adding extra layers and complexity to a Salesforce record is the absolute last thing I want to have to do, particularly given it will mean tweaking the Zaps that I already don’t know how to use, again.

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

11 replies

Userlevel 7
Badge +14

Hi @lauraatcapture 

If the Zaps are triggered by changes to an Organization record, and the related Contact records IDs come thru to the Zap trigger, then you can use the Looping app to iterate over each: https://zapier.com/apps/looping/integrations

 

Perhaps consider hiring a Zapier Expert to help: https://zapier.com/experts

Hi @lauraatcapture 

If the Zaps are triggered by changes to an Organization record, and the related Contact records IDs come thru to the Zap trigger, then you can use the Looping app to iterate over each: https://zapier.com/apps/looping/integrations

 

Perhaps consider hiring a Zapier Expert to help: https://zapier.com/experts

 

Would this be if a NEW Zap’s trigger was Organisation record changes? Sorry, almost everything you said was greek to me.

Because my issue is that the current Zaps are NOT triggering when an organisation record change occurs, despite the fact that within SalesForce, the contact records ARE pulling that changed data through. That change just doesn’t Trigger the Zap. 

Userlevel 7
Badge +14

@lauraatcapture 

Changes to Organizations and changes to Contacts may be different Zap triggers, even if those records are linked in Salesforce.

If you want changes to an Org to update the related/linked Contacts, then the Org is probably going to be the Zap trigger.

@lauraatcapture

Changes to Organizations and changes to Contacts may be different Zap triggers, even if those records are linked in Salesforce.

If you want changes to an Org to update the related/linked Contacts, then the Org is probably going to be the Zap trigger.

 

Okay, and I’d need Looping to create a Zap that essentially said: if this Org level change triggers > Do this action for > all associated contacts

Which requires me to both know how to build the Zap, and now learn Looping as well. 

*dies inside*

Userlevel 7
Badge +14

@lauraatcapture 

Might be worth spending some time learning about Zap Basics: https://zapier.com/help/create/basics

Yes, Looping is an advanced functionality of Zaps.

Perhaps consider hiring a Zapier Expert to help: https://zapier.com/experts

Userlevel 7
Badge +11

Hey@lauraatcapture!

I’ve tried to simplify/clarify how Looping works in this article:

That should link you directly to the section that seems to be relevant, about how to use line items (which is what the contacts would be, to that organization). Then the first example I used gives you an idea of how to put it all together.

It can be intimidating at first, but think of it as a container inside of which you place the things that you’d like to loop through. The steps you add inside of that container (Looping by Zapier) will run for each of the items coming from the loop setup (text, line items or numbers).

Hope that helps!

Hey@lauraatcapture!

I’ve tried to simplify/clarify how Looping works in this article:

That should link you directly to the section that seems to be relevant, about how to use line items (which is what the contacts would be, to that organization). Then the first example I used gives you an idea of how to put it all together.

It can be intimidating at first, but think of it as a container inside of which you place the things that you’d like to loop through. The steps you add inside of that container (Looping by Zapier) will run for each of the items coming from the loop setup (text, line items or numbers).

Hope that helps!

 

Hiya, 

I understand the premise of this, and I believe I have the Zap set up with looping as I need it to be. The problem is that it’s not seeming to find ALL the contacts at an organisation, creating line items…?

Userlevel 7
Badge +11

Hi @lauraatcapture!

When you say it’s not finding all the contacts, is that when you are testing within the Zap Editor? If so, that would be the expected behaviour here. When testing in the Zap Editor it will only run through the first loop not the subsequent loops as well. 

Can you try switching the Zap on and running a quick live test to check it correctly loops through all the contacts when the Zap is switched on? 

Hi @lauraatcapture!

When you say it’s not finding all the contacts, is that when you are testing within the Zap Editor? If so, that would be the expected behaviour here. When testing in the Zap Editor it will only run through the first loop not the subsequent loops as well. 

Can you try switching the Zap on and running a quick live test to check it correctly loops through all the contacts when the Zap is switched on? 

I’ve got 

  1. Trigger: Updated Organisation record in SalesForce
  2. Action: Find record(s) in Salesforce (where it’s pointed to look for Salesforce Object: Contact, Field to search by: Organisation Name and Search Value: Organisation Name. 
  3. Action: Create Loop from Line Items - where line items are a combination of data from the Organisation Record and the Contact Record, and are only the ones needed to fill the necessary fields in MailChimp.
  4. Action: Add subscriber to MailChimp - where the reference data is the line items from the Loop.

In step 2 test/preview however, it returns:

 

records:

1:

attributes:

type: Contact

 

when I know there are 2 contacts on the Organisation record. I don’t know if, as you say, that’s what I’m supposed to be seeing, so I suppose I could just turn the Zap on and see if it works, but I wasn’t entirely sure I’d got the Zap set up correctly and had the loop in the right place, so I was tentative to do so until I was sure. 

Userlevel 7
Badge +11

Ah @lauraatcapture, I think I know why you’re only seeing one result returned from step 2! The Find record(s) action allows for multiple different records to be searched for, but it doesn’t return multiple search results. So you’d want to use the Find Records step inside the Looping by Zapier step to search for each of the related/associated contacts individually.

Looking back through the thread here it seems as though Troy was previously suggesting that you take the related contact record IDs that are output by the trigger step to use in the Looping by Zapier step. In which case you’d want to update the Looping step to use those related contact record IDs for the line items.

Then, I would suggest moving that Find Record(s) action to within the Looping by Zapier step so that each time the loop runs it will search for the related contact, allowing the relevant contact info to be passed over to the Mailchimp step. So it would look something like this:

  1. Trigger: Updated record (SalesForce) - triggers when organisation record is updated.
  2. Action: Create Loop from Line Items (Looping by Zapier) - where line items are generated from the related contact IDs from the previous step.
  3. Action: Find record(s) (SalesForce) - where it searches for a related contact ID to obtain information about that contact.
  4. Action: Add/Update Subscriber (MailChimp) - where it uses the contact information from the previous step to add the subscriber to Mailchimp.


Hopefully that helps. Please do let us know if you run into any further issues or questions! :)

Ah @lauraatcapture, I think I know why you’re only seeing one result returned from step 2! The Find record(s) action allows for multiple different records to be searched for, but it doesn’t return multiple search results. So you’d want to use the Find Records step inside the Looping by Zapier step to search for each of the related/associated contacts individually.

Looking back through the thread here it seems as though Troy was previously suggesting that you take the related contact record IDs that are output by the trigger step to use in the Looping by Zapier step. In which case you’d want to update the Looping step to use those related contact record IDs for the line items.

Then, I would suggest moving that Find Record(s) action to within the Looping by Zapier step so that each time the loop runs it will search for the related contact, allowing the relevant contact info to be passed over to the Mailchimp step. So it would look something like this:

  1. Trigger: Updated record (SalesForce) - triggers when organisation record is updated.
  2. Action: Create Loop from Line Items (Looping by Zapier) - where line items are generated from the related contact IDs from the previous step.
  3. Action: Find record(s) (SalesForce) - where it searches for a related contact ID to obtain information about that contact.
  4. Action: Add/Update Subscriber (MailChimp) - where it uses the contact information from the previous step to add the subscriber to Mailchimp.


Hopefully that helps. Please do let us know if you run into any further issues or questions! :)

From a follow up with Zapier support, I was told that there wasn’t capability for the line items to be the related contact IDs, because there’s no functionality to query and return contact IDs from an organisation record. 

In the meantime, I’ve found an alternative work-around, (an individual Zap pointing at the specific fields - it  triggers on a change to each individual contact level field that pulls data from the organisation, hurrah!)

however it’s thrown up a subsequent issue that seems to be entirely unresolvable. 

Fields don’t trigger, any and all fields, if they are changed to a value that has ever previously been held. 

So in the instance of a contact being moved from New > Warm > Cold > Warm again, the second “Warm” change wouldn’t trigger the Zap. And I can’t think of a single workaround for that.