Associate Events to Opportunities in Salesforce Automatically

How to automatically associate Events with Contacts on Opportunities to those Opportunities, every time!

Scenario: Sales has a meeting with a Prospect, set by a calendaring program like Calendly, or the Sales Enablement program (Outreach, SalesLoft, or HubSpot Sales), or just manually added to the Activity timeline. Those meetings are always being tied as an Event to the Contact object ONLY. Sales has to manually associate the Event to the Opportunity they’re working with that Contact, if at that stage in the buying journey. 

There’s at least 11 clicks to manually set that right – from first searching up the Contact to making sure the Event you just associated appears on the right Opportunity Activity timeline. 

Say that Salesforce is feeling chipper that day and it takes 5 seconds after each click for the page/object to load up in the browser. Take another 10 seconds to find the element I need to click or type in. That’s approximately 3-5 minutes for each Event you need to associate. 

If you have 5 appointments on your calendar that day that you need to associate with the proper Opportunity; that’s 15-25 minutes of your day, EVERY DAY, doing something that can and ought to be automated.

Imagine your internet was slow that day or your computer isn’t cooperating. What if you got distracted by an inbound sales call or email, or your manager Slacks you and asks for an update on your pipeline? 15 minutes could easily turn into 45 minutes to an hour. Remember, this happens EVERY DAY.

There’s gotta be a better way… 

Enter the Flow: Assign Related Opportunity to Event

What you’re gonna do is automatically link up the connection that the Contact will probably have with the Opportunity. Your reps should already be assigning Contact Roles on the Opportunity as you’ve trained them on following best practices. This is essential for the Flow to work!

Best Practice: The moment that a person at a target Account has any interaction with a sales rep at your Company on a deal, that Contact should be assigned a Contact Role on the Opportunity and given a role on the deal: Evaluator, Influencer, Decision Maker, Economic Buyer, etc.

We will trace the connection from the Contact on the Event through Opportunity Contact Role to Get the Opportunity ID and then update the Event record with what we just got. Where it gets tricky is all the uses of the label “Opportunity ID”. Remember that the first Get is on the OCR object and the second Get is from the Opportunity object.

Here’s the steps you should follow to set up your Flow:

  1. Create a new Flow: Navigate to Setup, and search “Flows” from the Home tab. Click the “New Flow” button.
  2. Choose the “Record-triggered Flow” template, and click Next. Choose Auto-Layout.
  3. Select the Event Object. Trigger the Flow when the record is created. No Entry Conditions. Optimize the Flow for Actions and Related Records.
  4. Add Element: Get Records. You’re trying to store the field OpportunityId from the Opportunity Contact Role Object.
    1. Label it something like “Get OCR”. 
    2. Get records of the Object: Opportunity Contact Role.
    3. Filter the OCR records where the field “ContactId” on the OCR equals the ContactId on the Event (“$Record.Contact_ID__c”, or something close to it).
    4. Sort Descending by Contact Role ID
    5. Store just the first record, and store a single field as a brand new variable (bottom option both times): “OpportunityId” as CopyOCROppId
    6. Click Done.
  5. Add Element: Get Records. On this second Get, you’re trying to store the fields OpportunityId from the Opportunity Object.
    1. Label it something like “Get OppId”
    2. Get records of the Object: Opportunity.
    3. Filter the Opportunity records where the field “Opportunity ID” on the Opportunity equals the variable you just saved from the OCR: CopyOCROppId.
    4. Sort Descending by Created Date. This will ensure only the most recently created Opportunity the Contact may be associated with will be selected.
    5. Store the first record like you did in the previous step, as a brand new variable: “OpportunityId” as CopyOppId.
    6. Click Done.
  6. Add Element: Update Records.
    1. Label it something like “Update Event with OppId”
    2. Use the event that triggered the Flow as the thing you want to Update and set values.
    3. No Filter Conditions
    4. Field: Related To Id: “WhatId” is updated with the value stored in “CopyOppId”
    5. Click Done.
  7. End Flow.

Save and Activate your new flow. Test it out! Any time an Event is created from any source, if the Contact is listed as a Contact Role on an Opportunity, the Flow will automatically associate that Opportunity to the Event.

With this Flow, your reps should save HOURS monthly on needless admin work in Salesforce. This frees them up for more selling time and hopefully will put more money in the bank for your company.

Cheers!

 

Leave a Reply

Your email address will not be published. Required fields are marked *

Let's talk about growing your brand

Explore use cases for your industry
Get strategy and solutions information
Learn how to grow your business