Published on
October 15, 2019

Setup a consultation

How to Sync Opportunity Closed Dates with Outlook Calendar

Sales reps spend a lot of their time on Microsoft Outlook. Helping them to access and view all the necessary information in one place goes a long way in saving their time. While Salesforce does have an Outlook integration feature available, there are certain scenarios where users often end up switching back and forth between Salesforce and Outlook, which can get tedious.

Challenges faced by reps

Using Outlook and Salesforce separately can lead to multiple challenges that will take up a lot of the reps’ time. These include:

  • Creating redundancy problem by adding data separately in two different places. This can lead to human errors.
  • Time lost in switching contexts and the inability to create more personalized and relevant emails.
  • Compromises data quality due to human errors.

Why Use Outlook/Gmail Integration

Integrating Salesforce with their emails gives users tremendous power to seamlessly operate from one portal. This helps them to:

  • Eliminate redundancy by having to enter data in two separate locations.
  • Access Outlook emails and relevant Salesforce records from the same place, allowing them to create more personalized emails.
  • Dedicate more time on core sales activities.

Core features of Outlook/Gmail Integration

The core features that enable reps to optimize their sales using the integration are:

  • The ability to see related Salesforce records such as accounts/contacts directly in Outlook allowing the reps to make more informed decisions before making a sale.
  • Access Salesforce features directly from Outlook. Users can create new records, relate email messages, create calendar events and search for existing Salesforce records.
  • Sync Contacts and events. Reps do not need to create duplicate entries or update their calendars at two different places. By updating their calendar in just one place (Salesforce or Outlook), they will be able to see all their events and contacts from one place.

Adding the ability to track opportunities

Now that we understand the benefits of this integration, it is easy to see how sales reps would benefit from being able to track opportunities based on closed dates directly from their email calendars.

The ability to update Outlook calendars with Opportunity Closed Date using Salesforce for Outlook is a regular request. It gives reps the ability to track their Opportunities right from Outlook without having to log in to Salesforce. It also enables them to plan their schedule for the day. Unfortunately, Salesforce doesn’t have an out of the box solution that enables reps to be able to track upcoming Opportunity closures from their Outlook calendars.  

This post will provide a workaround that will circumvent this problem.

Here’s how we can sync Opportunity Closed Dates with Outlook Calendar-

  1. Write an Apex trigger on the Opportunity object on creation and update.
  2. On the creation of an Opportunity, a new calendar event will be created.
  3. On updating an Opportunity, the same event record will be retrieved on the basis of the Opportunity Record ID. The record will then be updated based on the data from the Opportunity.

[caption id="attachment_3817" align="alignnone" width="1350"]

Outlook calanedar

Above is the code snippet of the trigger[/caption]

With this solution, sales reps will be able to track upcoming opportunities directly from Outlook and be able to prioritize their efforts in closing the right deals at the right time.

This integration doesn’t support the migration of tasks from Outlook to Salesforce and vice versa. However, a similar workaround involving a trigger to create/update events based on creation/update of tasks can be set up to enable users to see task reminders as calendar events on their Outlook.

Note: This solution will work only on Salesforce Enterprise Edition and above. In order to achieve the same functionality in the Professional Edition, you can leverage process builders. However, with using a process builder, the existing events can only be created, but cannot be updated.

Learn, How to integrate Salesforce Opportunity Closed Dates with Microsoft Outlook Calendar in simple steps along with the ability to track opportunities