Document toolboxDocument toolbox

Salesforce collector

Service description

Salesforce is a customer relationship management solution that brings companies and customers together. It's an integrated CRM platform that gives all the departments, including marketing, sales, commerce, and service. This Salesforce collector provides the possibility to integrate Salesforce with Devo in order to easily send data to the Devo platform or customizing it by, for example, making your own Activeboards.

This collector works only with the Enterprise, Performance, Unlimited, Developer, and Database Salesforce editions. Make sure that you have one of the listed editions if you want to use the collector.

Data source description

The Salesforce collector retrieves data from the following “Salesforce Objects“ (also known as SObjects). The collector processes the Salesforce API responses and sends them to the Devo platform, which will categorize all the information received on specific tables on your Devo domain.

Salesforce resources

Listed in the table below are the SObject names, details, and to which tables Devo sends the data:

SObject name / Service

Details

Devo data tables

SObject name / Service

Details

Devo data tables

Account

Represents an individual account, which is an organization or person involved with your business (such as customers, competitors, and partners).

crm.salesforceobjects.account

Case

Represents a case, which is a customer issue or problem.

crm.salesforceobjects.case

ContentVersion

Represents a specific version of a document in Salesforce CRM Content or Salesforce Files.

crm.salesforceobjects.contentversion

Dashboard

Represents a dashboard, which shows data from custom reports as visual components.

crm.salesforceobjects.dashboard

LoginHistory

Represents the login history for all successful and failed login attempts for organizations and enabled portals.

crm.salesforceobjects.loginhistory

Opportunity

Represents an opportunity, which is a sale or pending deal.

crm.salesforceobjects.opportunity

Report

Represents a report, a set of data that meets certain criteria, displayed in an organized way.

crm.salesforceobjects.report

User

Represents a user in your organization.

crm.salesforceobjects.users

EventLogFiles

Represents event log files for event monitoring.

crm.salesforceobjects.eventlogfiles

If file processing is enabled:

  • crm.salesforce

  • crm.salesforce.<event_type>

The third level of the tag (event_type) will be automatically assigned according to the type of event sent.

For more information about the available EventLogFiles event_types, visit this link. The event_types in the tag will be always in lowercase and without spaces.





For more info about Salesforce SObjects, visit the Salesforce Reference.

Setup

The Salesforce collector works over the Salesforce API. You need to enable the API in your Salesforce account to allow the collector to get the data and make sure you have the required permissions.

Enable API access on the account

  1. Log in to your Salesforce account.

  2. Click the gear icon and select Service Setup.

  3. Open the Users section in the left tree and select Users. In this section, search your user and click your user profile.

  4. In the profile screen, click Edit.

  5. Scroll down to Administrative Permissions and search for the API Enabled checkbox. Check it and save the changes.

Authentication

The Salesforce collector supports User/Password and OAuth2 authentication methods.

Getting credentials (User/Password)

This method needs a username, password, and a security token.

Usually, all come together in the same mail when the user creates a Salesforce account. However, if the security token does not come in the mail or you can not find it, follow the next steps to obtain a new one:

  1. Log in to your Salesforce account with the user to be used.

  2. Click the user icon at the top right of the screen and select Settings.

  3. Open the Users section in the left tree and select Users.

  4. In the left menu, go to the My personal information section and select Reset my security token.

  5. On this screen, click Reset Security Token. You will receive a mail with the new security token.

Getting credentials (OAuth2)

To enable OAuth2 authentication, you need to create a Connected App and obtain the client_id, client_secret, and redirect_uri to use it.

  1. Log in to your Salesforce account.

  2. Click the gear icon and select Service Setup.

  3. Type Apps in the left search bar, then click App Manager and create a new Connected App.

  4. Fill all the mandatory fields, check the Enable OAuth settings option and fill the new fields as shown in the following capture:

  5. Save the changes and note down the client_id (Consumer Key), client_secret (Consumer Secret), and redirect_uri (Callback URL)

To get the access token file, we need to execute this script and follow these steps.

  1. Execute the script using the following command:

    python salesforce_access_token_generator.py --client_id <salesforce_client_id> --client_secret <salesforce_client_secret> --redirect_uri <salesforce_client_uri>

    This script will open your predefined browser to log in to Salesforce and authorize the client in your Salesforce domain, and will redirect to other URL like in the following image:

    .

  2. Now, copy the URL and paste it in the terminal where you have executed the script. Press ENTER and the script will finalize the token file creation. Then, you should see an access_token.json file in the same directory as the script.

  3. This file will be required by Devo when adding collection for this data source to your Devo domain.

Minimum permissions

In order to get the required data, your user must have some minimal permissions. The user must be under a Salesforce user license and we need to provide the standard user profile for almost all services/SObjects (with some exceptions) after enabling the API access.

The special permissions required for each SObject are specified below:

LoginHistory and Users

We can use a profile inherited from the standard user. To add the missing permissions, we just need to enable the Manage Users permission in the user’s profile.

EventLogFiles

We can use a profile inherited from the standard user. To add the missing permissions, we just need to enable the View Event Log Files permission in the user’s profile.

Run the collector

Once the data source is configured, you can either send us the required information if you want us to host and manage the collector for you (Cloud collector), or deploy and host the collector in your own machine using a Docker image (On-premise collector).