Update Contact Address When Source = Cvent

Today we are going to create a process that updates the Contact Mailing Address when getting an event registration from Cvent (Event Management Software).

Salesforce Process Automation Tool: Process Builder.

Two things to have in consideration:
1. Street 2 is being captured in a Custom Contact field.
2. Mailing Address (Data Type = address) is a Compound Field.

What is a Compound Field?

Compound fields group together multiple elements of primitive data types, such as numbers or strings, to represent complex data types, such as a location or an address. Compound fields are an abstraction that can simplify application code that handles the values, leading to more concise, understandable code.

Mailing Address is a compound of the following fields: Mailing City, Mailing Country, Mailing Geocode Accuracy, Mailing Latitude, Mailing Longitude, Mailing State/Province, Mailing Street, Mailing Zip/Postal Code.

Steps

  1. Create a Contact Custom Field called “Mailing Street 2”.
  2. Map Cvent “Street 2” Contact field to Salesforce “Mailing Street 2” Contact field.
  3. Create a Process in Process Builder.
    OBJECT
  4. Choose Object: Contact
    NODE
  5. Specify When to Start the Process: when a record is created or edited
  6. Define Criteria for this Action Group: Name your Criteria.
  7. We are going to define two conditions:
    a) Is “Mailing Street 2” different than NULL?
    b) Does “Mailing Street” contain “”Mailing Street 2”?
  8. Customize the logic: 1 AND NOT 2. Please note the “NOT 2″. We are going to update “Mailing Street” only if it is not already part of “Mailing Street”. We need to check on this to avoid concatenating “Mailing Street 2” to “Mailing Street” indefinitely when editing the address/record.
    IMMEDIATE ACTIONS
  9. Name your action.
  10. Record: Contact
  11. Criteria for Updating Records: No criteria—just update the records!
  12. Set new field values for the records you update
  13. Update Mailing Street by using the following formula:
    [Contact].MailingStreet &
    SUBSTITUTE($Label.New_Line, “-“,””)&
    [Contact].MailingStreet_2__c
  14. If you are wondering about this line of code: “SUBSTITUTE($Label.New_Line, “-“,””)&”, please refer to this blog. It explains how to add a line break between “Mailing Street” and “Mailing Street 2”. There’s a known issue with the BR() function, so don’t even try it. It would be a waste of time. I know! It’s a pain.

That’s it! I hope this was helpful to you. Let me know if you have any comments.

BONUS
If you get ever get this error: “The filter logic references an undefined filter”.
It means that you need to reference to all of your conditions when customizing the logic.

PS: I dedicate this blog post to my 7 year old daughter who is always reminding me and encouraging me to update my blog. ❤️

Update Salesforce Lead and Contact Email Opt Out Field from Mailchimp Contact’s Subscription Status with Process Builder.

Did you install the Mailchimp Integration App in your Salesforce Org?

It helps you managing your Mailchimp subscribers from Salesforce leads and contacts, upload Mailchimp subscribers as Salesforce leads, build segments in your Mailchimp audience, and view Mailchimp campaign activity and reports in Salesforce.

But! What happens when a subscriber’s subscription status changes from a Mailchimp audience?
When a contact’s subscription status changes from a Mailchimp audience, their subscription status appears on the Mailchimp Membership Visualforce page inside a Contact or Lead record but it doesn’t mean that the Email Opt Out field on their Salesforce Contact or Lead got updated.

This is what Mailchimp says about it: “The Email Opt Out field on their Salesforce Contact or Lead record will not change.”

As an awesome Salesforce Admin, how can you automate this task so that you don’t have to periodically update this field manually? Use Process Builder to create a process that does it for you.

This is how my Process works:

Node 1: Member Status has changed to Unsubscribed

Immediate Actions: Update Lead Email Opt Out to True, Update Contact Email Opt Out to True

Node 2: Member Status has changed to Subscribed

Immediate Actions: Update Lead Email Opt Out to False, Update Contact Email Opt Out to False

Node 3: Member Status has changed to Cleaned

Immediate Action: Delete Lead Email
The reason why I’m deleting these emails is because they are considered as Hard Bounces in Mailchimp so there’s no reason for us to keep them.

I hope this helps you and saves you time. To me, this meant more time to dive into “Trailhead” and support my clients in other ways.

Let me know if you have any questions.

Cheers!
Gaby

Do you need to “map” a Lead Custom Field to a Standard Contact Field during conversion?

Not possible! in Salesforce, by concept you can only map Standard Fields to Standard Fields and Custom Fields to Custom Fields but what’s your way around? If you run into this requirement this is how you could do it.

Create a Process that Updates a Field when Converting a Lead into a Contact in Process Builder. Something like this:

Object*: Lead
Start the process*: when a record is created or edited

Node: Name you Node
Criteria for Executing Actions*: Conditions are met
Set Conditions: [Lead]. IsConverted Equals Boolean True
Conditions: All of the conditions are met (AND)

Immediate Actions
Action Name: Name your Action
Record*: [Lead].Converted Contact ID
Criteria for Updating Records*: No criteria—just update the records!

Set new field values for the records you update
Mobile Phone Field Reference [Lead].Home_Phone__cc

Very straightforward. The only tricky part is knowing which field value to update when setting new field values for the records you update. Process Builder shows the Field Labels and not the API field names which can be a little confusing but I recommend checking the SOAP API Developer Guide for those purposes.