Skip to main content

Salesforce Destination

sf_api.png

Salesforce

Nexla's bi-directional connectors allow data to flow both to and from any location, making it simple to create a FlexFlow or DirectFlow data flow that sends data to a Salesforce location.

  1. Click the + icon on the Nexset that will be sent to the Salesforce destination, and select the Send to Destination option from the menu.

  2. Select the Salesforce connector from the list of available data destinations. Then, select the credential that will be used to connect to the Salesforce organization, and click Next; or, create a new Salesforce credential for use in this flow.

Configure Using a Template

Nexla provides pre-built templates that can be used to rapidly configure destinations to send data to common Salesforce endpoints. Each template is designed specifically for the corresponding Salesforce endpoint, making destination setup easy and efficient.

Salesforce Destination Template
Example: Batch Update Objects

SF_Dest1.png
  • To configure this destination using a template, select the endpoint to which data will be sent from the Endpoint pulldown menu; then, follow the instructions in the corresponding section below to configure additional endpoint settings.

Batch Update (Upsert) Objects

Select this template to update the fields of an existing Salesforce object with data from the Nexset records using an upsert operation. This endpoint triggers a PATCH request, so only the fields that are present in each record will be updated.

  1. Enter the API name of the Salesforce object that will be updated in the API Name of Object to be Updated field.

    • For standard Salesforce objects, the API name is the name of the standard object (e.g., Account, Contact, Opportunity).

    • For custom Salesforce objects, the API name is the name of the custom object with the suffix __c—for example, if a custom object is named "Inventory", the API name of this object would be Inventory__c.

  2. By default, Nexla will execute this query using the latest available Salesforce API version. To use a different version, enter the API version in the format of v59.0 in the Salesforce API Version field.

The upsert operation will update existing records if a matching external ID is found, or create new records if no match exists. Upsert operations are efficient for syncing data when you're not sure whether records already exist. The PATCH method ensures that only provided fields are updated, leaving other fields unchanged. For complete information about Salesforce upsert operations, see the Salesforce Upsert SObject Documentation.

Create New Opportunities

Select this template to create new Salesforce opportunities with data from the Nexset records. This template is designed to create new opportunities; it will not update existing opportunities.

  • By default, Nexla will execute this query using the latest available Salesforce API version. To use a different version, enter the API version in the format of v59.0 in the Salesforce API Version field.

This template uses the REST API create endpoint to insert new opportunity records. Each record in your Nexset will create a new opportunity in Salesforce. Required fields for opportunities (such as Name, StageName, and CloseDate) should be included in your Nexset data. For complete information about creating Salesforce records, see the Salesforce Create SObject Documentation.

Update Fields of an Opportunity

Select this template to update the fields of an existing Salesforce opportunity with data from the Nexset records. To use this template, the Nexset must include an attribute named Id, and its value for each record must be the ID of the opportunity to be updated with data from that record.

Batch Update (Upsert) Objects template can provide better performance for updating multiple opportunities.

  • By default, Nexla will execute this query using the latest available Salesforce API version. To use a different version, enter the API version in the format of v59.0 in the Salesforce API Version field.

This template uses the REST API update endpoint to modify existing opportunity records. The Id field in each record identifies which opportunity to update. Only fields included in the Nexset data will be updated; other fields remain unchanged. For complete information about updating Salesforce records, see the Salesforce Update SObject Documentation.

Configure Manually

Salesforce destinations can be manually configured to send Nexset data to any valid Salesforce API endpoint.

Using manual configuration, you can also configure Nexla to automatically send the response received from the Salesforce API after each call to a new Nexla webhook data source.

API Method

  1. To manually configure this destination, select the Advanced tab at the top of the configuration screen.

  2. Select the API method that will be used for calls to the Salesforce API from the Method pulldown menu. The most common methods for Salesforce destinations are:

    • POST: For creating new records
    • PATCH: For updating existing records (upsert operations)
    • PUT: For updating existing records

Data Format

  1. Select the format in which the Nexset data will be sent to the Salesforce API from the Content Format pulldown menu. Nexla will automatically convert the data to the selected format for each API call.

The Salesforce API accepts JSON in request bodies and returns JSON in response bodies. Ensure you select JSON as the content format for Salesforce API destinations. For complete information about Salesforce API request formats, see the Salesforce REST API Documentation.

API Endpoint URL

  1. Enter the URL of the Salesforce API endpoint to which you want to send the Nexset data in the URL field. For update/upsert operations, include the ID of the object to be updated at the end of the URL.

Salesforce API URLs typically follow the format: https://{instance}.salesforce.com/services/data/v{version}/sobjects/{ObjectName} for create operations, or https://{instance}.salesforce.com/services/data/v{version}/sobjects/{ObjectName}/{Id} for update operations. Replace {instance} with your Salesforce instance URL, {version} with the API version (e.g., v59.0), {ObjectName} with the object API name, and {Id} with the record ID for updates. For upsert operations, use https://{instance}.salesforce.com/services/data/v{version}/sobjects/{ObjectName}/{ExternalIdField}/{ExternalId}. For complete information about Salesforce API endpoints, see the Salesforce REST API Documentation.

Request Headers

Optional
  • If Nexla should include any additional request headers in API calls to this destination, enter the headers & corresponding values as comma-separated pairs in the Request Headers field (e.g., header1:value1,header2:value2).

    You do not need to include any headers already present in the credentials. Authentication headers (OAuth 2.0 access tokens) are automatically included from your credentials. However, you may need to include additional headers for specific Salesforce API features. The Content-Type header should be set to application/json for Salesforce API requests.

Exclude Attributes from the Call

Optional
  • If any record attributes in the Nexset should be omitted when sending data to this Salesforce destination, select the attributes from the Exclude Attributes pulldown menu.

  • Any number of attributes can be selected for exclusion, and all excluded attributes will be shown in the field. To remove an attribute from the list, click the X icon next to the attribute name.

Record Batching

Optional
  1. If records should be sent to this destination in batched API calls, check the box next to Would you like to batch your records together? to enable record batching.

  2. Enter the maximum number of records that should be batched together in a single API call in the Batch Size field. By default, this value is set to 100.

  3. Select the algorithm that will be used to group records into batches from the Grouping Algorithm pulldown menu. The sample request shown in the panel on the right will be updated to reflect the current batching settings. Some algorithms require additional settings—click on an algorithm listed below to view instructions for configuring these settings.

    Property Inside JSON Object

    1. Enter the name of the JSON property that should contain the batched records in the Property Name field.
    2. If any additional properties should be included in the request, enter the properties in the Other Props field in JSON format.

    Code

    1. Enter the code that will be used to create the batched request in the code editor below the Grouping Algorithm field.

Record batching is particularly useful for Salesforce's Composite API, which allows you to execute multiple operations in a single API call. Batching can significantly improve performance when sending large volumes of data to Salesforce. The Salesforce API supports batch sizes up to 200 records for most operations. For complete information about Salesforce batch operations, see the Salesforce Composite API Documentation.

Response Webhook

Optional

Nexla can automatically send the response received from the Salesforce API after each call to a new Nexla webhook data source. This option allows you to keep track of the status of each API call and any additional information returned after each call.

  • To enable this option, check the box next to Would you like to process the API response as a Nexla Webhook source?.

Response webhooks are useful for tracking the success or failure of Salesforce API operations. Salesforce API responses include status information, record IDs for created records, and any errors that occurred during processing. Capturing these responses allows you to monitor data synchronization and handle errors appropriately. For complete information about Salesforce API responses, see the Salesforce REST API Documentation.

Sample Request Payload

Sample request payloads containing a portion of the Nexset data that will be sent to the Salesforce API endpoint based on the current settings are shown in the Sample Payload panel on the right. These samples can be referenced to ensure that the destination and request settings are correctly configured.

  • Click on a sample request payload to expand it and view the complete payload content.
  • Sample payloads are automatically updated with each setting change, making it easy to verify that changes achieve the desired effect.

Endpoint Testing (Manual Configuration)

After all endpoint settings have been configured, Nexla can send a test payload to the Salesforce API to ensure that the destination is configured correctly.

  1. To send a test payload, select the Test button at the top of the Sample Payload panel, and click on a listed sample payload to expand it.

  2. If any modifications to the sample payload are needed, make the necessary changes directly within the sample window.

  3. Click the Send Test Data button at the top of a sample payload to send the test payload to the Salesforce API using the current settings.

Save & Activate the Destination

  • Once all endpoint settings have been configured, click the Done button in the upper right corner of the screen to save and create the destination. To send the data to Salesforce, open the destination resource menu, and select Activate.

    The Nexset data will not be sent to Salesforce until the destination is activated. Destinations can be activated immediately or at a later time, providing full control over data movement.