Note: Groove's Omnibar is configured using SOQL (the Salesforce query language). If you are unfamiliar with SOQL, you can still configure Groove Views by following the guide below. If you have any questions, please contact support@grooveapp.com to set up a meeting with one of our integration specialists.

Recommended literature is the official SOQL documentation and Jeff Douglas' excellent blogpost about SOQL.

Groove Views Introduction

Groove Views control what data is displayed in Groove's Omnibar when users open, hover over, or compose an email in Gmail. You can customize this so that your team can view the most relevant Salesforce details while reaching out to clients. Groove Views are configured in a custom Object called Groove Views which you'll see after you've installed the Managed Package.

There are a number of useful Groove Views are already pre-configured for you. SFDC admins can add/remove/modify views as needed. Note that the admin has to belong to a profile that has "Modify All Data" permissions in order to create or update Groove Views.

Configuring Groove Views

  1. In Salesforce, click the ➕  icon

2. Locate and select Groove Views

3. Select All Groove Views and click Go!

4. Locate the Groove View you'd like to modify, and select it (e.g. if you'd like to to edit which fields you can view in the Omnibar from each Contact record, select the view Contacts with the Same Email Address).

Note: The SELECT statement that starts the SOQL query determines which fields are being pulled in, while the FROM clause determines which Salesforce Object you're getting these fields from:

The example above includes the API Names of the fields for each Contact's name, title, account name, phone number, mobile phone number, and Groove's custom LinkedIn lookup action button (explained below). It also includes a subquery (enclosed in parentheses) which is pulling in relevant information from each Contact's Activity History. Below is what that Groove View currently displays:

5. Click Edit and include the API Name(s) of the field(s) you'd like to include in this Groove View in the first SELECT statement, and separate it from the other fields with a comma.

6. Click Save. The Omnibar now displays the fields whose API Names you just included in the query!

Below is an example of adding the Contact's Department to the Omnibar, to be displayed before the Business Phone number:

Note: each field's API name must be separated by a comma. To find the API names of the fields you're looking for:

  • Salesforce Setup
  • In the quick find search for the Object whose fields you're using, and select the subitem Fields (e.g. in this case, I'd search for Contact and click on the subitem Fields).
  • For standard fields you would need to copy/paste the Field Name into your SOQL Query, and for custom fields you can copy paste the API Name:

Once you paste the Field Name(s)/API Name(s) into your query, you can save the Groove View, refresh Gmail, hover over a Contact's email address, and take a look at the new fields you just added.

Profile Specific Groove Views

Groove can display a profile specific set of Groove Views if configured to do so. Click Edit and configure your Groove View in the following ways:

  1. Displayed to all profiles - select "All profiles get to see this view" in the picklist field "Profile Specific Results"
  2. Displayed to only a subset of all profiles - select "Only display this view to the profiles below." in the picklist field "Profile Specific Results"; then enter the list of all profile IDs (comma separated) in the field "Excluded/Included Profiles".
  3. Displayed to all profiles except a set of profiles - select "Do not display this view to the profiles below." in the picklist field "Profile Specific Results"; then enter the list of all excluded profile IDs (comma separated) in the field "Excluded/Included Profiles".

Display Order

To decide which Groove View is displayed by default when you hover over/open an email, you can configure a Display Order. For example, if you'd like to see fields from Account by default rather than from the Contact, you can include a higher number in the Display Order for the "Associated Accounts" Groove View:

Since my "Associated Accounts" Groove View has the highest Display Order, it will be displayed first when I hover over/open an email:

URL Parameter and SOQL Placeholders

In order to execute the SOQL query in the context of a specific email, the SOQL query in the view usually contains placeholders. These placeholders will be replaced with the email address or parts of it of the sender. These placeholders are:

Unsupported SOQL Idioms

Do not use any kind of SOQL alias notation, as this is not supported by Groove. Here are examples that are not supported and may lead to unexpected results:

SELECT c.Firstname, c.Lastname FROM Contact c WHERE Lastname = 'Smith' 
SELECT Firstname, Lastname FROM Contact c WHERE c.Lastname = 'Smith'
SELECT Firstname, Lastname FROM Contact c, c.Account a WHERE a.name = 'MyriadPubs'

Also note that aggregate functions and keywords are not supported by Groove. If a SOQL query in a Groove View contains such aggregate functions (SUM, AVG, etc.) or keywords (GROUP BY), you won't be able to save it.

Example A

A view containing the query below would display all contacts that have the same email address as the sender of the email in context.

SELECT name, email, phone
FROM Contact
WHERE email = '{!email}'

Example B

A view containing the query below would display up to five leads owned by the current user that came from somebody with the same email domain as the sender's domain of the email in context (and thus probably from the same company).

SELECT name, email, phone
FROM Lead
WHERE email LIKE '%@{!domain}'
AND ownerId = '{!userid}' LIMIT 5

Example C

A view containing the query below would display up to five contacts that came from somebody with the same email domain as the sender's domain of the email in context (and thus probably from the same company). For each contact, it would also display the five most recent activities. Note that usually the placeholder {!domain} is preferred to the placeholder {!host}.

SELECT Name, Email, Phone, 
   (SELECT Subject, CreatedBy.Name, ActivityDate FROM ActivityHistories ORDER BY ActivityDate DESC LIMIT 5)
FROM Contact
WHERE Email LIKE '%@{!domain}'
LIMIT 5

Configuring Action Buttons

Groove can also display "Action Buttons" to the user, calling a specific URL. This is useful if you want the user to be able to perform specific tasks under a specific URL. An action button is simply defined by creating a custom field in Salesforce that has an API name that starts with "Groove_". The value of this field usually contains a URL that will be opened when the user opens clicks on the action button.

Note: In order to prevent cross-site scripting attacks, only action buttons will be displayed where the URL starts with "http://" or "https://". Relative URLs or javascript: URLs will not be displayed.

Example A

A view containing the query

SELECT Groove_Log_a_Call__c, name, email, phone FROM Contact WHERE email = '{!email}'

would display an Action Button "Log a Call" in every row. The field Groove_Log_a_Call__c is a custom formula field on the contact object containing this formula:

'https://na1.salesforce.com/00T/e?title=Call&who_id=' & id & '&followup=1&tsk5=Call&retURL=%2F' & id & '&ent=Task'

Clicking this button takes the user to the log a call screen in the SFDC UI (on the na1 pod).

Example B

A view containing the query

SELECT Groove_LinkedIn__c, name, email, phone FROM Contact WHERE email = '{!email}'

would display an Action Button "LinkedIn" in every row. The field Groove_LinkedIn__c is a custom formula field on the contact object containing this formula:

'http://www.linkedin.com/search/fpsearch?type=people&keywords=' & firstname & ' ' + lastname

This implements a look-up function to LinkedIn.

Limitations

  • Lookup fields are not able to be edited from the sidebar
Did this answer your question?