Fortinet Document Library

Version:


Table of Contents

1.0.1
Copy Link

About the connector

The Salesforce cloud is an on-demand customer relationship management (CRM) suite that offers applications for small, midsize, and enterprise organizations, with a focus on sales and support.

This document provides information about the Salesforce connector, which facilitates automated interactions, with Salesforce using FortiSOAR™ playbooks. Add the Salesforce connector as a step in FortiSOAR™ playbooks and perform automated operations, such as creating or updating records on Salesforce, getting details of salesforce records, or running Salesforce Query Language (SOQL) queries on Salesforce.

Version information

Connector Version: 1.0.1

FortiSOAR™ Version Tested on: 4.12.0-746

Salesforce Version Tested on: "Winter '19"

Authored By: Fortinet

Certified: Yes

Release Notes for version 1.0.1

Following enhancements have been made to the Salesforce connector in version 1.0.1:

  • Renamed the following configuration parameters:
    • Client ID renamed to Consumer Key.
    • Client Secret renamed to Consumer Secret.
  • Added the Organization Type as a configuration parameter.

Installing the connector

All connectors provided by FortiSOAR™ are delivered using a FortiSOAR™ repository. Therefore, you must set up your FortiSOAR™ repository and use the yum command to install connectors:

yum install cyops-connector-salesforce

For the detailed procedure to install a connector, click here

Prerequisites to configuring the connector

  • You must have the consumer key and secret from the connected application definition.
  • You must have the credentials (username-password pair) to connect to Salesforce.
  • To access the FortiSOAR™ UI, ensure that port 443 is open through the firewall for the FortiSOAR™ instance.

Configuring the connector

For the procedure to configure a connector, click here

Configuration parameters

In FortiSOAR™, on the connectors page, click the Salesforce connector row, and in the Configure tab enter the required configuration details.

Parameter Description
Consumer ID Consumer key from the connected application definition.
Note: To get your consumer key, you require to set up your application as a connected application in the Salesforce organization. See the following topic "Setting up your application as a connected application in Salesforce" for more information.
Consumer Secret Consumer secret from the connected application definition.
Note: To get your consumer secret, you require to set up your application as a connected application in the Salesforce organization. See the following topic "Setting up your application as a connected application in Salesforce" for more information.
Username Username to access the Salesforce account to which you will connect and perform the automated operations.
Password Password to access the Salesforce account to which you will connect and perform the automated operations.
Organization Type Organization type is required at the time of login since a token is required to connect to the organization and perform automated operations. You can choose from either Salesforce Production Organization or Salesforce Sandbox Organization.    
Note: If you are integrating with the Salesforce Production Organization, then the endpoint for the login call is https://login.salesforce.com, and if you are integrating with the Salesforce Sandbox Organization, then the endpoint for the login call is https://test.salesforce.com.
Verify SSL Specifies whether the SSL certificate for the server is to be verified or not.
By default, this option is set as True.

Setting up your application as a connected application in Salesforce

To get the value of your consumer key and secret, you require to set up your application as a connected application in the Salesforce organization. To create a connected application, see the Defining Connected Apps section in the "REST API Developer Guide" from Salesforce, which is located at https://resources.docs.salesforce.com/216/latest/en-us/sfdc/pdf/api_rest.pdf.

Next, the connected application IP relaxation should be set as Relax IP restrictions. To set this, on Salesforce, navigate to Manage Connected Apps, then select the connected app and click Edit Policies and select Relax IP restrictions for the IP Relaxation parameter. For more information, see https://help.salesforce.com/articleView?id=connected_app_continuous_ip.htm&type=5.

 

Use the following cURL commands to verify your connection:

For Salesforce Production Organization:
curl https://login.salesforce.com/services/oauth2/token -d 'grant_type=password&client_id=Your_Client_ID&client_secret=Your_Client_Secret&username=Your_Username&password=Your_Password'

For Salesforce Sandbox Organization:
curl https://test.salesforce.com/services/oauth2/token -d 'grant_type=password&client_id=Your_Client_ID&client_secret=Your_Client_Secret&username=Your_Username&password=Your_Password'

Actions supported by the connector

The following automated operations can be included in playbooks, and you can also use the annotations to access operations from FortiSOAR™ release 4.10.0 and onwards:

Function Description Annotation and Category
Create Record Creates a record in the specified Salesforce object based on the Salesforce object name and JSON payload you have specified. create_record
Investigation
Run Query Executes a Salesforce Query Language (SOQL) query to read information stored in your organization's database. run_query
Investigation
Get Salesforce Object Fields Retrieves field information for a specified Salesforce object based on the Salesforce object name you have specified. --
 
List Objects Retrieves a list of specified salesforce object records based on the Salesforce object name and list view you have specified. list_objects
Investigation
Get Salesforce Object Record Details Retrieves record details of the specified Salesforce object based on the Salesforce object name and optionally the record ID you have specified. get_record_details
Investigation
Update Record Updates the record in the specified Salesforce object based on the Salesforce object name, record ID and JSON payload you have specified. update_record
Investigation
Delete Record Deletes the record in the specified Salesforce object based on the Salesforce object name and record ID you have specified. delete_record
Remediation

operation: Create Record

Input parameters

Parameter Description
Name of Object Select the Salesforce object name in which you want to create a record.
This parameter makes an API call named "list_salesforce_objects" to populate its drop-down selections dynamically.
JSON Field Record fields in a JSON payload using which the record is created in Salesforce.

Output

The output contains the following populated JSON schema:
{
     "id": "",
     "success": "",
     "errors": []
}

operation: Run Query

Input parameters

Parameter Description
Query SOQL query specified for reading information stored in your organization's database in Salesforce.
Query Type Type of SOQL query that you want to run on Salesforce. You can choose either Query or QueryAll.

Output

The output contains the following populated JSON schema:
{
     "done": "",
     "totalSize": "",
     "records": [
         {}
     ]
}

operation: Get Salesforce Object Fields

Input parameters

Parameter Description
Name of Object Select the Salesforce object name for which you want to retrieve field information.
This parameter makes an API call named "list_salesforce_objects" to populate its drop-down selections dynamically.

Output

The output contains a non-dictionary value.

operation: List Objects

Input parameters

Parameter Description
Name of Object Select the Salesforce object name for which you want to retrieve the list of object records.
This parameter makes an API call named "list_salesforce_objects" to populate its drop-down selections dynamically.
List Views List view label for the Salesforce object. List views enable you to see a filtered list of records.  
Note: If you do not specify any list view, then this operation will return all available list views for the Salesforce object.

Output

The output contains a non-dictionary value.

operation: Get Salesforce Object Record Details

Input parameters

Parameter Description
Name of Object Select the Salesforce object name whose record details you want to retrieve from Salesforce.
This parameter makes an API call named "list_salesforce_objects" to populate its drop-down selections dynamically.
Record ID (Optional) ID of the Salesforce object record whose details you want to retrieve from Salesforce.  
Note: If you do not specify any record ID, then this operation will return all object records associated with the selected Salesforce object name.

Output

The output contains a non-dictionary value.

operation: Update Record

Input parameters

Parameter Description
Name of Object Select the Salesforce object name whose associated record you want to update.
This parameter makes an API call named "list_salesforce_objects" to populate its drop-down selections dynamically.
Record ID ID of the Salesforce object record that you want to update in Salesforce.  
JSON Field Record fields in a JSON payload that you want to update in Salesforce.

Output

The output contains the following populated JSON schema:
{
     "status": "",
     "result": ""
}

operation: Delete Record

Input parameters

Parameter Description
Name of Object Select the Salesforce object name whose associated record you want to delete.
This parameter makes an API call named "list_salesforce_objects" to populate its drop-down selections dynamically.
Record ID ID of the Salesforce object record that you want to delete from Salesforce.  

Output

 

The output contains the following populated JSON schema:
{
     "status": "",
     "result": ""
}

Included playbooks

The Sample - Salesforce - 1.0.1 playbook collection comes bundled with the Salesforce connector. These playbooks contain steps using which you can perform all supported actions. You can see bundled playbooks in the Automation > Playbooks section in FortiSOAR™ after importing the Salesforce connector.

  • Create Record
  • Delete Record
  • Get Salesforce Object Fields
  • Get Salesforce Object Record Details
  • List Objects
  • Run Query
  • Update Record

Note: If you are planning to use any of the sample playbooks in your environment, ensure that you clone those playbooks and move them to a different collection since the sample playbook collection gets deleted during connector upgrade and delete.

About the connector

The Salesforce cloud is an on-demand customer relationship management (CRM) suite that offers applications for small, midsize, and enterprise organizations, with a focus on sales and support.

This document provides information about the Salesforce connector, which facilitates automated interactions, with Salesforce using FortiSOAR™ playbooks. Add the Salesforce connector as a step in FortiSOAR™ playbooks and perform automated operations, such as creating or updating records on Salesforce, getting details of salesforce records, or running Salesforce Query Language (SOQL) queries on Salesforce.

Version information

Connector Version: 1.0.1

FortiSOAR™ Version Tested on: 4.12.0-746

Salesforce Version Tested on: "Winter '19"

Authored By: Fortinet

Certified: Yes

Release Notes for version 1.0.1

Following enhancements have been made to the Salesforce connector in version 1.0.1:

Installing the connector

All connectors provided by FortiSOAR™ are delivered using a FortiSOAR™ repository. Therefore, you must set up your FortiSOAR™ repository and use the yum command to install connectors:

yum install cyops-connector-salesforce

For the detailed procedure to install a connector, click here

Prerequisites to configuring the connector

Configuring the connector

For the procedure to configure a connector, click here

Configuration parameters

In FortiSOAR™, on the connectors page, click the Salesforce connector row, and in the Configure tab enter the required configuration details.

Parameter Description
Consumer ID Consumer key from the connected application definition.
Note: To get your consumer key, you require to set up your application as a connected application in the Salesforce organization. See the following topic "Setting up your application as a connected application in Salesforce" for more information.
Consumer Secret Consumer secret from the connected application definition.
Note: To get your consumer secret, you require to set up your application as a connected application in the Salesforce organization. See the following topic "Setting up your application as a connected application in Salesforce" for more information.
Username Username to access the Salesforce account to which you will connect and perform the automated operations.
Password Password to access the Salesforce account to which you will connect and perform the automated operations.
Organization Type Organization type is required at the time of login since a token is required to connect to the organization and perform automated operations. You can choose from either Salesforce Production Organization or Salesforce Sandbox Organization.    
Note: If you are integrating with the Salesforce Production Organization, then the endpoint for the login call is https://login.salesforce.com, and if you are integrating with the Salesforce Sandbox Organization, then the endpoint for the login call is https://test.salesforce.com.
Verify SSL Specifies whether the SSL certificate for the server is to be verified or not.
By default, this option is set as True.

Setting up your application as a connected application in Salesforce

To get the value of your consumer key and secret, you require to set up your application as a connected application in the Salesforce organization. To create a connected application, see the Defining Connected Apps section in the "REST API Developer Guide" from Salesforce, which is located at https://resources.docs.salesforce.com/216/latest/en-us/sfdc/pdf/api_rest.pdf.

Next, the connected application IP relaxation should be set as Relax IP restrictions. To set this, on Salesforce, navigate to Manage Connected Apps, then select the connected app and click Edit Policies and select Relax IP restrictions for the IP Relaxation parameter. For more information, see https://help.salesforce.com/articleView?id=connected_app_continuous_ip.htm&type=5.

 

Use the following cURL commands to verify your connection:

For Salesforce Production Organization:
curl https://login.salesforce.com/services/oauth2/token -d 'grant_type=password&client_id=Your_Client_ID&client_secret=Your_Client_Secret&username=Your_Username&password=Your_Password'

For Salesforce Sandbox Organization:
curl https://test.salesforce.com/services/oauth2/token -d 'grant_type=password&client_id=Your_Client_ID&client_secret=Your_Client_Secret&username=Your_Username&password=Your_Password'

Actions supported by the connector

The following automated operations can be included in playbooks, and you can also use the annotations to access operations from FortiSOAR™ release 4.10.0 and onwards:

Function Description Annotation and Category
Create Record Creates a record in the specified Salesforce object based on the Salesforce object name and JSON payload you have specified. create_record
Investigation
Run Query Executes a Salesforce Query Language (SOQL) query to read information stored in your organization's database. run_query
Investigation
Get Salesforce Object Fields Retrieves field information for a specified Salesforce object based on the Salesforce object name you have specified. --
 
List Objects Retrieves a list of specified salesforce object records based on the Salesforce object name and list view you have specified. list_objects
Investigation
Get Salesforce Object Record Details Retrieves record details of the specified Salesforce object based on the Salesforce object name and optionally the record ID you have specified. get_record_details
Investigation
Update Record Updates the record in the specified Salesforce object based on the Salesforce object name, record ID and JSON payload you have specified. update_record
Investigation
Delete Record Deletes the record in the specified Salesforce object based on the Salesforce object name and record ID you have specified. delete_record
Remediation

operation: Create Record

Input parameters

Parameter Description
Name of Object Select the Salesforce object name in which you want to create a record.
This parameter makes an API call named "list_salesforce_objects" to populate its drop-down selections dynamically.
JSON Field Record fields in a JSON payload using which the record is created in Salesforce.

Output

The output contains the following populated JSON schema:
{
     "id": "",
     "success": "",
     "errors": []
}

operation: Run Query

Input parameters

Parameter Description
Query SOQL query specified for reading information stored in your organization's database in Salesforce.
Query Type Type of SOQL query that you want to run on Salesforce. You can choose either Query or QueryAll.

Output

The output contains the following populated JSON schema:
{
     "done": "",
     "totalSize": "",
     "records": [
         {}
     ]
}

operation: Get Salesforce Object Fields

Input parameters

Parameter Description
Name of Object Select the Salesforce object name for which you want to retrieve field information.
This parameter makes an API call named "list_salesforce_objects" to populate its drop-down selections dynamically.

Output

The output contains a non-dictionary value.

operation: List Objects

Input parameters

Parameter Description
Name of Object Select the Salesforce object name for which you want to retrieve the list of object records.
This parameter makes an API call named "list_salesforce_objects" to populate its drop-down selections dynamically.
List Views List view label for the Salesforce object. List views enable you to see a filtered list of records.  
Note: If you do not specify any list view, then this operation will return all available list views for the Salesforce object.

Output

The output contains a non-dictionary value.

operation: Get Salesforce Object Record Details

Input parameters

Parameter Description
Name of Object Select the Salesforce object name whose record details you want to retrieve from Salesforce.
This parameter makes an API call named "list_salesforce_objects" to populate its drop-down selections dynamically.
Record ID (Optional) ID of the Salesforce object record whose details you want to retrieve from Salesforce.  
Note: If you do not specify any record ID, then this operation will return all object records associated with the selected Salesforce object name.

Output

The output contains a non-dictionary value.

operation: Update Record

Input parameters

Parameter Description
Name of Object Select the Salesforce object name whose associated record you want to update.
This parameter makes an API call named "list_salesforce_objects" to populate its drop-down selections dynamically.
Record ID ID of the Salesforce object record that you want to update in Salesforce.  
JSON Field Record fields in a JSON payload that you want to update in Salesforce.

Output

The output contains the following populated JSON schema:
{
     "status": "",
     "result": ""
}

operation: Delete Record

Input parameters

Parameter Description
Name of Object Select the Salesforce object name whose associated record you want to delete.
This parameter makes an API call named "list_salesforce_objects" to populate its drop-down selections dynamically.
Record ID ID of the Salesforce object record that you want to delete from Salesforce.  

Output

 

The output contains the following populated JSON schema:
{
     "status": "",
     "result": ""
}

Included playbooks

The Sample - Salesforce - 1.0.1 playbook collection comes bundled with the Salesforce connector. These playbooks contain steps using which you can perform all supported actions. You can see bundled playbooks in the Automation > Playbooks section in FortiSOAR™ after importing the Salesforce connector.

Note: If you are planning to use any of the sample playbooks in your environment, ensure that you clone those playbooks and move them to a different collection since the sample playbook collection gets deleted during connector upgrade and delete.